import os import re from setuptools import find_packages, setup def get_version(package: str) -> str: """ Return package version as listed in `__version__` in `init.py`. """ with open(os.path.join(package, "__init__.py")) as f: return re.search("__version__ = ['\"]([^'\"]+)['\"]", f.read()).group(1) setup( name="audience_common", python_requires=">=3.8", version=get_version("audience_common"), description="The Orchard Audience Common Components", author="The Orchard", author_email="webdev@theorchard.com", classifiers=[ "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Topic :: Internet :: WWW/HTTP", "Framework :: ASGI", "Framework :: Starlette", "Framework :: FastAPI", "Programming Language :: Python :: 3", "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", ], packages=find_packages(exclude=["tests*"]), package_data={"audience_common": ["py.typed"]}, include_package_data=True, install_requires=[ "anyio >= 3.6.2", 'backports.zoneinfo; python_version<"3.9"', ], extras_require={ "dev": [ "ruff >= 0.4.9", "mypy >= 1.10.0", "pytest >= 7.4.0", "pytest-cov >= 4.1.0", "pytest-mock >= 3.11.1", "orjson >= 3.8.12", "click >= 8.1.0", "tabulate >= 0.9.0", "types-tabulate >= 0.9.0", "bump2version >= 1.0.1", "boto3 >= 1.26.10", "boto3-stubs[secretsmanager]", "ddtrace >= 1.13.4", "fastapi >= 0.90.0", "cachelib >= 0.10.2", "aiocache >= 0.12.2", "httpx >= 0.21.1", ], }, )