import os
import sys

from setuptools import setup, find_packages

if sys.version_info < (3,7,0):
    sys.exit("Python 3.7.0 is the minimum required version")

PROJECT_ROOT = os.path.dirname(__file__)

with open(os.path.join(PROJECT_ROOT, "README.rst")) as file_:
    long_description = file_.read()

INSTALL_REQUIRES = [
    "Quart>=0.11",
]

setup(
    name="Quart-Rate-Limiter",
    version="0.2.0",
    python_requires=">=3.7.0",
    description="A Quart extension to provide rate limiting support.",
    long_description=long_description,
    url="https://gitlab.com/pgjones/quart-rate-limiter/",
    author="P G Jones",
    author_email="philip.graham.jones@googlemail.com",
    license="MIT",
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    packages=find_packages("src"),
    package_dir={"": "src"},
    py_modules=["quart_rate_limiter"],
    install_requires=INSTALL_REQUIRES,
    extras_require={
        "redis": ["aioredis"],
    },
    tests_require=INSTALL_REQUIRES + [
        "pytest",
        "pytest-asyncio",
    ],
    include_package_data=True,
)
