-
Notifications
You must be signed in to change notification settings - Fork 7
/
pack.py
56 lines (55 loc) · 1.46 KB
/
pack.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
#Used successfully in PythonXY2.7.3 with py2exe ,wxPython 2.8.12 and matplotlib 1.2.0
from distutils.core import setup
import matplotlib
import py2exe
#----------------------------------------------------------------------------
includes=[
"sip",
"FileDialog",
"matplotlib",
"matplotlib.backends",
"matplotlib.figure",
"pylab",
"numpy",
"matplotlib.backends.backend_tkagg",
"matplotlib.backends.backend_wxagg",
]
#----------------------------------------------------------------------------
excludes=['_gtkagg',
'_tkagg',
'_agg2',
'_cairo',
'_cocoaagg',
'_fltkagg',
'_gtk',
'_gtkcairo']
#----------------------------------------------------------------------------
dll_excludes=['libgdk-win32-2.0-0.dll',
'libgobject-2.0-0.dll']
#----------------------------------------------------------------------------
options= {
'py2exe':{
"includes" : includes,
'excludes':excludes,
'dll_excludes':dll_excludes
}
}
#----------------------------------------------------------------------------
data_files=matplotlib.get_py2exe_datafiles()
#----------------------------------------------------------------------------
#for windows program
windows=[
{"script": "autofp.py"},
]
#----------------------------------------------------------------------------
#for console program
console = [
{"script": "shautofp.py"}
]
#----------------------------------------------------------------------------
setup(
windows=windows,
console=console,
options=options,
data_files=data_files
)