1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_6 )
10 DESCRIPTION="Google Authentication Library"
11 HOMEPAGE="https://pypi.org/project/google-auth/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
18 RESTRICT="!test? ( test )"
21 dev-python/namespace-google[${PYTHON_USEDEP}]
22 >=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
23 >=dev-python/pyasn1-modules-0.0.5[${PYTHON_USEDEP}]
24 >=dev-python/rsa-3.1.4[${PYTHON_USEDEP}]
25 >=dev-python/six-1.6.1[${PYTHON_USEDEP}]
26 >=dev-python/cachetools-2.0.0[${PYTHON_USEDEP}]
30 dev-python/flask[${PYTHON_USEDEP}]
31 dev-python/mock[${PYTHON_USEDEP}]
32 dev-python/pytest[${PYTHON_USEDEP}]
33 dev-python/pytest-localserver[${PYTHON_USEDEP}]
36 python_prepare_all() {
37 # urllib3-1.16 raised MaxRetryError, not TransportError
38 sed -e 's:test_connection_error:_\0:' \
39 -e 's:test_request_with_timeout_failure:_\0:' \
40 -i tests/transport/compliance.py || die
41 distutils-r1_python_prepare_all
45 # delete stray files included in the tarball
46 find "${S}"/tests -name '*.pyc' -delete || die
47 py.test || die "Tests failed under ${EPYTHON}"
50 python_install_all() {
51 distutils-r1_python_install_all
52 find "${ED}" -name '*.pth' -delete || die