"""
    lakeFS API

    lakeFS HTTP API  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Contact: services@treeverse.io
    Generated by: https://openapi-generator.tech
"""


from setuptools import setup, find_packages  # noqa: H301

NAME = "lakefs-client"
VERSION = "1.41.0"
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = [
  "urllib3 >= 1.25.3",
  "python-dateutil",
]

long_prefix = '''
[EOL] Do NOT use: lakeFS OpenAPI Python client legacy SDK

The lakeFS OpenAPI Python client legacy SDK has reached end of life.  Please
use lakefs-sdk or lakefs-wrapper instead.

* lakefs-sdk code maintains backwards compatibility.
* lakefs-wrapper uses lakefs-sdk to provide support at a much higher level.

lakefs-client will shortly stop being published.  For help migrating, refer
to
https://docs.lakefs.io/project/code-migrate-1.0-sdk.html#migrating-sdk-code-for-python.
'''

with open('README.md') as f:
    import re
    # replace relative links with links to the docs:
    doc_version = '.'.join(f'v{VERSION}'.split('.')[:2])
    long_description = long_prefix + re.sub(r'(\[[*a-zA-Z_]*]\()docs/([A-Za-z0-9]*)\.md',
                              rf'\1https://pydocs.lakefs.io/{doc_version}/docs/\2.html',
                              f.read())

setup(
    name=NAME,
    version=VERSION,
    description="[legacy] lakeFS API",
    author="Treeverse",
    author_email="services@treeverse.io",
    url="https://github.com/treeverse/lakeFS/tree/master/clients/python-legacy",
    keywords=["OpenAPI", "OpenAPI-Generator", "lakeFS API"],
    python_requires=">=3.6",
    install_requires=REQUIRES,
    packages=find_packages(exclude=["test", "tests"]),
    include_package_data=True,
    license="Apache 2.0",
    long_description=long_description,
    long_description_content_type='text/markdown'
)
