view setup.py @ 95:3b398a887b95

Use a sqlite3 database to store the blob data if available This is much more performant than using a filesystem when we are dealing with a large number of blobs. If sqlite3 is not available, then fallback to writing to the filesystem. In both cases, the blob data is compressed before writing to save space. A new option has also been added to specify a path for persistent blob data. This is only really important for large continuous interations where the source data has no concept of export marks and thus only gets bigger. What we gain here is a reduction in the write load on the disk.
author Roy Marples <roy@marples.name>
date Thu, 21 Jan 2021 23:59:21 +0000
parents c305720d5b7c
children 03224546f948
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.fastimport',
    'hgext3rd.fastimport.vendor.python_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.rst')).read(),
    keywords='hg git mercurial',
    license='GPLv2',
    packages=py_packages,
    package_dir=py_packagedir,
    python_requires=py_versions,
)