forked from richardor/ffown
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
63 lines (48 loc) · 1.82 KB
/
setup.py
File metadata and controls
63 lines (48 loc) · 1.82 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
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
from distutils.core import setup
import py2exe
#setup(windows=[{"script" : "main.py"}], options={"py2exe" : {"includes" : ["sip", "PyQt4._qt"]}})
from distutils.core import setup
import py2exe
# Now you need to pass arguments to setup
# windows is a list of scripts that have their own UI and
# thus don't need to run in a console.
setup(windows=['main.py'],
options={
# And now, configure py2exe by passing more options;
'py2exe': {
# This is magic: if you don't add these, your .exe may
# or may not work on older/newer versions of windows.
"dll_excludes": [
"MSVCP90.dll",
"MSWSOCK.dll",
"mswsock.dll",
"powrprof.dll",
"python27"
],
# Py2exe will not figure out that you need these on its own.
# You may need one, the other, or both.
'includes': [
'sip',
'PyQt4.QtNetwork',
'PyQt4._qt',
],
# Optional: make one big exe with everything in it, or
# a folder with many things in it. Your choice
# 'bundle_files': 1,
}
},
# Qt's dynamically loaded plugins and py2exe really don't
# get along.
data_files = [
('phonon_backend', [
'C:\Python27\Lib\site-packages\PyQt4\plugins\phonon_backend\phonon_ds94.dll'
]),
('imageplugins', [
'c:\Python27\lib\site-packages\PyQt4\plugins\imageformats\qgif4.dll',
'c:\Python27\lib\site-packages\PyQt4\plugins\imageformats\qjpeg4.dll',
'c:\Python27\lib\site-packages\PyQt4\plugins\imageformats\qsvg4.dll',
]),
],
# If you choose the bundle above, you may want to use this, too.
# zipfile=None,
)