equal
deleted
inserted
replaced
1 # Copied from histedit setup.py |
1 # Copied from histedit setup.py |
2 # Credit to Augie Fackler <durin42@gmail.com> |
2 # Credit to Augie Fackler <durin42@gmail.com> |
3 |
3 |
|
4 import os |
4 from distutils.core import setup |
5 from distutils.core import setup |
5 from os.path import dirname, join |
6 from os.path import dirname, join |
6 |
7 |
7 def get_version(relpath): |
8 def get_version(relpath): |
8 '''Read version info from a file without importing it''' |
9 '''Read version info from a file without importing it''' |
12 line = line.decode('utf8') |
13 line = line.decode('utf8') |
13 if '__version__' in line: |
14 if '__version__' in line: |
14 if "'" in line: |
15 if "'" in line: |
15 return line.split("'")[1] |
16 return line.split("'")[1] |
16 |
17 |
|
18 py_modules = [ |
|
19 'hgext.evolve', |
|
20 ] |
|
21 |
|
22 if os.environ.get('INCLUDE_INHIBIT'): |
|
23 py_modules.append('hgext.inhibit') |
|
24 py_modules.append('hgext.directaccess') |
|
25 |
17 setup( |
26 setup( |
18 name='hg-evolve', |
27 name='hg-evolve', |
19 version=get_version('hgext/evolve.py'), |
28 version=get_version('hgext/evolve.py'), |
20 author='Pierre-Yves David', |
29 author='Pierre-Yves David', |
21 maintainer='Pierre-Yves David', |
30 maintainer='Pierre-Yves David', |
23 url='https://bitbucket.org/marmoute/mutable-history', |
32 url='https://bitbucket.org/marmoute/mutable-history', |
24 description='Flexible evolution of Mercurial history.', |
33 description='Flexible evolution of Mercurial history.', |
25 long_description=open('README').read(), |
34 long_description=open('README').read(), |
26 keywords='hg mercurial', |
35 keywords='hg mercurial', |
27 license='GPLv2+', |
36 license='GPLv2+', |
28 py_modules=['hgext.evolve'], |
37 py_modules=py_modules |
29 ) |
38 ) |