setup.py
changeset 1242 cf846d47bb7e
parent 1149 a206ee74f129
child 1355 5b66cff0e470
equal deleted inserted replaced
1241:3625d006e81b 1242:cf846d47bb7e
     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 
    17 setup(
    25 setup(
    18     name='hg-evolve',
    26     name='hg-evolve',
    19     version=get_version('hgext/evolve.py'),
    27     version=get_version('hgext/evolve.py'),
    20     author='Pierre-Yves David',
    28     author='Pierre-Yves David',
    21     maintainer='Pierre-Yves David',
    29     maintainer='Pierre-Yves David',
    23     url='https://bitbucket.org/marmoute/mutable-history',
    31     url='https://bitbucket.org/marmoute/mutable-history',
    24     description='Flexible evolution of Mercurial history.',
    32     description='Flexible evolution of Mercurial history.',
    25     long_description=open('README').read(),
    33     long_description=open('README').read(),
    26     keywords='hg mercurial',
    34     keywords='hg mercurial',
    27     license='GPLv2+',
    35     license='GPLv2+',
    28     py_modules=['hgext.evolve'],
    36     py_modules=py_modules
    29 )
    37 )