-
Notifications
You must be signed in to change notification settings - Fork 158
/
setup.py
79 lines (65 loc) · 2.65 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import re
from pathlib import Path
from setuptools import setup, find_packages
install_requires = ["psycopg2-binary>=2.9.5", "async_timeout>=3.0,<5.0"]
extras_require = {"sa": ["sqlalchemy[postgresql_psycopg2binary]>=1.4,<2.1"]}
def read(*parts):
return Path(__file__).resolve().parent.joinpath(*parts).read_text().strip()
def get_maintainers(path="MAINTAINERS.txt"):
return ", ".join(x.strip().strip("*").strip() for x in read(path).splitlines())
def read_version():
regexp = re.compile(r"^__version__\W*=\W*\"([\d.abrc]+)\"")
for line in read("aiopg", "__init__.py").splitlines():
match = regexp.match(line)
if match is not None:
return match.group(1)
raise RuntimeError("Cannot find version in aiopg/__init__.py")
def read_changelog(path="CHANGES.txt"):
return f"Changelog\n---------\n\n{read(path)}"
classifiers = [
"License :: OSI Approved :: BSD License",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Environment :: Web Environment",
"Development Status :: 5 - Production/Stable",
"Topic :: Database",
"Topic :: Database :: Front-Ends",
"Framework :: AsyncIO",
]
setup(
name="aiopg",
version=read_version(),
description="Postgres integration with asyncio.",
long_description="\n\n".join((read("README.rst"), read_changelog())),
long_description_content_type="text/x-rst",
classifiers=classifiers,
platforms=["macOS", "POSIX", "Windows"],
author="Andrew Svetlov",
python_requires=">=3.8",
project_urls={
"Chat: Gitter": "https://gitter.im/aio-libs/Lobby",
"CI: GA": "https://github.com/aio-libs/aiopg/actions?query=workflow%3ACI",
"Coverage: codecov": "https://codecov.io/gh/aio-libs/aiopg",
"Docs: RTD": "https://aiopg.readthedocs.io",
"GitHub: issues": "https://github.com/aio-libs/aiopg/issues",
"GitHub: repo": "https://github.com/aio-libs/aiopg",
},
author_email="[email protected]",
maintainer=get_maintainers(),
maintainer_email="[email protected]",
url="https://aiopg.readthedocs.io",
download_url="https://pypi.python.org/pypi/aiopg",
license="BSD",
packages=find_packages(),
install_requires=install_requires,
extras_require=extras_require,
include_package_data=True,
)