-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
35 lines (31 loc) · 931 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
from setuptools import setup
import sys
import subprocess
from os import getcwd
from pathlib import Path
# Get Python path - works in virtualenv, too
python_path = subprocess.Popen([
"which",
"python"],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
close_fds=True).communicate()[0].rstrip().decode("utf-8")
# print(python_path)
python_path = os.path.dirname(os.path.dirname(python_path))
APP = ['django_cherry.py']
DATA_FILES = ['static', 'db.sqlite3']
OPTIONS = {'argv_emulation': False,
'strip': True,
'iconfile': './ark-logo.png.icns',
'packages':["ArkFund", "ark_fund", 'django'],
'bdist_base':str(Path(Path(getcwd()).parent))+ '/build',
'dist_dir':str(Path(Path(getcwd()).parent)) + '/dist'
}
print(OPTIONS)
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)