-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup_windows.py
135 lines (108 loc) · 3.72 KB
/
setup_windows.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# This file based on the example by Thomas Lecocq at
# http://www.geophysique.be/2011/08/01/pack-an-enthought-traits-app-inside-a-exe-using-py2exe-ets-4-0-edit/
# retrieved 2013-04-05
from distutils.core import setup
import enable
import matplotlib as mpl
import os
import py2exe
import pyface
import traitsui
import zmq
#os.environ["PATH"] = \
# os.environ["PATH"] + os.path.pathsep + os.path.split(zmq.__file__)[0]
exec(open('version.py').read())
includes = []
includes.append('numpy')
includes.append('numpy.core')
includes.append('scipy')
includes.append('scipy.special._ufuncs_cxx')
includes.append('scipy.sparse.csgraph._validation')
includes.append('logging')
includes.append('traits')
includes.append('traits.etsconfig.api.*')
includes.append('traitsui')
includes.append('traitsui.qt4')
includes.append('traitsui.qt4.*')
includes.append('traitsui.editors')
includes.append('traitsui.editors.*')
includes.append('traitsui.extras')
includes.append('traitsui.extras.*')
includes.append('traitsui.menu')
includes.append('traitsui.menu.*')
includes.append('kiva')
includes.append('PySide')
includes.append('PySide.*')
includes.append('PySide.QtGui.*')
includes.append('pyface')
includes.append('pyface.*')
includes.append('pyface.ui.qt4.*')
includes.append('pyface.ui.qt4.init')
includes.append('pyface.ui.qt4.action.*')
includes.append('pyface.ui.qt4.timer.*')
includes.append('pyface.ui.qt4.wizard.*')
includes.append('pyface.ui.qt4.workbench.*')
includes.append('pyface.qt.*')
includes.append('pyface.qt.QtGui.*')
includes.append('enable')
includes.append('enable.drawing')
includes.append('enable.tools')
includes.append('enable.qt4')
includes.append('enable.qt4.*')
includes.append('mpl_toolkits')
includes.append('mpl_toolkits.mplot3d')
includes.append('pandas')
excludes=['wx',
'Tkinter',
'traitsui.wx',
'_ssl',
'IPython',
'pyreadline',
'doctest',
'optparse',
'sqlite3',
'multiprocessing',
'tornado',
'tcl',
'nose']
packages = []
data_folders = []
data_folders.append( ( os.path.join(enable.__path__[0], 'images'), r'enable\images' ) )
data_folders.append( ( os.path.join(pyface.__path__[0], 'images'), r'pyface\images' ) )
data_folders.append( ( os.path.join(pyface.__path__[0], 'dock/images'), r'pyface\dock\images' ) )
data_folders.append( ( os.path.join(pyface.__path__[0], 'ui/qt4/images'), r'pyface\ui\qt4\images' ) )
data_folders.append( ( os.path.join(traitsui.__path__[0], 'image/library'), r'traitsui\image\library' ) )
data_folders.append( ( r'bin', r'bin' ) )
data_files = mpl.get_py2exe_datafiles()
# Parsing folders and building the data_files table
for folder, relative_path in data_folders:
for file in os.listdir(folder):
f1 = os.path.join(folder,file)
if os.path.isfile(f1): # skip directories
f2 = relative_path, [f1]
data_files.append(f2)
# data_files.append((r'enable', [os.path.join(ETS_folder, r'enable\images.zip')]))
setup(windows = [
{"script": 'app.py',
"icon_resources":[(0,"pdviper_icon.ico")],
"dest_base":"PDViPeR"}],
author = "Kieran Spear, Gary Ruben, Lenneke Jong",
author_email = '[email protected]',
version = __version__,
description = "PDViPeR",
name = "PDViPeR",
options = {"py2exe":
{ "optimize": 0,
"packages": packages,
"includes": includes,
"excludes": excludes,
"dll_excludes": ["MSVCP90.dll", "w9xpopen.exe"],
"dist_dir": 'dist',
"bundle_files":2,
"xref": False,
"skip_archive": True,
"ascii": False,
"custom_boot_script": '',
"compressed":False,
},},
data_files=data_files)