- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
86 lines (77 loc) · 2.78 KB
/
Copy pathsetup.py
File metadata and controls
86 lines (77 loc) · 2.78 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
importtime
importsys
buildservice=True
if'--no-service'insys.argv[1:]:
buildservice=False
sys.argv= [kforkinsys.argvifk!='--no-service']
printsys.argv
fromdistutils.coreimportsetup
importos
importpy2exe
importglob
importshutil
sys.path.insert(0,os.getcwd())
defgetFiles(dir):
"""
Return a tuple of dir
"""
# dig looking for files
a=os.walk(dir)
b=True
filenames= []
while (b):
try:
(dirpath, dirnames, files) =a.next()
filenames.append([dirpath, tuple(files)])
except:
b=False
returnfilenames
DESCRIPTION='TCP/IP to COM daemon'
NAME='IGpython HTTP2CCOM Service'
classTarget:
def__init__(self,**kw):
self.__dict__.update(kw)
self.version="1.00.00"
self.compay_name="IGPython"
self.copyright="(c) 2013, Dairon Medina"
self.name=NAME
self.description=DESCRIPTION
my_com_server_target=Target(
description=DESCRIPTION,
service= ["service_module"],
modules= ["service_module"],
create_exe=True,
create_dll=True)
ifnotbuildservice:
print'Compiling Executable...'
time.sleep(2)
setup(
name=NAME ,
description=DESCRIPTION,
version='1.00.00',
console= ['pos.py'],
zipfile=None,
options= {
"py2exe":{"packages":"encodings",
"includes":"win32com,win32service,win32serviceutil,win32event",
"optimize": '2'
},
},
)
else:
print'Compiling Windows Service...'
time.sleep(2)
setup(
name=NAME,
description=DESCRIPTION,
version='1.00.00',
service= [{'modules':["IGPythonService"], 'cmdline':'pywin32'}],
zipfile=None,
options= {
"py2exe":{"packages":"encodings",
"includes":"win32com,win32service,win32serviceutil,win32event",
"optimize": '2'
},
},
data_files=[("config",["config/settings.conf",])]
)