# 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',
},
},
)
|
Loading...