-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
38 lines (32 loc) · 1.23 KB
/
setup.py
File metadata and controls
38 lines (32 loc) · 1.23 KB
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
"""
This file is used to generate standalone packaged "executables" for both
the Windows and OS X operating systems through use of py2exe and py2app
respectively
Usage:
python setup.py py2exe
OR
python setup.py py2app
"""
import sys
if sys.platform == "win32":
from distutils.core import setup
import py2exe
import matplotlib
setup(
windows=[{"script" : "find.py", "icon_resources": [(1, "find_white.ico")]}],
options={'py2exe': {'includes' : ['matplotlib.backends', 'matplotlib.figure', 'numpy', 'matplotlib.backends.backend_wxagg', 'scipy.stats'],
'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg', '_fltkagg', '_gtk', '_gtkcairo'],
'dll_excludes': ['libgdk-win32-2.0-0.dll', 'libgdk-pixbuf-2.0-0.dll', 'libgobject-2.0-0.dll']}
},
data_files=matplotlib.get_py2exe_datafiles()
)
if sys.platform == "darwin":
from setuptools import setup
DATA_FILES = []
OPTIONS = {'argv_emulation': False, 'iconfile': 'find_mac.icns'}
setup(
app=['find.py'],
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)