forked from anna-money/pytest-pg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (61 loc) · 2.09 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
import re
from pathlib import Path
from setuptools import setup
install_requires = [
"docker>=5.0.0",
"pytest>=6.0.0",
]
def read(*parts):
return Path(__file__).resolve().parent.joinpath(*parts).read_text().strip()
def read_version():
regexp = re.compile(r"^__version__\W*=\W*\"([\d.abrc]+)\"")
for line in read("pytest_pg", "__init__.py").splitlines():
match = regexp.match(line)
if match is not None:
return match.group(1)
else:
raise RuntimeError("Cannot find version in pytest_pg/__init__.py")
long_description_parts = []
with open("README.md", "r") as fh:
long_description_parts.append(fh.read())
with open("CHANGELOG.md", "r") as fh:
long_description_parts.append(fh.read())
long_description = "\r\n".join(long_description_parts)
# custom PyPI classifier for pytest plugins
classifiers = ["Framework :: Pytest"],
setup(
name="pytest_pg",
version=read_version(),
description="A tiny plugin for pytest which runs PostgreSQL in Docker,
long_description=long_description,
long_description_content_type="text/markdown",
platforms=["macOS", "POSIX", "Windows"],
author="Yury Pliner",
python_requires=">=3.8",
project_urls={},
url="https://github.com/anna-money/pytest-pg",
author_email="[email protected]",
license="MIT",
packages=["pytest_pg"],
package_dir={"pytest_pg": "./pytest_pg"},
package_data={"pytest_pg": ["py.typed"]},
install_requires=install_requires,
include_package_data=True,
classifiers=[
"License :: OSI Approved :: MIT 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",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Framework :: Pytest"
],
entry_points={
"pytest11": [
"pytest_pg = pytest_pg",
]
}
)