--- a/setup.py Fri Jun 17 20:37:23 2005 +0100
+++ b/setup.py Sat Jun 18 16:32:41 2005 +0100
@@ -9,24 +9,30 @@
from distutils.core import setup, Extension
from distutils.command.install_data import install_data
+import mercurial.version
+
class install_package_data(install_data):
def finalize_options(self):
self.set_undefined_options('install',
('install_lib', 'install_dir'))
install_data.finalize_options(self)
-setup(name='mercurial',
- version='0.5b',
- author='Matt Mackall',
- author_email='mpm@selenic.com',
- url='http://selenic.com/mercurial',
- description='scalable distributed SCM',
- license='GNU GPL',
- packages=['mercurial'],
- ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c'])],
- data_files=[('mercurial/templates',
- ['templates/map'] +
- glob.glob('templates/map-*') +
- glob.glob('templates/*.tmpl'))],
- cmdclass = { 'install_data' : install_package_data },
- scripts=['hg', 'hgmerge'])
+try:
+ mercurial.version.remember_version()
+ 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'],
+ ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c'])],
+ data_files=[('mercurial/templates',
+ ['templates/map'] +
+ glob.glob('templates/map-*') +
+ glob.glob('templates/*.tmpl'))],
+ cmdclass = { 'install_data' : install_package_data },
+ scripts=['hg', 'hgmerge'])
+finally:
+ mercurial.version.forget_version()