comparison setup.py @ 157:2653740d8118

Install the templates where they can be found by hgweb.py This ought to use package_data but that doesn't exist in Python 2.3. So we do a hack of install_data and use glob. This also adds templatepath() to hgweb.py which finds the templates relative to hgweb.py's location.
author mpm@selenic.com
date Wed, 25 May 2005 16:21:06 -0800
parents 083c38bdfa64
children f40273b0ad7b
comparison
equal deleted inserted replaced
156:32ce2c5d4d25 157:2653740d8118
3 # This is the mercurial setup script. 3 # This is the mercurial setup script.
4 # 4 #
5 # './setup.py install', or 5 # './setup.py install', or
6 # './setup.py --help' for more options 6 # './setup.py --help' for more options
7 7
8 import glob
8 from distutils.core import setup, Extension 9 from distutils.core import setup, Extension
10 from distutils.command.install_data import install_data
11
12 class install_package_data(install_data):
13 def finalize_options(self):
14 self.set_undefined_options('install',
15 ('install_lib', 'install_dir'))
16 install_data.finalize_options(self)
9 17
10 setup(name='mercurial', 18 setup(name='mercurial',
11 version='0.4f', 19 version='0.4f',
12 author='Matt Mackall', 20 author='Matt Mackall',
13 author_email='mpm@selenic.com', 21 author_email='mpm@selenic.com',
14 url='http://selenic.com/mercurial', 22 url='http://selenic.com/mercurial',
15 description='scalable distributed SCM', 23 description='scalable distributed SCM',
16 license='GNU GPL', 24 license='GNU GPL',
17 packages=['mercurial'], 25 packages=['mercurial'],
18 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c'])], 26 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c'])],
27 data_files=[('mercurial/templates',
28 ['templates/map'] + glob.glob('templates/*.tmpl'))],
29 cmdclass = { 'install_data' : install_package_data },
19 scripts=['hg']) 30 scripts=['hg'])