Show More
@@ -28,8 +28,15 b' def get_version():' | |||
|
28 | 28 | |
|
29 | 29 | def write_version(version): |
|
30 | 30 | """Overwrite version file.""" |
|
31 | filename = os.path.join(os.path.dirname(__file__), '__version__.py') | |
|
32 | f = open(filename, 'w') | |
|
31 | if version == get_version(): | |
|
32 | return | |
|
33 | directory = os.path.dirname(__file__) | |
|
34 | for suffix in ['py', 'pyc', 'pyo']: | |
|
35 | try: | |
|
36 | os.unlink(os.path.join(directory, '__version__.%s' % suffix)) | |
|
37 | except OSError: | |
|
38 | pass | |
|
39 | f = open(os.path.join(directory, '__version__.py'), 'w') | |
|
33 | 40 | f.write("# This file is auto-generated.\n") |
|
34 | 41 | f.write("version = %r\n" % version) |
|
35 | 42 | f.close() |
@@ -72,35 +72,32 b' class install_package_data(install_data)' | |||
|
72 | 72 | ('install_lib', 'install_dir')) |
|
73 | 73 | install_data.finalize_options(self) |
|
74 | 74 | |
|
75 | try: | |
|
76 | mercurial.version.remember_version(version) | |
|
77 | cmdclass = {'install_data': install_package_data} | |
|
78 | py2exe_opts = {} | |
|
79 | if py2exe_for_demandload is not None: | |
|
80 | cmdclass['py2exe'] = py2exe_for_demandload | |
|
81 | py2exe_opts['console'] = ['hg'] | |
|
82 | setup(name='mercurial', | |
|
83 | version=mercurial.version.get_version(), | |
|
84 | author='Matt Mackall', | |
|
85 |
|
|
|
86 | url='http://selenic.com/mercurial', | |
|
87 | description='Scalable distributed SCM', | |
|
88 | license='GNU GPL', | |
|
89 | packages=['mercurial', 'hgext'], | |
|
90 |
|
|
|
91 | Extension('mercurial.bdiff', ['mercurial/bdiff.c'])], | |
|
92 | data_files=[('mercurial/templates', | |
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 | glob.glob('templates/static/*'))], | |
|
98 | cmdclass=cmdclass, | |
|
99 | scripts=['hg', 'hgmerge'], | |
|
100 | options=dict(bdist_mpkg=dict(zipdist=True, | |
|
101 |
|
|
|
102 |
|
|
|
103 | welcome='contrib/macosx/Welcome.html')), | |
|
104 | **py2exe_opts) | |
|
105 | finally: | |
|
106 | mercurial.version.forget_version() | |
|
75 | mercurial.version.remember_version(version) | |
|
76 | cmdclass = {'install_data': install_package_data} | |
|
77 | py2exe_opts = {} | |
|
78 | if py2exe_for_demandload is not None: | |
|
79 | cmdclass['py2exe'] = py2exe_for_demandload | |
|
80 | py2exe_opts['console'] = ['hg'] | |
|
81 | setup(name='mercurial', | |
|
82 | version=mercurial.version.get_version(), | |
|
83 | author='Matt Mackall', | |
|
84 | author_email='mpm@selenic.com', | |
|
85 | url='http://selenic.com/mercurial', | |
|
86 | description='Scalable distributed SCM', | |
|
87 | license='GNU GPL', | |
|
88 | packages=['mercurial', 'hgext'], | |
|
89 | ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']), | |
|
90 | Extension('mercurial.bdiff', ['mercurial/bdiff.c'])], | |
|
91 | data_files=[('mercurial/templates', | |
|
92 | ['templates/map'] + | |
|
93 | glob.glob('templates/map-*') + | |
|
94 | glob.glob('templates/*.tmpl')), | |
|
95 | ('mercurial/templates/static', | |
|
96 | glob.glob('templates/static/*'))], | |
|
97 | cmdclass=cmdclass, | |
|
98 | scripts=['hg', 'hgmerge'], | |
|
99 | options=dict(bdist_mpkg=dict(zipdist=True, | |
|
100 | license='COPYING', | |
|
101 | readme='contrib/macosx/Readme.html', | |
|
102 | welcome='contrib/macosx/Welcome.html')), | |
|
103 | **py2exe_opts) |
General Comments 0
You need to be logged in to leave comments.
Login now