comparison setup.py @ 423:25afb21d97ba

Support for 'hg --version'. setup.py stores version from hg repository. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Support for 'hg --version'. setup.py stores version from hg repository. manifest hash: c69058298ea12035f2cf356f987ba2fb5ff4bbae -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCtD6ZW7P1GVgWeRoRAnGHAKCLscthht2UlBEMDmxL9cku4PlcswCffOVo wTOhYkW4Ie5+8bdmL8EqsvY= =uGpn -----END PGP SIGNATURE-----
author Thomas Arendsen Hein <thomas@intevation.de>
date Sat, 18 Jun 2005 16:32:41 +0100
parents afe895fcc0d0
children 36e644d28edf
comparison
equal deleted inserted replaced
396:8f8bb77d560e 423:25afb21d97ba
7 7
8 import glob 8 import glob
9 from distutils.core import setup, Extension 9 from distutils.core import setup, Extension
10 from distutils.command.install_data import install_data 10 from distutils.command.install_data import install_data
11 11
12 import mercurial.version
13
12 class install_package_data(install_data): 14 class install_package_data(install_data):
13 def finalize_options(self): 15 def finalize_options(self):
14 self.set_undefined_options('install', 16 self.set_undefined_options('install',
15 ('install_lib', 'install_dir')) 17 ('install_lib', 'install_dir'))
16 install_data.finalize_options(self) 18 install_data.finalize_options(self)
17 19
18 setup(name='mercurial', 20 try:
19 version='0.5b', 21 mercurial.version.remember_version()
20 author='Matt Mackall', 22 setup(name='mercurial',
21 author_email='mpm@selenic.com', 23 version=mercurial.version.get_version(),
22 url='http://selenic.com/mercurial', 24 author='Matt Mackall',
23 description='scalable distributed SCM', 25 author_email='mpm@selenic.com',
24 license='GNU GPL', 26 url='http://selenic.com/mercurial',
25 packages=['mercurial'], 27 description='scalable distributed SCM',
26 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c'])], 28 license='GNU GPL',
27 data_files=[('mercurial/templates', 29 packages=['mercurial'],
28 ['templates/map'] + 30 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c'])],
29 glob.glob('templates/map-*') + 31 data_files=[('mercurial/templates',
30 glob.glob('templates/*.tmpl'))], 32 ['templates/map'] +
31 cmdclass = { 'install_data' : install_package_data }, 33 glob.glob('templates/map-*') +
32 scripts=['hg', 'hgmerge']) 34 glob.glob('templates/*.tmpl'))],
35 cmdclass = { 'install_data' : install_package_data },
36 scripts=['hg', 'hgmerge'])
37 finally:
38 mercurial.version.forget_version()