Mercurial > hg > hg-fastimport
comparison setup.py @ 98:03224546f948
Fix string usage in setup.py
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Fri, 22 Jan 2021 16:34:07 +0000 |
| parents | c305720d5b7c |
| children |
comparison
equal
deleted
inserted
replaced
| 97:cde0e1d24e58 | 98:03224546f948 |
|---|---|
| 5 except: | 5 except: |
| 6 from distutils.core import setup | 6 from distutils.core import setup |
| 7 | 7 |
| 8 def get_version(relpath): | 8 def get_version(relpath): |
| 9 path = join(dirname(__file__), relpath) | 9 path = join(dirname(__file__), relpath) |
| 10 for line in open(path, 'rb'): | 10 for line in open(path, "rb"): |
| 11 line = line.decode('utf-8') | 11 line = line.decode("utf-8") |
| 12 if '__version__' in line: | 12 if "__version__" in line: |
| 13 return line.split("'")[1] | 13 return line.split('"')[1] |
| 14 | 14 |
| 15 py_packages = [ | 15 py_packages = [ |
| 16 'hgext3rd.fastimport', | 16 "hgext3rd.fastimport", |
| 17 'hgext3rd.fastimport.vendor.python_fastimport', | 17 "hgext3rd.fastimport.vendor.python_fastimport", |
| 18 ] | 18 ] |
| 19 | 19 |
| 20 py_packagedir = { | 20 py_packagedir = { |
| 21 'hgext3rd': join(dirname(__file__), 'hgext3rd') | 21 "hgext3rd": join(dirname(__file__), "hgext3rd") |
| 22 } | 22 } |
| 23 | 23 |
| 24 py_versions = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4' | 24 py_versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" |
| 25 | 25 |
| 26 setup( | 26 setup( |
| 27 name='hg-fastimport', | 27 name="hg-fastimport", |
| 28 version=get_version('hgext3rd/fastimport/__init__.py'), | 28 version=get_version("hgext3rd/fastimport/__init__.py"), |
| 29 author='The hg-fastimport authors', | 29 author="The hg-fastimport authors", |
| 30 maintainer='Roy Marples', | 30 maintainer="Roy Marples", |
| 31 maintainer_email='roy@marples.name', | 31 maintainer_email="roy@marples.name", |
| 32 url='https://roy.marples.name/hg/hg-fastimport/', | 32 url="https://roy.marples.name/hg/hg-fastimport/", |
| 33 description='Mercurial extension for importing from a git fast-import stream.', | 33 description="Mercurial extension for importing a git fast-import stream.", |
| 34 long_description=open(join(dirname(__file__), 'README.rst')).read(), | 34 long_description=open(join(dirname(__file__), 'README.rst')).read(), |
| 35 keywords='hg git mercurial', | 35 keywords="hg git mercurial", |
| 36 license='GPLv2', | 36 license="GPLv2", |
| 37 packages=py_packages, | 37 packages=py_packages, |
| 38 package_dir=py_packagedir, | 38 package_dir=py_packagedir, |
| 39 python_requires=py_versions, | 39 python_requires=py_versions, |
| 40 ) | 40 ) |
