Upstream uses environment markers to conditionally apply some dependencies. Environment markers were first added in setuptools 20.6.8. diff -Nurp docker-compose-1.18.0.orig/setup.py docker-compose-1.18.0/setup.py --- docker-compose-1.18.0.orig/setup.py 2017-12-06 19:34:46.000000000 -0600 +++ docker-compose-1.18.0/setup.py 2017-12-26 18:09:04.896020834 -0600 @@ -42,6 +42,17 @@ install_requires = [ 'jsonschema >= 2.5.1, < 3', ] +if sys.version_info[:2] < (3, 4): + install_requires.append('enum34 >= 1.0.4') + +if sys.version_info[:2] < (3, 5): + install_requires.append('backports.ssl_match_hostname >= 3.5') + +if sys.version_info[:2] < (3, 3): + install_requires.append('ipaddress >= 1.0.16') + +if sys.platform == 'win32': + install_requires.append('colorama >= 0.3.9') tests_require = [ 'pytest', @@ -52,27 +63,10 @@ if sys.version_info[:2] < (3, 4): tests_require.append('mock >= 1.0.1') extras_require = { - ':python_version < "3.4"': ['enum34 >= 1.0.4, < 2'], - ':python_version < "3.5"': ['backports.ssl_match_hostname >= 3.5'], - ':python_version < "3.3"': ['ipaddress >= 1.0.16'], - ':sys_platform == "win32"': ['colorama >= 0.3.9, < 0.4'], 'socks': ['PySocks >= 1.5.6, != 1.5.7, < 2'], } -try: - if 'bdist_wheel' not in sys.argv: - for key, value in extras_require.items(): - if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]): - install_requires.extend(value) -except Exception as e: - print("Failed to compute platform dependencies: {}. ".format(e) + - "All dependencies will be installed as a result.", file=sys.stderr) - for key, value in extras_require.items(): - if key.startswith(':'): - install_requires.extend(value) - - setup( name='docker-compose', version=find_version("compose", "__init__.py"),