-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
55 lines (48 loc) · 1.91 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
#!/usr/bin/env python
import os, sys, glob
from distutils.core import setup
import py2exe
# If run without args, build executables, in quiet mode.
if len(sys.argv) == 1:
sys.argv.append("py2exe")
#sys.argv.append("-q")
def files(folder):
for path in glob.glob(folder+'/*'):
if os.path.isfile(path):
yield path
## changed from Pmw to Tix (because Pmw was never working with Py2Exe
## .. and also ported from Python 2.4 to 2.5.
#data_files=[
# ('pmw', files(sys.prefix+'/lib/site-packages/pmw')),
# ('pmw/pwm_1_2', files(sys.prefix+'/lib/site-packages/pmw/pmw_1_2')),
# ('pmw/pwm_1_2/bin', files(sys.prefix+'/lib/site-packages/pmw/pmw_1_2/bin')),
# ('pmw/pwm_1_2/contrib', files(sys.prefix+'/lib/site-packages/pmw/pmw_1_2/contrib')),
# ('pmw/pwm_1_2/bin', files(sys.prefix+'/lib/site-packages/pmw/pmw_1_2/lib')),
# ],
#
#opts = { "py2exe": { "optimize": 1, } }
# for old Tix 8.1 coming with ActivePython 2.4
#data_files=[
# ('.', glob.glob(sys.prefix+'/DLLs/tix81*.dll')),
# ('tcl/tix8.1', files(sys.prefix+'/tcl/tix8.1')),
# ('tcl/tix8.1/bitmaps', files(sys.prefix+'/tcl/tix8.1/bitmaps')),
# ('tcl/tix8.1/pref', files(sys.prefix+'/tcl/tix8.1/pref')),
#]
# pathes set for ActivePython 2.5
data_files=[
('.', glob.glob(sys.prefix+'/DLLs/tix84*.dll')),
('tcl/tix8.4.3', files(sys.prefix+'/tcl/tix8.4.3')),
('tcl/tix8.4.3/bitmaps', files(sys.prefix+'/tcl/tix8.4.3/bitmaps')),
('tcl/tix8.4.3/pref', files(sys.prefix+'/tcl/tix8.4.3/pref'))
]
opts = {'py2exe': {'packages': ['encodings', 'Tix', 'Tkinter'],
'bundle_files':3,}} # not works bundled (1), set back to default (3)
# build the end user version
setup(name='Distribute',
version='5.1',
data_files = data_files,
#script_args=['py2exe'],
windows=["Distribute.py"],
options = opts,
#CRASHES with: zipfile = None, # use with bundle_files==1 for single exe (quick app startup)
)