Show More
@@ -1,77 +1,77 b'' | |||
|
1 | 1 | #!/usr/bin/env python |
|
2 | 2 | # |
|
3 | 3 | # This is the mercurial setup script. |
|
4 | 4 | # |
|
5 | 5 | # './setup.py install', or |
|
6 | 6 | # './setup.py --help' for more options |
|
7 | 7 | |
|
8 | 8 | import sys |
|
9 | 9 | if not hasattr(sys, 'version_info') or sys.version_info < (2, 3, 0, 'final'): |
|
10 | 10 | raise SystemExit, "Mercurial requires python 2.3 or later." |
|
11 | 11 | |
|
12 | 12 | import os |
|
13 | 13 | from distutils.core import setup, Extension |
|
14 | 14 | from distutils.command.install_data import install_data |
|
15 | 15 | |
|
16 | 16 | import mercurial.version |
|
17 | 17 | import mercurial.demandimport |
|
18 | 18 | mercurial.demandimport.enable = lambda: None |
|
19 | 19 | |
|
20 | 20 | extra = {} |
|
21 | 21 | |
|
22 | 22 | # py2exe needs to be installed to work |
|
23 | 23 | try: |
|
24 | 24 | import py2exe |
|
25 | 25 | |
|
26 | 26 | # Help py2exe to find win32com.shell |
|
27 | 27 | try: |
|
28 | 28 | import modulefinder |
|
29 | 29 | import win32com |
|
30 | 30 | for p in win32com.__path__[1:]: # Take the path to win32comext |
|
31 | 31 | modulefinder.AddPackagePath("win32com", p) |
|
32 | 32 | pn = "win32com.shell" |
|
33 | 33 | __import__(pn) |
|
34 | 34 | m = sys.modules[pn] |
|
35 | 35 | for p in m.__path__[1:]: |
|
36 | 36 | modulefinder.AddPackagePath(pn, p) |
|
37 | 37 | except ImportError: |
|
38 | 38 | pass |
|
39 | 39 | |
|
40 | 40 | extra['console'] = ['hg'] |
|
41 | 41 | |
|
42 | 42 | except ImportError: |
|
43 | 43 | pass |
|
44 | 44 | |
|
45 | 45 | # specify version string, otherwise 'hg identify' will be used: |
|
46 | 46 | version = '' |
|
47 | 47 | |
|
48 | 48 | class install_package_data(install_data): |
|
49 | 49 | def finalize_options(self): |
|
50 | 50 | self.set_undefined_options('install', |
|
51 | 51 | ('install_lib', 'install_dir')) |
|
52 | 52 | install_data.finalize_options(self) |
|
53 | 53 | |
|
54 | 54 | mercurial.version.remember_version(version) |
|
55 | 55 | cmdclass = {'install_data': install_package_data} |
|
56 | 56 | |
|
57 | 57 | setup(name='mercurial', |
|
58 | 58 | version=mercurial.version.get_version(), |
|
59 | 59 | author='Matt Mackall', |
|
60 | 60 | author_email='mpm@selenic.com', |
|
61 | 61 | url='http://selenic.com/mercurial', |
|
62 | 62 | description='Scalable distributed SCM', |
|
63 | 63 | license='GNU GPL', |
|
64 | packages=['mercurial', 'mercurial.hgweb', 'hgext'], | |
|
64 | packages=['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert'], | |
|
65 | 65 | ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']), |
|
66 | 66 | Extension('mercurial.bdiff', ['mercurial/bdiff.c']), |
|
67 | 67 | Extension('mercurial.base85', ['mercurial/base85.c'])], |
|
68 | 68 | data_files=[(os.path.join('mercurial', root), |
|
69 | 69 | [os.path.join(root, file_) for file_ in files]) |
|
70 | 70 | for root, dirs, files in os.walk('templates')], |
|
71 | 71 | cmdclass=cmdclass, |
|
72 | 72 | scripts=['hg', 'hgmerge'], |
|
73 | 73 | options=dict(bdist_mpkg=dict(zipdist=True, |
|
74 | 74 | license='COPYING', |
|
75 | 75 | readme='contrib/macosx/Readme.html', |
|
76 | 76 | welcome='contrib/macosx/Welcome.html')), |
|
77 | 77 | **extra) |
General Comments 0
You need to be logged in to leave comments.
Login now