Mercurial > evolve
annotate setup.py @ 1221:524dbc8ffeac
prune: add --keep to not touch the working copy
In order to more closely emulate strip, lets add --keep to leave the working
copy untouched when we do our prune.
author | Durham Goode <durham@fb.com> |
---|---|
date | Fri, 20 Mar 2015 12:51:57 -0700 |
parents | a206ee74f129 |
children | cf846d47bb7e |
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 |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
4 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
|
5 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
|
6 |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
7 def get_version(relpath): |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
8 '''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
|
9 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
|
10 # 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
|
11 # (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
|
12 line = line.decode('utf8') |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
13 if '__version__' in line: |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
14 if "'" in line: |
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
15 return line.split("'")[1] |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
16 |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
17 setup( |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
18 name='hg-evolve', |
1149
a206ee74f129
evolve: add various version info to save time on troubleshooting
anatoly techtonik <techtonik@gmail.com>
parents:
1138
diff
changeset
|
19 version=get_version('hgext/evolve.py'), |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
20 author='Pierre-Yves David', |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
21 maintainer='Pierre-Yves David', |
916
48e68d3b0144
fix maintainer email
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
859
diff
changeset
|
22 maintainer_email='pierre-yves.david@ens-lyon.org', |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
23 url='https://bitbucket.org/marmoute/mutable-history', |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
24 description='Flexible evolution of Mercurial history.', |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
25 long_description=open('README').read(), |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
26 keywords='hg mercurial', |
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
27 license='GPLv2+', |
969
1aba711b1c60
pkg: drop pushexperiment from the install list
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
935
diff
changeset
|
28 py_modules=['hgext.evolve'], |
496
d3d9df795b4d
[pkg] Add a setup.py
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
29 ) |