comparison setup.py @ 1977:7eb694a1c1af

Don't forget version at the end of setup.py, write it only if changed. This fixes issue159: "python setup.py install" shouldn't write new files in the working dir if one has done "python setup.py build" first.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 19 Mar 2006 21:26:58 +0100
parents 205f04b04ec6
children b832b6eb65ab c58a403aa830
comparison
equal deleted inserted replaced
1976:df8416346bb7 1977:7eb694a1c1af
70 def finalize_options(self): 70 def finalize_options(self):
71 self.set_undefined_options('install', 71 self.set_undefined_options('install',
72 ('install_lib', 'install_dir')) 72 ('install_lib', 'install_dir'))
73 install_data.finalize_options(self) 73 install_data.finalize_options(self)
74 74
75 try: 75 mercurial.version.remember_version(version)
76 mercurial.version.remember_version(version) 76 cmdclass = {'install_data': install_package_data}
77 cmdclass = {'install_data': install_package_data} 77 py2exe_opts = {}
78 py2exe_opts = {} 78 if py2exe_for_demandload is not None:
79 if py2exe_for_demandload is not None: 79 cmdclass['py2exe'] = py2exe_for_demandload
80 cmdclass['py2exe'] = py2exe_for_demandload 80 py2exe_opts['console'] = ['hg']
81 py2exe_opts['console'] = ['hg'] 81 setup(name='mercurial',
82 setup(name='mercurial', 82 version=mercurial.version.get_version(),
83 version=mercurial.version.get_version(), 83 author='Matt Mackall',
84 author='Matt Mackall', 84 author_email='mpm@selenic.com',
85 author_email='mpm@selenic.com', 85 url='http://selenic.com/mercurial',
86 url='http://selenic.com/mercurial', 86 description='Scalable distributed SCM',
87 description='Scalable distributed SCM', 87 license='GNU GPL',
88 license='GNU GPL', 88 packages=['mercurial', 'hgext'],
89 packages=['mercurial', 'hgext'], 89 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']),
90 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']), 90 Extension('mercurial.bdiff', ['mercurial/bdiff.c'])],
91 Extension('mercurial.bdiff', ['mercurial/bdiff.c'])], 91 data_files=[('mercurial/templates',
92 data_files=[('mercurial/templates', 92 ['templates/map'] +
93 ['templates/map'] + 93 glob.glob('templates/map-*') +
94 glob.glob('templates/map-*') + 94 glob.glob('templates/*.tmpl')),
95 glob.glob('templates/*.tmpl')), 95 ('mercurial/templates/static',
96 ('mercurial/templates/static', 96 glob.glob('templates/static/*'))],
97 glob.glob('templates/static/*'))], 97 cmdclass=cmdclass,
98 cmdclass=cmdclass, 98 scripts=['hg', 'hgmerge'],
99 scripts=['hg', 'hgmerge'], 99 options=dict(bdist_mpkg=dict(zipdist=True,
100 options=dict(bdist_mpkg=dict(zipdist=True, 100 license='COPYING',
101 license='COPYING', 101 readme='contrib/macosx/Readme.html',
102 readme='contrib/macosx/Readme.html', 102 welcome='contrib/macosx/Welcome.html')),
103 welcome='contrib/macosx/Welcome.html')), 103 **py2exe_opts)
104 **py2exe_opts)
105 finally:
106 mercurial.version.forget_version()