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