'''
Standard setup.py to upload the code on pypi.
First, remember to do
    bash generate_documentation.sh -all
to be sure docstrings and readme are up-to-date. Then
    python setup.py sdist
    python setup.py sdist upload
'''

from setuptools import setup

# Fill "long_description" using the README file
# README.rst is generated by generate_documentation.sh
def readme():
    with open('README.rst') as f:
        return f.read()

# Extract code version from __init__.py
def get_version():
    with open('precession/precession.py') as f:
        for line in f.readlines():
            if "__version__" in line:
                return line.split('"')[1]

setup(
    name='precession',
    version=get_version(),
    description='Dynamics of precessing black-hole binaries',
    long_description=readme(),
    classifiers=[
        'Topic :: Scientific/Engineering :: Astronomy',
        'Topic :: Scientific/Engineering :: Physics',
        'Topic :: Scientific/Engineering :: Mathematics',
        'Intended Audience :: Science/Research',
        'Programming Language :: Python :: 2.7',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    keywords='black hole spin inspiral precession post-Newtonian',
    url='https://github.com/dgerosa/precession/',
    author='Davide Gerosa',
    author_email='d.gerosa@damtp.cam.ac.uk',
    license='CC by 4.0',
    packages=['precession','precession.test'],
    install_requires=[
          'numpy',
          'scipy',
          'matplotlib',
          'parmap>=1.5.1',
      ],
    include_package_data=True,
    zip_safe=False,
)
