view setup.py @ 425:719663b7f235

remember_version() only writes version if called in a Mercurial repository. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 remember_version() only writes version if called in a Mercurial repository. forget_version() resets version only if remember_version() wrote it. manifest hash: b30df9d93c233f4bf07150cc5067f294a98c16f4 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCtXFiW7P1GVgWeRoRAgkjAJ9jkwCAHf3yJyDI8R582XjNFNFeWgCZAe27 iqGPYzrRErf6gPKZcoBMsD4= =t2Bx -----END PGP SIGNATURE-----
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 19 Jun 2005 14:21:38 +0100
parents 25afb21d97ba
children 36e644d28edf
line wrap: on
line source

#!/usr/bin/env python

# This is the mercurial setup script. 
#
# './setup.py install', or
# './setup.py --help' for more options

import glob
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)

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()