Mercurial > evolve
annotate setup.py @ 1826:19df96c0d670
compat: drop hack around a 'graft' signature change
We only support recent only version of Mercurial now.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 28 Feb 2017 14:22:05 +0100 |
parents | 202ac6c94b7f |
children | 143c8e4dc22d |
rev | line source |
---|---|
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
1 # Copied from histedit setup.py |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
2 # Credit to Augie Fackler <durin42@gmail.com> |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
3 |
1242
cf846d47bb7e
setup: allow including inhibit in the build
Durham Goode <durham@fb.com>
parents:
1149
diff
changeset
|
4 import os |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
5 from distutils.core import setup |
1149
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
6 from os.path import dirname, join |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
7 |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
8 def get_version(relpath): |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
9 '''Read version info from a file without importing it''' |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
10 for line in open(join(dirname(__file__), relpath), 'rb'): |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
11 # Decode to a fail-safe string for PY3 |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
12 # (gives unicode object in PY2) |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
13 line = line.decode('utf8') |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
14 if '__version__' in line: |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
15 if "'" in line: |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
16 return line.split("'")[1] |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
17 |
1808
202ac6c94b7f
hgext3rd: move 'simple4server' as 'evolve.serveronly'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1807
diff
changeset
|
18 py_modules = [ |
202ac6c94b7f
hgext3rd: move 'simple4server' as 'evolve.serveronly'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1807
diff
changeset
|
19 'hgext3rd.evolve.serveronly' |
202ac6c94b7f
hgext3rd: move 'simple4server' as 'evolve.serveronly'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1807
diff
changeset
|
20 ] |
1806
9f42f819267b
evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1642
diff
changeset
|
21 py_packages = [ |
9f42f819267b
evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1642
diff
changeset
|
22 'hgext3rd', |
1242
cf846d47bb7e
setup: allow including inhibit in the build
Durham Goode <durham@fb.com>
parents:
1149
diff
changeset
|
23 ] |
cf846d47bb7e
setup: allow including inhibit in the build
Durham Goode <durham@fb.com>
parents:
1149
diff
changeset
|
24 |
1452
1bcbd14cf159
merge back with 3.3 compat branch
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1451
diff
changeset
|
25 if os.environ.get('INCLUDE_INHIBIT'): |
1807
a53efee7d8b0
hgext3rd: move 'directaccess' and 'inhibit' in 'evolve.hack'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
26 py_modules.append('hgext3rd.evolve.hack.inhibit') |
a53efee7d8b0
hgext3rd: move 'directaccess' and 'inhibit' in 'evolve.hack'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
27 py_modules.append('hgext3rd.evolve.hack.directaccess') |
1452
1bcbd14cf159
merge back with 3.3 compat branch
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1451
diff
changeset
|
28 |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
29 setup( |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
30 name='hg-evolve', |
1806
9f42f819267b
evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1642
diff
changeset
|
31 version=get_version('hgext3rd/evolve/__init__.py'), |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
32 author='Pierre-Yves David', |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
33 maintainer='Pierre-Yves David', |
916
48e68d3b0144
fix maintainer email
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
859
diff
changeset
|
34 maintainer_email='pierre-yves.david@ens-lyon.org', |
1642
fb5e479080d8
project: change evolution domain to mercurial-scm
timeless@gmail.com
parents:
1617
diff
changeset
|
35 url='https://www.mercurial-scm.org/doc/evolution/', |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
36 description='Flexible evolution of Mercurial history.', |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
37 long_description=open('README').read(), |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
38 keywords='hg mercurial', |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
39 license='GPLv2+', |
1806
9f42f819267b
evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1642
diff
changeset
|
40 py_modules=py_modules, |
9f42f819267b
evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1642
diff
changeset
|
41 packages=py_packages |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
42 ) |