"""Setup script."""
import os

from setuptools import find_packages
from setuptools import setup

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

if os.path.exists("full_version.txt"):
    with open("full_version.txt", "r", encoding="utf-8") as fh:
        """
        Note that this file is generated by the CI chain based on the git tag
        (by .github/scripts/define_new_version_number.py)
        It should not be present in the repository by default.
        """
        version_number = fh.read()
else:
    version_number = 'v0.0.0'  # default value when under development

setup(
    name='gateway_4d_viewer',
    version=version_number,
    description="A flask-based gateway for serving data to Earthwave's 4d viewer client.",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author='Earthwave Ltd',
    author_email='info@earthwave.co.uk',
    url='https://earthwave.co.uk/',
    python_requires=">=3.9",
    packages=find_packages(),
    # note requirements listed ininstall_requires should be the *minimum required*
    # in order to allow pip to resolve multiple installed packages properly.
    # requirements.txt should contain a specific known working version instead.
    install_requires=[
        'flask',
        'flask_cors',
        'gunicorn',
        'google-cloud-storage',
        'google-api-core',
        'schema'
    ],
)
