91c47d9
diff --git a/setup.py b/setup.py
91c47d9
index c29787b..074b633 100644
91c47d9
--- a/setup.py
91c47d9
+++ b/setup.py
91c47d9
@@ -3,6 +3,7 @@ from __future__ import print_function
91c47d9
 
91c47d9
 import codecs
91c47d9
 import os
91c47d9
+import sys
91c47d9
 
91c47d9
 from setuptools import find_packages
91c47d9
 from setuptools import setup
91c47d9
@@ -16,33 +17,13 @@ requirements = [
91c47d9
     'requests >= 2.14.2, != 2.18.0',
91c47d9
 ]
91c47d9
 
91c47d9
-extras_require = {
91c47d9
-    ':python_version < "3.5"': 'backports.ssl_match_hostname >= 3.5',
91c47d9
-    # While not imported explicitly, the ipaddress module is required for
91c47d9
-    # ssl_match_hostname to verify hosts match with certificates via
91c47d9
-    # ServerAltname: https://pypi.python.org/pypi/backports.ssl_match_hostname
91c47d9
-    ':python_version < "3.3"': 'ipaddress >= 1.0.16',
91c47d9
-
91c47d9
-    # win32 APIs if on Windows (required for npipe support)
91c47d9
-    # Python 3.6 is only compatible with v220 ; Python < 3.5 is not supported
91c47d9
-    # on v220 ; ALL versions are broken for v222 (as of 2018-01-26)
91c47d9
-    ':sys_platform == "win32" and python_version < "3.6"': 'pypiwin32==219',
91c47d9
-    ':sys_platform == "win32" and python_version >= "3.6"': 'pypiwin32==223',
91c47d9
-
91c47d9
-    # If using docker-py over TLS, highly recommend this option is
91c47d9
-    # pip-installed or pinned.
91c47d9
-
91c47d9
-    # TODO: if pip installing both "requests" and "requests[security]", the
91c47d9
-    # extra package from the "security" option are not installed (see
91c47d9
-    # https://github.com/pypa/pip/issues/4391).  Once that's fixed, instead of
91c47d9
-    # installing the extra dependencies, install the following instead:
91c47d9
-    # 'requests[security] >= 2.5.2, != 2.11.0, != 2.12.2'
91c47d9
-    'tls': ['pyOpenSSL>=17.5.0', 'cryptography>=1.3.4', 'idna>=2.0.0'],
91c47d9
-
91c47d9
-    # Only required when connecting using the ssh:// protocol
91c47d9
-    'ssh': ['paramiko>=2.4.2'],
91c47d9
-
91c47d9
-}
91c47d9
+if sys.version_info[:2] < (3, 5):
91c47d9
+    requirements.append('backports.ssl_match_hostname >= 3.5')
91c47d9
+# While not imported explicitly, the ipaddress module is required for
91c47d9
+# ssl_match_hostname to verify hosts match with certificates via
91c47d9
+# ServerAltname: https://pypi.python.org/pypi/backports.ssl_match_hostname
91c47d9
+if sys.version_info[:2] < (3, 3):
91c47d9
+    requirements.append('ipaddress >= 1.0.16')
91c47d9
 
91c47d9
 version = None
91c47d9
 exec(open('docker/version.py').read())
91c47d9
@@ -71,7 +52,6 @@ setup(
91c47d9
     packages=find_packages(exclude=["tests.*", "tests"]),
91c47d9
     install_requires=requirements,
91c47d9
     tests_require=test_requirements,
91c47d9
-    extras_require=extras_require,
91c47d9
     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
91c47d9
     zip_safe=False,
91c47d9
     test_suite='tests',