changeset 1284:59d07a6bd513

Fix Volker's modifications to setup.py for non-Windows systems.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 20 Sep 2005 21:29:07 -0700
parents f5faab34f32e
children 1546c2aa6b30
files setup.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Tue Sep 20 19:25:14 2005 -0700
+++ b/setup.py	Tue Sep 20 21:29:07 2005 -0700
@@ -36,7 +36,8 @@
                 self.includes = []
             self.includes += mercurial.packagescan.getmodules(self.build_lib,'mercurial')
             build_exe.finalize_options(self)
-except ImportError: pass
+except ImportError:
+    py2exe_for_demandload = None
 
 
 # specify version string, otherwise 'hg identify' will be used:
@@ -50,6 +51,9 @@
 
 try:
     mercurial.version.remember_version(version)
+    cmdclass = {'install_data': install_package_data}
+    if py2exe_for_demandload is not None:
+        cmdclass['py2exe'] = py2exe_for_demandload
     setup(name='mercurial',
           version=mercurial.version.get_version(),
           author='Matt Mackall',
@@ -64,8 +68,7 @@
                        ['templates/map'] +
                        glob.glob('templates/map-*') +
                        glob.glob('templates/*.tmpl'))],
-          cmdclass = { 'install_data' : install_package_data,
-                       'py2exe' : py2exe_for_demandload},
+          cmdclass=cmdclass,
           scripts=['hg', 'hgmerge'],
           console = ['hg'])
 finally: