1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
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"
15 KEYWORDS="amd64 ~arm64 ~x86"
19 >=dev-python/docker-pycreds-0.2.1[${PYTHON_USEDEP}]
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 $(python_gen_cond_dep '>=dev-python/backports-ssl-match-hostname-3.5[${PYTHON_USEDEP}]' 'python2_7' 'python3_4' )
25 $(python_gen_cond_dep '>=dev-python/ipaddress-1.0.16[${PYTHON_USEDEP}]' 'python2_7' )
28 dev-python/setuptools[${PYTHON_USEDEP}]
31 >=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
32 dev-python/pytest-runner[${PYTHON_USEDEP}]
33 >=dev-python/pytest-2.9.1[${PYTHON_USEDEP}]
36 dev-python/recommonmark[${PYTHON_USEDEP}]
37 >=dev-python/sphinx-1.4.6[${PYTHON_USEDEP}]
41 python_prepare_all() {
42 sed -i -e "s/import pip//" -e "s/if 'docker-py'.*/if False:/" setup.py || die
43 distutils-r1_python_prepare_all
46 python_compile_all() {
48 sphinx-build docs html || die "docs failed to build"
54 py.test tests/unit/ || die "tests failed under ${EPYTHON}"