-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup_gcjm.py
59 lines (56 loc) · 2.18 KB
/
setup_gcjm.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os
import sys
from setuptools import setup
if sys.platform == 'darwin':
import py2app
elif sys.platform == 'win32':
import py2exe
sys.setrecursionlimit(100000)
VERSION = os.environ['DEEPN_VERSION']
BUNDLE_VERSION = VERSION.replace(".", "")
APP = ['gc_jm.py']
INCLUDES = ['sys', 'subprocess']
OPTIONS = {'argv_emulation': True,
'iconfile' : 'icon/Icon1.icns',
'plist': {'CFBundleGetInfoString': 'GCJM',
'CFBundleIdentifier': 'edu.uiowa.robertpiper.deepn.gcjm',
'CFBundleShortVersionString': VERSION,
'CFBundleName': 'GCJM',
'CFBundleVersion': BUNDLE_VERSION,
'NSHumanReadableCopyright': '(c) 2016 Venkatramanan Krishnamani, Robert C. Piper, Mark Stammnes'},
'includes': INCLUDES,
'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtSql', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.phonon'],
}
if sys.platform == 'darwin':
setup(
app=APP,
name='GCJM',
options={'py2app': OPTIONS},
setup_requires=['py2app'],
author='Venkatramanan Krishnamani, Robert C. Piper, Mark Stammnes',
data_files=[],
)
elif sys.platform == 'win32':
origIsSystemDLL = py2exe.build_exe.isSystemDLL
def isSystemDLL(pathname):
if os.path.basename(pathname).lower() in ("msvcp71.dll", "dwmapi.dll", "'msvcp90.dll'"):
return 0
return origIsSystemDLL(pathname)
py2exe.build_exe.isSystemDLL = isSystemDLL
setup(
console=APP,
version=VERSION,
description='GCJM',
author='Venkatramanan Krishnamani, Robert C. Piper, Mark Stammnes',
windows=[{"script":'gc_jm.py',
"icon_resources": [(1, "icon/Icon1.ico")],
"dest_base":"GCJM"
}],
data_files=[],
options={"py2exe": {'includes': INCLUDES,
"optimize": 2,
"compressed": 2,
"bundle_files": 1,
"dist_dir": "dist\GCJM"
}}
)