python-docker/python-docker.spec
2020-02-15 19:27:14 +08:00

104 lines
2.9 KiB
RPMSpec
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

%bcond_with python2
Name: python-docker
Version: 4.0.2
Release: 1
Summary: A Python library for the Docker Engine API
License: ASL 2.0
URL: https://pypi.org/project/docker
Source0: https://files.pythonhosted.org/packages/source/d/docker/docker-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel python3-setuptools
%if %{with python2}
BuildRequires: python2-devel python2-setuptools
%endif
%description
It lets you do anything the docker command does, but from within Python apps
run containers, manage containers, manage Swarms, etc.
%if %{with python2}
%package -n python2-docker
Summary: A Python library for the Docker Engine API
Requires: python2-requests >= 2.14.2 python2-six >= 1.4.0
Requires: python2-websocket-client >= 0.32.0 python2-docker-pycreds >= 0.2.1
Requires: python2-backports-ssl_match_hostname >= 3.5 python2-ipaddress >= 1.0.16
Requires: python2-pyOpenSSL python2-idna python2-cryptography python2-paramiko
%{?python_provide:%python_provide python2-docker}
Obsoletes: python-docker-py < 1:2
%description -n python2-docker
It lets you do anything the docker command does, but from within Python apps
run containers, manage containers, manage Swarms, etc.
%endif
%package -n python-docker-tests
Summary: Unit tests and integration tests for python-docker
%{?python_provide:%python_provide python-docker-tests}
%description -n python-docker-tests
Upstream test-suite (unit, integration) packaged as RPM.
%package -n python3-docker
Summary: A Python library for the Docker Engine API
Requires: python3-requests >= 2.14.2 python3-six >= 1.4.0
Requires: python3-websocket-client >= 0.32.0 python3-docker-pycreds >= 0.2.1
Requires: python3-pyOpenSSL python3-idna python3-cryptography python3-paramiko
%{?python_provide:%python_provide python3-docker}
Obsoletes: python3-docker-py < 1:2
%description -n python3-docker
It lets you do anything the docker command does, but from within Python apps
run containers, manage containers, manage Swarms, etc.
%prep
%autosetup -n docker-%{version} -p1
rm -rf docker.egg-info
%build
%py3_build
%if %{with python2}
%py2_build
%endif
%install
%py3_install
%if %{with python2}
%py2_install
%endif
# copy tests to /usr/libexec/installed-tests
mkdir -p %{buildroot}%{_libexecdir}/installed-tests/%{name}
cp -avr tests/ %{buildroot}%{_libexecdir}/installed-tests/%{name}/
%if %{with python2}
%files -n python2-docker
%defattr(-,root,root)
%doc README.md
%license LICENSE
%{python2_sitelib}/*
%endif
%files -n python3-docker
%defattr(-,root,root)
%doc README.md
%license LICENSE
%{python3_sitelib}/*
%files -n python-docker-tests
%defattr(-,root,root)
%{_libexecdir}/installed-tests
%changelog
* Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.2-1
- Package init