view setup.py @ 89:e6602cc471d5

Use vendor/python_fastimport rather than depending on the library This is now quite important as upstream dropped support for Python-2 which some hg-fastimport users might still need.
author Roy Marples <roy@marples.name>
date Tue, 19 Jan 2021 23:00:57 +0000
parents fec9b2b96c5f
children f58882dce2d7
line wrap: on
line source

from os.path import dirname, join

try:
    from setuptools import setup
except:
    from distutils.core import setup

def get_version(relpath):
    path = join(dirname(__file__), relpath)
    for line in open(path, 'rb'):
        line = line.decode('utf-8')
        if '__version__' in line:
            return line.split("'")[1]

py_packages = [
    'hgext3rd',
    'hgext3rd.fastimport',
]

py_packagedir = {
    'hgext3rd': join(dirname(__file__), 'hgext3rd')
}

py_versions = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4'

setup(
    name='hg-fastimport',
    version=get_version('hgext3rd/fastimport/__init__.py'),
    author='The hg-fastimport authors',
    maintainer='Roy Marples',
    maintainer_email='roy@marples.name',
    url='https://roy.marples.name/hg/hg-fastimport/',
    description='Mercurial extension for importing from a git fast-import stream.',
    long_description=open(join(dirname(__file__), 'README.txt')).read(),
    keywords='hg git mercurial',
    license='GPLv2',
    packages=py_packages,
    package_dir=py_packagedir,
    python_requires=py_versions,
)