Skip to content

Commit 9027ccf

Browse files
authored
Add typing and configparser dependencies for python versions that need it (#572)
1 parent 6fdade2 commit 9027ccf

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

setup.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,22 @@ def get_readme_md_contents():
1818
with open("datadog/version.py") as fp:
1919
exec(fp.read(), version)
2020

21-
install_reqs = ["decorator>=3.3.2", "requests>=2.6.0"]
21+
# `typing` package is only required for Python versions older than 3.5, but we include it here so
22+
# that a single wheel build can be used for all supported Python versions. Installing `typing` on
23+
# Python 3.5+ has no effect.
24+
#
25+
# `configparser` package is only required for Python versions older than 3 (it is included here for
26+
# the same reason as the `typing` package).
27+
install_reqs = [
28+
"decorator>=3.3.2",
29+
"requests>=2.6.0",
30+
'typing;python_version<"3.5"',
31+
'configparser;python_version<"3.0"',
32+
]
2233

2334
if sys.version_info < (2, 7):
2435
install_reqs.append("argparse>=1.2")
2536

26-
if sys.version_info < (3, 5):
27-
install_reqs.append("typing")
28-
2937
setup(
3038
name="datadog",
3139
version=version["__version__"],

0 commit comments

Comments
 (0)