Package init
This commit is contained in:
parent
c3828c4950
commit
337acab5e9
BIN
docker-4.0.2.tar.gz
Normal file
BIN
docker-4.0.2.tar.gz
Normal file
Binary file not shown.
103
python-docker.spec
Normal file
103
python-docker.spec
Normal file
@ -0,0 +1,103 @@
|
||||
%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
|
||||
Loading…
x
Reference in New Issue
Block a user