]> git.pld-linux.org Git - packages/python-docker.git/blame - python-docker.spec
- python2 note
[packages/python-docker.git] / python-docker.spec
CommitLineData
bdab460e
ER
1#
2# Conditional build:
7d5980d3 3%bcond_without tests # unit tests
bdab460e 4
72030b27 5%define module docker
b7e5dc8d 6%define egg_name docker
6f952153 7%define pypi_name docker
45c3e8fc
JB
8Summary: A Python 2 library for the Docker Engine API
9Summary(pl.UTF-8): Biblioteka Pythona 2 do API silnika Docker
bdab460e 10Name: python-%{module}
64ff2674 11# keep 4.x here for python2 support
7d5980d3
JB
12Version: 4.4.4
13Release: 3
14Epoch: 1
bdab460e
ER
15License: Apache v2.0
16Group: Libraries/Python
7d5980d3
JB
17Source0: https://files.pythonhosted.org/packages/source/d/docker/%{pypi_name}-%{version}.tar.gz
18# Source0-md5: e52f862b113d14c684a6e7dfa3d9e11c
b3671e57 19Patch0: unpin-requirements.patch
bdab460e 20URL: http://docker-py.readthedocs.org/
7d5980d3
JB
21BuildRequires: python-modules >= 1:2.7
22BuildRequires: python-setuptools >= 1:42
45c3e8fc 23%if %{with tests}
7d5980d3
JB
24BuildRequires: python-ipaddress >= 1.0.16
25BuildRequires: python-backports-ssl_match_hostname >= 3.5
45c3e8fc 26BuildRequires: python-pytest >= 4.3.1
7d5980d3
JB
27BuildRequires: python-pytest-timeout >= 1.3.3
28BuildRequires: python-requests >= 2.20.0
29BuildRequires: python-six >= 1.10.0
30BuildRequires: python-urllib3 >= 1.24.3
31BuildRequires: python-websocket-client >= 0.56.0
45c3e8fc 32%endif
7d5980d3
JB
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
2492f669 35BuildConflicts: python-docker < 2.0
99b90030
ER
36# Docker can be remote, so suggest only
37Suggests: docker >= 1.3.3
e0043ac3
JP
38# optional dep for ssh support (required by docker-compose)
39Suggests: python-paramiko >= 2.4.2
bdab460e
ER
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
45c3e8fc 44A Python library for the Docker Engine API. It lets you do anything
6f952153
ER
45the `docker` command does, but from within Python apps - run
46containers, manage containers, manage Swarms, etc.
bdab460e 47
45c3e8fc
JB
48%description -l pl.UTF-8
49Biblioteka Pythona do API silnika Docker. Pozwala zrobić wszystko to,
50co polecenie "docker", ale z poziomu aplikacji w Pythonie: uruchamiać
51kontenery, zarządzać nimi, zarządzać Swarmami itp.
52
bdab460e 53%prep
6f952153 54%setup -q -n %{pypi_name}-%{version}
99b90030 55%patch0 -p1
bdab460e 56
bdab460e 57%build
45c3e8fc
JB
58%py_build
59
60%if %{with tests}
61PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
7d5980d3 62PYTEST_PLUGINS="pytest_timeout" \
45c3e8fc 63PYTHONPATH=$(pwd) \
7d5980d3 64%{__python} -m pytest tests/unit -k 'not TCPSocketStreamTest'
bdab460e
ER
65%endif
66
67%install
68rm -rf $RPM_BUILD_ROOT
7d5980d3 69
e1c7d18e 70%py_install
bdab460e 71
7d5980d3 72%py_postclean
bdab460e
ER
73
74%clean
75rm -rf $RPM_BUILD_ROOT
76
bdab460e
ER
77%files
78%defattr(644,root,root,755)
79%doc LICENSE README.md
80%{py_sitescriptdir}/%{module}
72030b27 81%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
This page took 0.178506 seconds and 4 git commands to generate.