Blob Blame History Raw
Generate requirements list dynamically instead of using environment markers.
This allows using versions of setuptools older than 20.6.8.

diff -Nurp docker-2.5.1.orig/setup.py docker-2.5.1/setup.py
--- docker-2.5.1.orig/setup.py	2017-08-22 18:44:35.000000000 -0500
+++ docker-2.5.1/setup.py	2017-09-05 12:06:03.280017598 -0500
@@ -29,23 +29,14 @@ requirements = [
 if sys.platform == 'win32':
     requirements.append('pypiwin32 >= 219')
 
-extras_require = {
-    ':python_version < "3.5"': 'backports.ssl_match_hostname >= 3.5',
-    # While not imported explicitly, the ipaddress module is required for
-    # ssl_match_hostname to verify hosts match with certificates via
-    # ServerAltname: https://pypi.python.org/pypi/backports.ssl_match_hostname
-    ':python_version < "3.3"': 'ipaddress >= 1.0.16',
-
-    # If using docker-py over TLS, highly recommend this option is
-    # pip-installed or pinned.
-
-    # TODO: if pip installing both "requests" and "requests[security]", the
-    # extra package from the "security" option are not installed (see
-    # https://github.com/pypa/pip/issues/4391).  Once that's fixed, instead of
-    # installing the extra dependencies, install the following instead:
-    # 'requests[security] >= 2.5.2, != 2.11.0, != 2.12.2'
-    'tls': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],
-}
+if sys.version_info[:2] < (3, 5):
+    requirements.append('backports.ssl_match_hostname >= 3.5')
+
+# While not imported explicitly, the ipaddress module is required for
+# ssl_match_hostname to verify hosts match with certificates via
+# ServerAltname: https://pypi.python.org/pypi/backports.ssl_match_hostname
+if sys.version_info[:2] < (3, 3):
+    requirements.append('ipaddress >= 1.0.16')
 
 version = None
 exec(open('docker/version.py').read())
@@ -72,7 +63,6 @@ setup(
     packages=find_packages(exclude=["tests.*", "tests"]),
     install_requires=requirements,
     tests_require=test_requirements,
-    extras_require=extras_require,
     zip_safe=False,
     test_suite='tests',
     classifiers=[