from setuptools import setup, find_packages
import os.path
import codecs

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

# The following two methods were copied from
# https://packaging.python.org/guides/single-sourcing-package-version/#single-sourcing-the-version
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()

INSTALL_REQUIRES = [
    'tellurium',
    'jupyterlab',
    'matplotlib',
    'nose',
    'numpy',
    'pandas',
    'pip',
    'pythonlibsbml',
    'seaborn',
    'sympy',
    ]

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

def doSetup(install_requires):
  setup(
      name='symmathSBML',
      version=get_version("symmathSBML/_version.py"),
      author='Joseph L. Hellerstein, Jin Liu',
      author_email='jlheller@uw.edu',
      packages=find_packages(exclude=['tests', 'sym', 'images', 'data',
          'notebook', 'docs']),
      url='https://github.com/ModelEngineering/symmathSBML',
      description='Symbolic mathematics for SBML Models.',
      long_description=open('README.md').read(),
      long_description_content_type='text/markdown',
      package_dir={'symmathSBML': 'symmathSBML'},
      python_requires='>=3.7',
      requires=install_requires,
      classifiers=[
          'Development Status :: 3 - Alpha',
          'Intended Audience :: Developers',      # Define that your audience are developers
          'Topic :: Scientific/Engineering :: Bio-Informatics',
          'License :: OSI Approved :: MIT License',   # Again, pick a license
          'Programming Language :: Python :: 3.4',
          'Programming Language :: Python :: 3.5',
          'Programming Language :: Python :: 3.6',
          'Programming Language :: Python :: 3.7',
          'Programming Language :: Python :: 3.8',
        ],
      )


if __name__ == '__main__':
  doSetup(INSTALL_REQUIRES)
