Skip to content

Commit

Permalink
Add typing and configparser dependencies for python versions that…
Browse files Browse the repository at this point in the history
… need it (#572)
  • Loading branch information
jairideout authored Jun 23, 2020
1 parent 6fdade2 commit 9027ccf
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,22 @@ def get_readme_md_contents():
with open("datadog/version.py") as fp:
exec(fp.read(), version)

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

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

if sys.version_info < (3, 5):
install_reqs.append("typing")

setup(
name="datadog",
version=version["__version__"],
Expand Down

0 comments on commit 9027ccf

Please sign in to comment.