Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
101 lines (90 loc) · 2.92 KB
/
Copy pathsetup.py
File metadata and controls
101 lines (90 loc) · 2.92 KB
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
97
98
99
100
101
#!/usr/bin/env python3
importcodecs
importos
importre
fromsetuptoolsimportfind_packages, setup
META_PATH=os.path.join("devo", "__version__.py")
HERE=os.path.abspath(os.path.dirname(__file__))
PACKAGES=find_packages(exclude=["tests*"])
KEYWORDS= ["devo", "sdk", "developers"]
CLASSIFIERS= [
"Programming Language :: Python",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
]
INSTALL_REQUIRES= [
"click~=8.0",
"pem~=23.0",
"pyopenssl~=26.0",
"pytz~=2026.0",
"pyyaml~=6.0",
"requests~=2.0",
]
EXTRAS_REQUIRE= {
"dev": [
"mock~=5.0",
"msgpack~=1.0",
"pebble~=5.0",
"pipdeptree~=3.0",
"pytest~=9.0",
"pytest-cov~=7.0",
"pytest-timeout~=2.0",
"responses~=0.0",
]
}
CLI= [
"devo-sender=devo.sender.scripts.sender_cli:cli",
"devo-api=devo.api.scripts.client_cli:cli",
]
defread(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
withcodecs.open(os.path.join(HERE, *parts), "rb", "utf-8") asf:
returnf.read()
META_FILE=read(META_PATH)
deffind_meta(meta):
"""
Extract __*meta*__ from META_FILE.
"""
meta_match=re.search(
r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=meta), META_FILE, re.M
)
ifmeta_match:
returnmeta_match.group(1)
raiseRuntimeError("Unable to find __{meta}__ string.".format(meta=meta))
withopen("README.md", "r") asfh:
# Replacement needed for relative links be available in PyPi
pattern=r"\[([^\[\]]+)\]\s?\(((?!http)[^\(\)]+)\)"
replace=r"[\1](https://github.com/DevoInc/python-sdk/tree/master/\2)"
long_description=re.sub(pattern, replace, fh.read(), flags=re.MULTILINE)
setup(
python_requires=">=3.10",
author="Devo, Inc.",
author_email="support@devo.com",
description="Devo Software Development Kit for Python.",
long_description=long_description,
long_description_content_type="text/markdown",
license=find_meta("license"),
name="devo-sdk",
url="https://github.com/DevoInc/python-sdk",
version=find_meta("version"),
classifiers=CLASSIFIERS,
packages=PACKAGES,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
entry_points={"console_scripts": CLI},
)