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