author | mpm@selenic.com |
Fri, 24 Jun 2005 23:17:10 -0800 | |
changeset 466 | c084cfbb2389 |
parent 429 | 688d03d6997a |
child 575 | 7f5ce4bbdd7b |
permissions | -rw-r--r-- |
0
9117c6561b0b
Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff
changeset
|
1 |
#!/usr/bin/env python |
9117c6561b0b
Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff
changeset
|
2 |
|
9117c6561b0b
Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff
changeset
|
3 |
# This is the mercurial setup script. |
9117c6561b0b
Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff
changeset
|
4 |
# |
9117c6561b0b
Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff
changeset
|
5 |
# './setup.py install', or |
9117c6561b0b
Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff
changeset
|
6 |
# './setup.py --help' for more options |
9117c6561b0b
Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff
changeset
|
7 |
|
157
2653740d8118
Install the templates where they can be found by hgweb.py
mpm@selenic.com
parents:
155
diff
changeset
|
8 |
import glob |
72 | 9 |
from distutils.core import setup, Extension |
157
2653740d8118
Install the templates where they can be found by hgweb.py
mpm@selenic.com
parents:
155
diff
changeset
|
10 |
from distutils.command.install_data import install_data |
2653740d8118
Install the templates where they can be found by hgweb.py
mpm@selenic.com
parents:
155
diff
changeset
|
11 |
|
423
25afb21d97ba
Support for 'hg --version'. setup.py stores version from hg repository.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
241
diff
changeset
|
12 |
import mercurial.version |
25afb21d97ba
Support for 'hg --version'. setup.py stores version from hg repository.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
241
diff
changeset
|
13 |
|
427
36e644d28edf
Make it possible to specify a version number in setup.py.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
423
diff
changeset
|
14 |
# specify version string, otherwise 'hg identify' will be used: |
36e644d28edf
Make it possible to specify a version number in setup.py.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
423
diff
changeset
|
15 |
version = '' |
36e644d28edf
Make it possible to specify a version number in setup.py.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
423
diff
changeset
|
16 |
|
157
2653740d8118
Install the templates where they can be found by hgweb.py
mpm@selenic.com
parents:
155
diff
changeset
|
17 |
class install_package_data(install_data): |
2653740d8118
Install the templates where they can be found by hgweb.py
mpm@selenic.com
parents:
155
diff
changeset
|
18 |
def finalize_options(self): |
2653740d8118
Install the templates where they can be found by hgweb.py
mpm@selenic.com
parents:
155
diff
changeset
|
19 |
self.set_undefined_options('install', |
2653740d8118
Install the templates where they can be found by hgweb.py
mpm@selenic.com
parents:
155
diff
changeset
|
20 |
('install_lib', 'install_dir')) |
2653740d8118
Install the templates where they can be found by hgweb.py
mpm@selenic.com
parents:
155
diff
changeset
|
21 |
install_data.finalize_options(self) |
0
9117c6561b0b
Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff
changeset
|
22 |
|
423
25afb21d97ba
Support for 'hg --version'. setup.py stores version from hg repository.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
241
diff
changeset
|
23 |
try: |
427
36e644d28edf
Make it possible to specify a version number in setup.py.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
423
diff
changeset
|
24 |
mercurial.version.remember_version(version) |
423
25afb21d97ba
Support for 'hg --version'. setup.py stores version from hg repository.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
241
diff
changeset
|
25 |
setup(name='mercurial', |
429 | 26 |
version=mercurial.version.get_version(), |
27 |
author='Matt Mackall', |
|
28 |
author_email='mpm@selenic.com', |
|
29 |
url='http://selenic.com/mercurial', |
|
30 |
description='scalable distributed SCM', |
|
31 |
license='GNU GPL', |
|
32 |
packages=['mercurial'], |
|
33 |
ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']), |
|
34 |
Extension('mercurial.bdiff', ['mercurial/bdiff.c'])], |
|
35 |
data_files=[('mercurial/templates', |
|
36 |
['templates/map'] + |
|
37 |
glob.glob('templates/map-*') + |
|
38 |
glob.glob('templates/*.tmpl'))], |
|
39 |
cmdclass = { 'install_data' : install_package_data }, |
|
40 |
scripts=['hg', 'hgmerge']) |
|
423
25afb21d97ba
Support for 'hg --version'. setup.py stores version from hg repository.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
241
diff
changeset
|
41 |
finally: |
25afb21d97ba
Support for 'hg --version'. setup.py stores version from hg repository.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
241
diff
changeset
|
42 |
mercurial.version.forget_version() |