Mercurial > hg
comparison setup.py @ 3897:7034020aeaf9
merge with main
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 15 Dec 2006 05:38:54 +0100 |
parents | d6cc510dfe5e |
children | 070628929e1f |
comparison
equal
deleted
inserted
replaced
3896:3b628b5da9e9 | 3897:7034020aeaf9 |
---|---|
12 import os | 12 import os |
13 from distutils.core import setup, Extension | 13 from distutils.core import setup, Extension |
14 from distutils.command.install_data import install_data | 14 from distutils.command.install_data import install_data |
15 | 15 |
16 import mercurial.version | 16 import mercurial.version |
17 import mercurial.demandimport | |
18 mercurial.demandimport.enable = lambda: None | |
17 | 19 |
18 # py2exe needs to be installed to work | 20 # py2exe needs to be installed to work |
19 try: | 21 try: |
20 import py2exe | 22 import py2exe |
21 | 23 |
32 modulefinder.AddPackagePath(pn, p) | 34 modulefinder.AddPackagePath(pn, p) |
33 except ImportError: | 35 except ImportError: |
34 pass | 36 pass |
35 | 37 |
36 except ImportError: | 38 except ImportError: |
37 py2exe_for_demandload = None | 39 pass |
38 | |
39 | 40 |
40 # specify version string, otherwise 'hg identify' will be used: | 41 # specify version string, otherwise 'hg identify' will be used: |
41 version = '' | 42 version = '' |
42 | 43 |
43 class install_package_data(install_data): | 44 class install_package_data(install_data): |
46 ('install_lib', 'install_dir')) | 47 ('install_lib', 'install_dir')) |
47 install_data.finalize_options(self) | 48 install_data.finalize_options(self) |
48 | 49 |
49 mercurial.version.remember_version(version) | 50 mercurial.version.remember_version(version) |
50 cmdclass = {'install_data': install_package_data} | 51 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 | 52 |
56 setup(name='mercurial', | 53 setup(name='mercurial', |
57 version=mercurial.version.get_version(), | 54 version=mercurial.version.get_version(), |
58 author='Matt Mackall', | 55 author='Matt Mackall', |
59 author_email='mpm@selenic.com', | 56 author_email='mpm@selenic.com', |
71 scripts=['hg', 'hgmerge'], | 68 scripts=['hg', 'hgmerge'], |
72 options=dict(bdist_mpkg=dict(zipdist=True, | 69 options=dict(bdist_mpkg=dict(zipdist=True, |
73 license='COPYING', | 70 license='COPYING', |
74 readme='contrib/macosx/Readme.html', | 71 readme='contrib/macosx/Readme.html', |
75 welcome='contrib/macosx/Welcome.html')), | 72 welcome='contrib/macosx/Welcome.html')), |
76 **py2exe_opts) | 73 console=['hg']) |