-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathsetup.py
74 lines (58 loc) · 2.66 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
"""
py2app/py2exe build script for MyApplication.
Will automatically ensure that all build prerequisites are available
via ez_setup
Usage (Mac OS X):
python setup.py py2app
Usage (Windows):
python setup.py py2exe
"""
import sys
'''
from setuptools import setup
import ez_setup
ez_setup.use_setuptools()
'''
NAME = 'ODMTools'
extra_options = None
sys.setrecursionlimit(2000)
if sys.platform == 'darwin':
sys.argv.append('py2app')
from setuptools import setup
APP = ['/Users/stephanie/DEV/ODMToolsPython/ODMTools.py']
LIBS = ['/usr/X11/lib/libfreetype.6.dylib', '/usr/X11/lib/libstdc++.6.dylib', '/usr/X11/lib/libpng15.15.dylib']
OPTIONS = {'iconfile': '/Users/stephanie/DEV/ODMToolsPython/odmtools/common/icons/ODMTools.icns',
'includes': ['pymysql', 'sqlalchemy', 'dateutil'], 'frameworks': LIBS}
extra_options = dict(app=APP, setup_requires=['py2app'], options={'py2app': OPTIONS})
elif sys.platform == 'win32':
sys.argv.append('py2exe')
from distutils.core import setup
APP = ['C:\Users\Jacob\Documents\ODMToolsPython\ODMTools.py']
import numpy
import py2exe
from glob import glob
data_files = [
("Microsoft.VC90.CRT", glob(r'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Microsoft.VC90.CRT\*.*')),
(r'mpl-data', [r'C:\Anaconda\envs\odmtools\Lib\site-packages\matplotlib\mpl-data\matplotlibrc']),
(r'mpl-data\images', glob(r'C:\Anaconda\envs\odmtools\Lib\site-packages\matplotlib\mpl-data\images\*.*')),
(r'mpl-data\fonts', glob(r'C:\Anaconda\envs\odmtools\Lib\site-packages\matplotlib\mpl-data\fonts\*.*'))]
OPTIONS = {
#'excludes': ['_ssl', 'pyreadline', 'difflib', 'doctest', 'optparse', 'pickle', 'calendar'],
"compressed": 1,
'dll_excludes': ['msvcr71.dll', 'OLEAUT32.dll', 'USER32.dll', 'IMM32.dll', 'SHELL32.dll',
'ole32.dll', 'ODBC32.dll', 'WSOCK32.dll', 'WINMM.dll', 'ADVAPI32.dll',
'MSVCP90.dll', 'WS2_32.dll', 'WINSPOOL.DRV', 'GDI32.dll', 'KERNEL32.dll',
'ntdll.dll', 'COMCTL32.dll', 'COMDLG32.dll', 'msvcrt.dll', 'RPCRT4.dll'],
"optimize": 2,
"bundle_files": 3,
"dist_dir": "dist",
"xref": False,
"skip_archive": False,
"ascii": False,
"custom_boot_script": '',
"packages": ['wx.lib.pubsub', 'ObjectListView', 'pyodbc'],
}
sys.path.append("C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Microsoft.VC90.CRT")
sys.path.append("C:\\Users\\Jacob\\Documents\\ODMToolsPython")
extra_options = dict(console=APP, data_files=data_files, options={'py2exe': OPTIONS})
setup(name=NAME, **extra_options)