setup.py
changeset 3890 2eec996f2fb9
parent 3887 57b797601b61
child 3892 d6cc510dfe5e
equal deleted inserted replaced
3889:a0b18a8e0460 3890:2eec996f2fb9
    32             modulefinder.AddPackagePath(pn, p)
    32             modulefinder.AddPackagePath(pn, p)
    33     except ImportError:
    33     except ImportError:
    34         pass
    34         pass
    35 
    35 
    36 except ImportError:
    36 except ImportError:
    37     py2exe_for_demandload = None
    37     pass
    38 
       
    39 
    38 
    40 # specify version string, otherwise 'hg identify' will be used:
    39 # specify version string, otherwise 'hg identify' will be used:
    41 version = ''
    40 version = ''
    42 
    41 
    43 class install_package_data(install_data):
    42 class install_package_data(install_data):
    46                                    ('install_lib', 'install_dir'))
    45                                    ('install_lib', 'install_dir'))
    47         install_data.finalize_options(self)
    46         install_data.finalize_options(self)
    48 
    47 
    49 mercurial.version.remember_version(version)
    48 mercurial.version.remember_version(version)
    50 cmdclass = {'install_data': install_package_data}
    49 cmdclass = {'install_data': install_package_data}
    51 py2exe_opts = {}
       
    52 if py2exe_for_demandload is not None:
       
    53     cmdclass['py2exe'] = py2exe_for_demandload
       
    54     py2exe_opts['console'] = ['hg']
       
    55 
    50 
    56 setup(name='mercurial',
    51 setup(name='mercurial',
    57       version=mercurial.version.get_version(),
    52       version=mercurial.version.get_version(),
    58       author='Matt Mackall',
    53       author='Matt Mackall',
    59       author_email='mpm@selenic.com',
    54       author_email='mpm@selenic.com',
    71       scripts=['hg', 'hgmerge'],
    66       scripts=['hg', 'hgmerge'],
    72       options=dict(bdist_mpkg=dict(zipdist=True,
    67       options=dict(bdist_mpkg=dict(zipdist=True,
    73                                    license='COPYING',
    68                                    license='COPYING',
    74                                    readme='contrib/macosx/Readme.html',
    69                                    readme='contrib/macosx/Readme.html',
    75                                    welcome='contrib/macosx/Welcome.html')),
    70                                    welcome='contrib/macosx/Welcome.html')),
    76       **py2exe_opts)
    71       console=['hg'])