diff 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
line wrap: on
line diff
--- a/setup.py	Sun Mar 19 14:53:58 2006 +0100
+++ b/setup.py	Sun Mar 19 21:26:58 2006 +0100
@@ -72,35 +72,32 @@
                                    ('install_lib', 'install_dir'))
         install_data.finalize_options(self)
 
-try:
-    mercurial.version.remember_version(version)
-    cmdclass = {'install_data': install_package_data}
-    py2exe_opts = {}
-    if py2exe_for_demandload is not None:
-        cmdclass['py2exe'] = py2exe_for_demandload
-        py2exe_opts['console'] = ['hg']
-    setup(name='mercurial',
-          version=mercurial.version.get_version(),
-          author='Matt Mackall',
-          author_email='mpm@selenic.com',
-          url='http://selenic.com/mercurial',
-          description='Scalable distributed SCM',
-          license='GNU GPL',
-          packages=['mercurial', 'hgext'],
-          ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']),
-                       Extension('mercurial.bdiff', ['mercurial/bdiff.c'])],
-          data_files=[('mercurial/templates',
-                       ['templates/map'] +
-                       glob.glob('templates/map-*') +
-                       glob.glob('templates/*.tmpl')),
-                      ('mercurial/templates/static',
-                       glob.glob('templates/static/*'))],
-          cmdclass=cmdclass,
-          scripts=['hg', 'hgmerge'],
-          options=dict(bdist_mpkg=dict(zipdist=True,
-                                       license='COPYING',
-                                       readme='contrib/macosx/Readme.html',
-                                       welcome='contrib/macosx/Welcome.html')),
-          **py2exe_opts)
-finally:
-    mercurial.version.forget_version()
+mercurial.version.remember_version(version)
+cmdclass = {'install_data': install_package_data}
+py2exe_opts = {}
+if py2exe_for_demandload is not None:
+    cmdclass['py2exe'] = py2exe_for_demandload
+    py2exe_opts['console'] = ['hg']
+setup(name='mercurial',
+        version=mercurial.version.get_version(),
+        author='Matt Mackall',
+        author_email='mpm@selenic.com',
+        url='http://selenic.com/mercurial',
+        description='Scalable distributed SCM',
+        license='GNU GPL',
+        packages=['mercurial', 'hgext'],
+        ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']),
+                    Extension('mercurial.bdiff', ['mercurial/bdiff.c'])],
+        data_files=[('mercurial/templates',
+                    ['templates/map'] +
+                    glob.glob('templates/map-*') +
+                    glob.glob('templates/*.tmpl')),
+                    ('mercurial/templates/static',
+                    glob.glob('templates/static/*'))],
+        cmdclass=cmdclass,
+        scripts=['hg', 'hgmerge'],
+        options=dict(bdist_mpkg=dict(zipdist=True,
+                                    license='COPYING',
+                                    readme='contrib/macosx/Readme.html',
+                                    welcome='contrib/macosx/Welcome.html')),
+        **py2exe_opts)