forked from terminusdb/terminusdb-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
55 lines (47 loc) · 1.83 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
# read the contents of your README file
import re
from os import path
import setuptools
# Add README.md in PyPI project description, reletive links are changes to obsolute
page_target = "https://github.com/terminusdb/terminusdb-client-python/blob/master/"
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
matched = re.finditer(r"\]\(\S+\)", long_description)
replace_pairs = {}
for item in matched:
if item.group(0)[2:10] != "https://" and item.group(0)[2:9] != "http://":
replace_pairs[item.group(0)] = (
item.group(0)[:2] + page_target + item.group(0)[2:]
)
for old_str, new_str in replace_pairs.items():
long_description = long_description.replace(old_str, new_str)
# ---
requires = ["requests", "numpydoc", "click<9.0,>=7.0", "shed", "typeguard", "tqdm"]
extras_require = {"dataframe": ["numpy >= 1.13.0", "pandas >= 0.23.0"]}
setuptools.setup(
name="terminusdb-client",
version="10.2.0",
author="TerminusDB group",
author_email="[email protected]",
description="Python client for Terminus DB",
long_description=long_description,
long_description_content_type="text/markdown",
package_data={"": ["LICENSE"]},
url="https://github.com/terminusdb/terminusdb-client-python",
packages=setuptools.find_packages(exclude=["tests"]),
include_package_data=True,
install_requires=requires,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
extras_require=extras_require,
python_requires=">=3.7",
entry_points={
"console_scripts": [
"tdbpy = terminusdb_client.scripts.scripts:tdbpy",
],
},
)