dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / dev-python / docker-py / docker-py-4.2.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7,8} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Python client for Docker"
10 HOMEPAGE="https://github.com/docker/docker-py"
11 SRC_URI="https://github.com/docker/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="Apache-2.0"
14 SLOT="0"
15 KEYWORDS="amd64 ~arm64 x86"
16 IUSE="doc test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND="
20         !~dev-python/requests-2.18.0[${PYTHON_USEDEP}]
21         >=dev-python/requests-2.14.2[${PYTHON_USEDEP}]
22         >=dev-python/six-1.4.0[${PYTHON_USEDEP}]
23         >=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]
24 "
25 DEPEND="
26         test? (
27                 ${RDEPEND}
28                 >=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
29                 >=dev-python/paramiko-2.4.2[${PYTHON_USEDEP}]
30                 >=dev-python/pytest-2.9.1[${PYTHON_USEDEP}]
31         )
32 "
33
34 PATCHES=(
35         "${FILESDIR}"/${P}-fix_splitnport.patch
36 )
37
38 distutils_enable_sphinx docs \
39         'dev-python/recommonmark' \
40         '>=dev-python/sphinx-1.4.6'
41
42 src_prepare() {
43         # localhost has a better chance of being in /etc/hosts
44         sed -e 's:socket[.]gethostname():"localhost":' \
45                 -i tests/unit/api_test.py || die
46
47         distutils-r1_src_prepare
48 }
49
50 python_test() {
51         pytest -vv tests/unit/ || die "tests failed under ${EPYTHON}"
52 }