install_requires = [
    'setuptools',
    'numpy >= 1.10.0',
    'sqlalchemy >= 1.4.0', # moving towards sqlalchemy 2.0 eventually
    'pyparsing >= 2.1.0',
    'WebOb >= 1.7.0rc2', # Response.has_body
    'repoze.lru >= 0.4', # py3 compat
    'zope.interface >= 3.8.0',  # has zope.interface.registry
    'zope.deprecation >= 3.5.0', # py3 compat
    'venusian >= 1.0a3', # ``ignore``
    'translationstring >= 0.4', # py3 compat
    'PasteDeploy >= 1.5.0', # py3 compat
    'plaster',
    'plaster_pastedeploy',
    'pyramid',
    'waitress',
    'pyramid_debugtoolbar',
    'pyramid_jinja2',
    'pyramid_tm','pyramid_retry',
    'zope.sqlalchemy',
    'hupper',
    'scipy >= 0.14.0',
    'more_itertools >= 8.0.0',
    'matplotlib >= 3.0.0', # for web interface
    'tqdm >= 4.59.0',
    'tblib >= 3.0.0',
    ]

tests_require = [
    'pytest >= 5.0.0',
    'webtest >= 2.0',
    'pyquery >= 1.3.0',
    'pynbody >= 1.5.1',
    'yt>=3.4.0',
    'PyMySQL>=1.0.2',
    ]

import codecs
import os.path

from setuptools import find_packages, setup


def read(rel_path):
    here = os.path.abspath(os.path.dirname(__file__))
    with codecs.open(os.path.join(here, rel_path), 'r') as fp:
        return fp.read()

def get_version(rel_path):
    for line in read(rel_path).splitlines():
        if line.startswith('__version__'):
            delim = '"' if '"' in line else "'"
            return line.split(delim)[1]
    else:
        raise RuntimeError("Unable to find version string.")

from os import path

this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md')) as f:
    long_description = f.read()

setup(name='tangos',
      version=get_version("tangos/__init__.py"),
      description='TANGOS, the agile numerical galaxy organisation system',
      classifiers=[
          "Development Status :: 5 - Production/Stable",
          "Intended Audience :: Developers",
          "Intended Audience :: Science/Research",
          "Topic :: Scientific/Engineering :: Astronomy",
          "Programming Language :: Python",
          "Programming Language :: Python :: 3.8",
          "Programming Language :: Python :: 3.9",
          "Programming Language :: Python :: 3.10",
          "Programming Language :: Python :: 3.11",
          "Programming Language :: Python :: 3.12",
          "License :: OSI Approved :: BSD License",
      ],
      author="Andrew Pontzen",
      author_email="a.pontzen@ucl.ac.uk",
      license="BSD",
      packages=find_packages(),
      entry_points={'paste.app_factory': [
                                            'main = tangos.web:main',
                                            ],
                    'console_scripts': [   'tangos_add_bh = tangos.scripts.add_bh:main',
                                           'tangos_bh_timelink = tangos.scripts.bh_timelink:main',
                                           'tangos_crosslink = tangos.scripts.crosslink:main',
                                           'tangos_fix_bh_hosts = tangos.scripts.fix_bh_hosts:main',
                                           'tangos_import_from_ahf = tangos.scripts.import_from_ahf:main',
                                           'tangos_manager = tangos.scripts.manager:main',
                                           'tangos_preprocess_bh = tangos.scripts.preprocess_bh:main',
                                           'tangos_timelink = tangos.scripts.timelink:main',
                                           'tangos_writer = tangos.scripts.writer:main',
                                           'tangos = tangos.scripts:main'
                    ]
      },
      include_package_data=True,
      zip_safe=False,
      python_requires='>=3.8',
      install_requires=install_requires,
      tests_require=tests_require,
      test_suite="tests",
      long_description=long_description,
      long_description_content_type='text/markdown',
      extras_require={'test': tests_require,
                      'rmdbs': ['PyMySQL[rsa]',
                                'psycopg2-binary']
                      }
      )
