from setuptools import setup, find_packages

with open("README.md", "r") as fh:
    long_description = fh.read()

try:
    import ucloud.version
    version = ucloud.version.VERSION
except:
    import subprocess
    c = subprocess.run(["git", "describe"], capture_output=True)
    version = c.stdout.decode("utf-8")


setup(name='ucloud',
      version=version,
      description='All ucloud server components.',
      url='https://code.ungleich.ch/ucloud/ucloud',
      long_description=long_description,
      long_description_content_type='text/markdown',
      classifiers=[
          'Development Status :: 3 - Alpha',
          'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
          'Programming Language :: Python :: 3'
      ],
      author='ungleich',
      author_email='technik@ungleich.ch',
      packages=find_packages(),
      install_requires=[
          'requests',
          'python-decouple',
          'flask',
          'flask-restful',
          'bitmath',
          'pyotp',
          'sshtunnel',
          'sphinx',
          'pynetbox',
          'sphinx-rtd-theme',
          'etcd3_wrapper @ https://code.ungleich.ch/ungleich-public/etcd3_wrapper/repository/master/archive.tar.gz#egg=etcd3_wrapper',
          'etcd3 @ https://github.com/kragniz/python-etcd3/tarball/master#egg=etcd3',
      ],
      scripts=['scripts/ucloud'],
      zip_safe=False)