-
Notifications
You must be signed in to change notification settings - Fork 17
/
py2exe_setup.py
57 lines (49 loc) · 1.2 KB
/
py2exe_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
56
57
#run this from the command line: python py2exe_setup.py py2exe
from distutils.core import setup
import os
import shutil
import py2exe
script_name = "f-engrave.py"
icon_name = "fengrave.ico"
fileName, fileExtension = os.path.splitext(script_name)
console_name = fileName+"_c"+fileExtension
shutil.copyfile(script_name,console_name)
setup(
options = {
"py2exe":
{
"dll_excludes": ["crypt32.dll","MSVCP90.dll"],
#%"excludes": ["numpy"],
"compressed": 0, "optimize": 0,
"includes": ["numbers"],
#"includes": ["lxml.etree", "lxml._elementpath", "gzip"],
}
},
zipfile = None,
windows=[
{
"script": script_name,
"icon_resources":[(0,icon_name),(1,icon_name)]
}
],
)
setup(
options = {
"py2exe":
{
"dll_excludes": ["crypt32.dll","MSVCP90.dll"],
#%"excludes": ["numpy"],
"compressed": 0, "optimize": 0,
"includes": ["numbers"],
#"includes": ["lxml.etree", "lxml._elementpath", "gzip"],
}
},
zipfile = None,
console=[
{
"script": console_name,
"icon_resources":[(0,icon_name),(1,icon_name)]
}
],
)
os.remove(console_name)