import os.path

from setuptools import find_packages, setup

with open('README.md') as readme_file:
    readme = readme_file.read()

requirements = ['requests>=2.20', 'python-dateutil>=2']

def read(rel_path):
    here = os.path.abspath(os.path.dirname(__file__))
    with open(os.path.join(here, rel_path)) 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]
    _version_err = 'Unable to find version string.'
    raise RuntimeError(_version_err)

setup(
    name='skolo',
    version=get_version('skolo/__init__.py'),
    author='Skolo, LLC',
    author_email='support@skolocfd.com',
    license = 'MIT License',
    description='A command line tool and python package for SkoloCFD',
    long_description=readme,
    long_description_content_type='text/markdown',
    url='https://skolocfd.com/docs?topic=Api',
    py_modules = ['skoloCliParser'],
    packages=find_packages(),
    install_requires=requirements,
    classifiers=[
        'Programming Language :: Python :: 3.11',
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
    ],
    entry_points = """
        [console_scripts]
        skolo=skoloCliParser:main
    """,
    python_requires='>=3.0',
)
