2021-07-02 12:34:28 +02:00
|
|
|
import pathlib
|
|
|
|
|
|
|
|
from setuptools import find_packages, setup
|
|
|
|
|
|
|
|
HERE = pathlib.Path(__file__).parent
|
|
|
|
|
|
|
|
long_description = (HERE / "README.md").read_text()
|
|
|
|
|
|
|
|
|
|
|
|
def get_version() -> str:
|
|
|
|
fpath = HERE / "check_patroni" / "__init__.py"
|
|
|
|
with fpath.open() as f:
|
|
|
|
for line in f:
|
|
|
|
if line.startswith("__version__"):
|
|
|
|
return line.split('"')[1]
|
|
|
|
raise Exception(f"version information not found in {fpath}")
|
|
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name="check_patroni",
|
|
|
|
version=get_version(),
|
2022-02-07 11:09:46 +01:00
|
|
|
author="Dalibo",
|
|
|
|
author_email="contact@dalibo.com",
|
2022-07-11 16:31:53 +02:00
|
|
|
packages=find_packages(include=["check_patroni*"]),
|
2021-07-02 12:34:28 +02:00
|
|
|
include_package_data=True,
|
2022-02-07 11:09:46 +01:00
|
|
|
url="https://github.com/dalibo/check_patroni",
|
2021-07-02 12:34:28 +02:00
|
|
|
license="PostgreSQL",
|
|
|
|
description="Nagios plugin to check on patroni",
|
|
|
|
long_description=long_description,
|
|
|
|
long_description_content_type="text/markdown",
|
2022-02-07 11:09:46 +01:00
|
|
|
classifiers=[
|
2022-07-11 15:16:19 +02:00
|
|
|
"Development Status :: 4 - Beta", # "Development Status :: 5 - Production/Stable",
|
2022-02-07 11:09:46 +01:00
|
|
|
"Environment :: Console",
|
|
|
|
"License :: OSI Approved :: PostgreSQL License",
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
"Topic :: System :: Monitoring",
|
|
|
|
],
|
2021-08-11 19:09:14 +02:00
|
|
|
keywords="patroni nagios check",
|
2021-07-02 12:34:28 +02:00
|
|
|
python_requires=">=3.6",
|
2021-08-11 19:09:14 +02:00
|
|
|
install_requires=[
|
2021-08-13 14:02:13 +02:00
|
|
|
"attrs >= 17, !=21.1",
|
2021-08-11 19:09:14 +02:00
|
|
|
"urllib3 >= 1.26.6",
|
|
|
|
"nagiosplugin >= 1.3.2",
|
|
|
|
"click >= 8.0.1",
|
|
|
|
],
|
2021-07-02 12:34:28 +02:00
|
|
|
extras_require={
|
2021-08-11 19:09:14 +02:00
|
|
|
"test": [
|
|
|
|
"pytest",
|
|
|
|
"pytest-mock",
|
|
|
|
],
|
2021-07-02 12:34:28 +02:00
|
|
|
},
|
|
|
|
entry_points={
|
|
|
|
"console_scripts": [
|
|
|
|
"check_patroni=check_patroni.cli:main",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
zip_safe=False,
|
|
|
|
)
|