0

changes for py2exe

This commit is contained in:
Andrew Chin
2011-01-08 16:09:01 -05:00
parent ad9756fa8c
commit 521a359139

View File

@@ -4,6 +4,7 @@ from distutils.command.clean import clean
from distutils.dir_util import remove_tree from distutils.dir_util import remove_tree
from distutils import log from distutils import log
import os, os.path import os, os.path
import glob
try: try:
import py2exe import py2exe
@@ -24,15 +25,16 @@ setup_kwargs['cmdclass'] = {}
if py2exe != None: if py2exe != None:
setup_kwargs['console'] = ['gmap.py'] setup_kwargs['console'] = ['gmap.py']
setup_kwargs['data_files'] = [('textures', ['textures/lava.png', 'textures/water.png']), setup_kwargs['data_files'] = [('textures', ['textures/lava.png', 'textures/water.png']),
('', ['template.html'])] ('', ['config.js', 'COPYING.txt', 'README.rst']),
('web_assets', glob.glob('web_assets/*'))]
setup_kwargs['zipfile'] = None setup_kwargs['zipfile'] = None
setup_kwargs['options']['py2exe'] = {'bundle_files' : 1} setup_kwargs['options']['py2exe'] = {'bundle_files' : 1, 'excludes': 'Tkinter'}
# #
# _composite.c extension # _composite.c extension
# #
setup_kwargs['ext_modules'].append(Extension('_composite', ['_composite.c'], include_dirs=['.'])) setup_kwargs['ext_modules'].append(Extension('_composite', ['_composite.c'], include_dirs=['.'], extra_link_args=["/MANIFEST"]))
# tell build_ext to build the extension in-place # tell build_ext to build the extension in-place
# (NOT in build/) # (NOT in build/)
setup_kwargs['options']['build_ext'] = {'inplace' : 1} setup_kwargs['options']['build_ext'] = {'inplace' : 1}