| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
import os |
| 16 |
import sys |
| 17 |
|
| 18 |
from setuptools import setup |
| 19 |
|
| 20 |
|
| 21 |
def read_file(filename): |
| 22 |
abs_path = os.path.join(os.path.dirname(__file__), filename) |
| 23 |
with open(abs_path, encoding="utf-8") as f: |
| 24 |
return f.read() |
| 25 |
|
| 26 |
|
| 27 |
about = {} |
| 28 |
exec(read_file(os.path.join("aiohttp_cors", "__about__.py")), about) |
| 29 |
|
| 30 |
needs_pytest = {"pytest", "test"}.intersection(sys.argv) |
| 31 |
pytest_runner = ["pytest_runner"] if needs_pytest else [] |
| 32 |
|
| 33 |
|
| 34 |
setup( |
| 35 |
name=about["__title__"], |
| 36 |
version=about["__version__"], |
| 37 |
author=about["__author__"], |
| 38 |
author_email=about["__email__"], |
| 39 |
description=about["__summary__"], |
| 40 |
url=about["__uri__"], |
| 41 |
long_description="\n\n".join( |
| 42 |
( |
| 43 |
read_file("README.rst"), |
| 44 |
read_file("CHANGES.rst"), |
| 45 |
) |
| 46 |
), |
| 47 |
long_description_content_type="text/x-rst", |
| 48 |
packages=["aiohttp_cors"], |
| 49 |
setup_requires=[ |
| 50 |
|
| 51 |
|
| 52 |
"setuptools>=20.8.1", |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
] |
| 57 |
+ pytest_runner, |
| 58 |
tests_require=[ |
| 59 |
"pytest", |
| 60 |
"pytest-cov", |
| 61 |
"pytest-pylint", |
| 62 |
"selenium", |
| 63 |
], |
| 64 |
test_suite="tests", |
| 65 |
install_requires=[ |
| 66 |
"aiohttp>=3.9", |
| 67 |
], |
| 68 |
python_requires=">=3.9", |
| 69 |
license=about["__license__"], |
| 70 |
classifiers=[ |
| 71 |
"License :: OSI Approved :: Apache Software License", |
| 72 |
"Intended Audience :: Developers", |
| 73 |
"Programming Language :: Python", |
| 74 |
"Programming Language :: Python :: 3", |
| 75 |
"Topic :: Software Development :: Libraries", |
| 76 |
"Topic :: Internet :: WWW/HTTP", |
| 77 |
"Framework :: AsyncIO", |
| 78 |
"Operating System :: MacOS :: MacOS X", |
| 79 |
"Operating System :: Microsoft :: Windows", |
| 80 |
"Operating System :: POSIX", |
| 81 |
"Development Status :: 3 - Alpha", |
| 82 |
"Framework :: aiohttp", |
| 83 |
], |
| 84 |
) |