Kiln » Kiln Storage Service Read More
Clone URL:  
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
58
59
60
61
62
63
64
65
66
67
68
# Copyright (C) 2009-2010 by Fog Creek Software. All rights reserved. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. from distutils.core import setup import py2exe import sys class Target: def __init__(self, **kwargs): self.__dict__.update(kwargs) kilnservice = Target( description='Kiln Storage Service', company_name='Fog Creek Software', copyright='Copyright (c) 2009-2010 Fog Creek Software. All rights reserved', name='KilnStorageService', cmdline_style='pywin32', modules=['backend']) # list of DLLs that need to be excluded from the bundle dll_excludes = [ 'POWRPROF.dll', 'API-MS-Win-Core-Interlocked-L1-1-0.dll', 'API-MS-Win-Core-SysInfo-L1-1-0.dll', 'API-MS-Win-Core-Localization-L1-1-0.dll', 'API-MS-Win-Core-Misc-L1-1-0.dll', 'API-MS-Win-Core-LibraryLoader-L1-1-0.dll', 'API-MS-Win-Core-Handle-L1-1-0.dll', 'API-MS-Win-Core-Profile-L1-1-0.dll', 'API-MS-Win-Core-Memory-L1-1-0.dll', 'API-MS-Win-Core-Synch-L1-1-0.dll', 'API-MS-Win-Core-IO-L1-1-0.dll', 'API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll', 'API-MS-Win-Core-ErrorHandling-L1-1-0.dll', 'MSWSOCK.dll', 'API-MS-Win-Core-ProcessThreads-L1-1-0.dll', 'API-MS-Win-Core-Debug-L1-1-0.dll', 'API-MS-Win-Core-String-L1-1-0.dll', 'API-MS-Win-Security-Base-L1-1-0.dll', 'API-MS-Win-Core-LocalRegistry-L1-1-0.dll', 'API-MS-Win-Core-DelayLoad-L1-1-0.dll' ] # follow Mercurial's lead for making py2exe find pywin32 import modulefinder import win32com for p in win32com.__path__[1:]: # Take the path to win32comext modulefinder.AddPackagePath("win32com", p) pn = "win32com.shell" __import__(pn) m = sys.modules[pn] for p in m.__path__[1:]: modulefinder.AddPackagePath(pn, p) setup(service = [kilnservice], options = { 'py2exe': { 'bundle_files': '1', 'dll_excludes': dll_excludes, 'packages': ['email', 'pygments'], 'includes': ['wsgiserver'], 'optimize': '2', }, }, )