comparison setup.py @ 4876:1a47cc2728ff stable

setup: make runnable from other dirs Currently it fails when run in that way for two reasons: - the description is loaded from the README file but with a path relative to the working directory - module references have the same issue, which is fixed with package_dir.
author Ian Moody <moz-ian@perix.co.uk>
date Thu, 03 Oct 2019 23:20:47 +0100
parents a9b4c4849338
children 095bab0d0cd7
comparison
equal deleted inserted replaced
4875:164543ac3277 4876:1a47cc2728ff
26 'hgext3rd', 26 'hgext3rd',
27 'hgext3rd.evolve', 27 'hgext3rd.evolve',
28 'hgext3rd.evolve.thirdparty', 28 'hgext3rd.evolve.thirdparty',
29 'hgext3rd.topic', 29 'hgext3rd.topic',
30 ] 30 ]
31 py_packagedir = {
32 'hgext3rd': join(dirname(__file__), 'hgext3rd')
33 }
31 34
32 py_versions = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4' 35 py_versions = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4'
33 36
34 if os.environ.get('INCLUDE_INHIBIT'): 37 if os.environ.get('INCLUDE_INHIBIT'):
35 py_modules.append('hgext3rd.evolve.hack.inhibit') 38 py_modules.append('hgext3rd.evolve.hack.inhibit')
42 author_email='pierre-yves.david@ens-lyon.org', 45 author_email='pierre-yves.david@ens-lyon.org',
43 maintainer='Pierre-Yves David', 46 maintainer='Pierre-Yves David',
44 maintainer_email='pierre-yves.david@ens-lyon.org', 47 maintainer_email='pierre-yves.david@ens-lyon.org',
45 url='https://www.mercurial-scm.org/doc/evolution/', 48 url='https://www.mercurial-scm.org/doc/evolution/',
46 description='Flexible evolution of Mercurial history.', 49 description='Flexible evolution of Mercurial history.',
47 long_description=open('README').read(), 50 long_description=open(join(dirname(__file__), 'README')).read(),
48 keywords='hg mercurial', 51 keywords='hg mercurial',
49 license='GPLv2+', 52 license='GPLv2+',
50 py_modules=py_modules, 53 py_modules=py_modules,
51 packages=py_packages, 54 packages=py_packages,
55 package_dir=py_packagedir,
52 python_requires=py_versions 56 python_requires=py_versions
53 ) 57 )