forked from toluaina/pgsync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
96 lines (85 loc) · 2.59 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
import os
import re
from setuptools import find_packages, setup
HERE = os.path.dirname(os.path.abspath(__file__))
def get_version() -> str:
filename: str = os.path.join(HERE, "pgsync", "__init__.py")
with open(filename) as fp:
contents = fp.read()
pattern = r"^__version__ = \"(.*?)\"$"
return re.search(pattern, contents, re.MULTILINE).group(1)
# Package meta-data.
NAME = "pgsync"
DESCRIPTION = "Postgres to Elasticsearch sync"
URL = "https://github.com/toluaina/pgsync"
AUTHOR = MAINTAINER = "Tolu Aina"
AUTHOR_EMAIL = MAINTAINER_EMAIL = "[email protected]"
PYTHON_REQUIRES = ">=3.7.0"
VERSION = get_version()
INSTALL_REQUIRES = []
KEYWORDS = [
"pgsync",
"elasticsearch",
"postgres",
"change data capture",
]
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
]
SCRIPTS = [
"bin/pgsync",
"bin/bootstrap",
"bin/parallel_sync",
]
SETUP_REQUIRES = ["pytest-runner"]
TESTS_REQUIRE = ["pytest"]
# if building the source dist then add the sources
PACKAGES = find_packages(include=["pgsync"])
with open("README.rst") as fp:
README = fp.read()
with open("requirements/prod.txt") as fp:
INSTALL_REQUIRES = fp.read()
setup(
name=NAME,
author=AUTHOR,
license="LGPLv3",
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
author_email=AUTHOR_EMAIL,
classifiers=CLASSIFIERS,
python_requires=PYTHON_REQUIRES,
description=DESCRIPTION,
long_description=README,
long_description_content_type="text/markdown",
install_requires=INSTALL_REQUIRES,
include_package_data=True,
keywords=KEYWORDS,
packages=PACKAGES,
setup_requires=SETUP_REQUIRES,
scripts=SCRIPTS,
test_suite="tests",
tests_require=TESTS_REQUIRE,
url=URL,
version=VERSION,
zip_safe=False,
project_urls={
"Bug Reports": "https://github.com/toluaina/pgsync/issues",
"Funding": "https://github.com/sponsors/toluaina",
"Source": URL,
"Web": "https://pgsync.com",
"Documentation": "https://pgsync.com",
},
)