diff --git a/python-docker.spec b/python-docker.spec index 8676540..5ebf252 100644 --- a/python-docker.spec +++ b/python-docker.spec @@ -28,7 +28,7 @@ Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/%{sr # Environment markers were first added in setuptools 20.6.8, so that doesn't # work in RHEL. This patch converts those environment markers into simple if # statements. -Patch2: remove-environment-markers.patch +Patch1: remove-environment-markers.patch BuildArch: noarch diff --git a/remove-environment-markers.patch b/remove-environment-markers.patch index d38ce02..3067aa5 100644 --- a/remove-environment-markers.patch +++ b/remove-environment-markers.patch @@ -1,8 +1,16 @@ diff --git a/setup.py b/setup.py -index c1eabcf..e083879 100644 +index c1eabcf..f4916ff 100644 --- a/setup.py +++ b/setup.py -@@ -16,29 +16,17 @@ requirements = [ +@@ -3,6 +3,7 @@ from __future__ import print_function + + import codecs + import os ++import sys + + from setuptools import setup, find_packages + +@@ -16,29 +17,14 @@ requirements = [ 'docker-pycreds >= 0.2.3' ] @@ -12,17 +20,15 @@ index c1eabcf..e083879 100644 - # 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 sys.platform == 'win32': -+ requirements.append('pypiwin32 >= 219') ++if sys.version_info[:2] < (3, 5): ++ requirements.append('backports.ssl_match_hostname >= 3.5') - # win32 APIs if on Windows (required for npipe support) - # Python 3.6 is only compatible with v220 ; Python < 3.5 is not supported - # on v220 ; ALL versions are broken for v222 (as of 2018-01-26) - ':sys_platform == "win32" and python_version < "3.6"': 'pypiwin32==219', - ':sys_platform == "win32" and python_version >= "3.6"': 'pypiwin32==220', -+if sys.version_info[:2] < (3, 5): -+ requirements.append('backports.ssl_match_hostname >= 3.5') - +- - # If using docker-py over TLS, highly recommend this option is - # pip-installed or pinned. - @@ -41,7 +47,7 @@ index c1eabcf..e083879 100644 version = None exec(open('docker/version.py').read()) -@@ -65,7 +53,6 @@ setup( +@@ -65,7 +51,6 @@ setup( packages=find_packages(exclude=["tests.*", "tests"]), install_requires=requirements, tests_require=test_requirements,