forked from visionegg/visionegg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-win-exe-demos.py
executable file
·75 lines (67 loc) · 2.43 KB
/
build-win-exe-demos.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
# In addition to running this script, there are additional things that
# must be done to build the binary demos:
# For the demos to find the font file, we modify
# site-packages/VisionEgg/Text.py to include r'.\freesansbold.ttf' as
# the default font. (in Text.__init__
# self.font = pygame.font.Font(r'.\freesansbold.ttf',cp.font_size)
# In VisionEgg.cfg, set VISIONEGG_LOG_TO_STDERR = 0.
import sys
import setup # our setup.py file
import distutils.core
import py2exe
numarray_includes=['numarray.libnumarray',
'numarray.memory',
'numarray._bytes',
'numarray._chararray',
'numarray._conv',
'numarray._converter',
'numarray._ndarray',
'numarray._numarray',
'numarray._operator',
'numarray._sort',
'numarray._ufunc',
'numarray._ufuncBool',
'numarray._ufuncComplex32',
'numarray._ufuncComplex64',
'numarray._ufuncFloat32',
'numarray._ufuncFloat64',
'numarray._ufuncInt16',
'numarray._ufuncInt32',
'numarray._ufuncInt64',
'numarray._ufuncInt8',
'numarray._ufuncUInt16',
'numarray._ufuncUInt32',
'numarray._ufuncUInt64',
'numarray._ufuncUInt8',
]
tk_excludes=[
'Tkconstants',
'Tkinter',
'tcl',
]
import sys, os, glob
windowed_scripts = glob.glob(r'demo\*.py')
data_files = []
for d in setup.data_files:
todir = d[0]
source = d[1]
todir = os.path.normpath(todir.replace( 'VisionEgg','.'))
source = [s for s in source if not s.endswith('.py')] # don't include .py files
data_files.append( (todir,source) )
# include pygame font
data_files.append( ('.',[os.path.join(sys.prefix,
'lib','site-packages','pygame','freesansbold.ttf'),
]))
print data_files
console_scripts = ['check-config.py']
#1/0
distutils.core.setup(
windows=windowed_scripts,
console=console_scripts,
data_files=data_files,
options={"py2exe":{"optimize":2,
"includes":numarray_includes,
#"excludes":tk_excludes,
"dll_excludes": ["glut32.dll"],
},},
)