%bcond_without tests %global srcname docker Name: python3-%{srcname} Version: 3.4.1 Release: 3%{?dist} Summary: A Python library for the Docker Engine API License: ASL 2.0 URL: https://pypi.python.org/pypi/%{srcname} Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/%{srcname}-%{version}.tar.gz # Upstream uses environment markers to conditionally apply some dependencies. # 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 # Upstream uses pip to check if the older docker-py module is installed. We # handle that with an obsolete. #Patch3: remove-pip-dependency.patch # Some of the test use pytest.deprecated_call as a context manager. That # capability was added in pytest 2.9.0+, but currently RHEL only ships 2.7.0. # This patch reverts the context manager usage to the traditional function # call. #Patch4: remove-pytest-deprecated_call-context-manager.patch BuildArch: noarch %description It lets you do anything the docker command does, but from within Python apps – run containers, manage containers, manage Swarms, etc. %package -n python%{python3_pkgversion}-%{srcname} Summary: A Python library for the Docker Engine API BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %if %{with tests} BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-requests >= 2.5.2 BuildRequires: python%{python3_pkgversion}-six >= 1.4.0 BuildRequires: python%{python3_pkgversion}-websocket-client >= 0.32.0 BuildRequires: python%{python3_pkgversion}-docker-pycreds >= 0.2.1 %endif # tests Requires: python%{python3_pkgversion}-requests >= 2.5.2 Requires: python%{python3_pkgversion}-six >= 1.4.0 Requires: python%{python3_pkgversion}-websocket-client >= 0.32.0 Requires: python%{python3_pkgversion}-docker-pycreds >= 0.2.1 %description -n python%{python3_pkgversion}-%{srcname} It lets you do anything the docker command does, but from within Python apps – run containers, manage containers, manage Swarms, etc. %prep %autosetup -n %{srcname}-%{version} -p 1 rm -r docker.egg-info %build %py3_build %install %py3_install %if %{with tests} %check py.test-%{python3_version} --verbose tests/unit %endif %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc README.md %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info %changelog * Thu Mar 07 2019 Carl George - 2.6.1-3 - Drop backports-ssl_match_hostname requirement for py34->py36 switch * Thu Mar 07 2019 Troy Dawson - 2.6.1-2 - Rebuilt to change main python from 3.4 to 3.6 * Mon Jan 22 2018 Carl George - 2.6.1-1 - Initial EPEL7 package