*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / google-auth / google-auth-1.6.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python2_7 python3_{6,7} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Google Authentication Library"
11 HOMEPAGE="https://github.com/GoogleCloudPlatform/google-auth-library-python https://pypi.org/project/google-auth/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         dev-python/namespace-google[${PYTHON_USEDEP}]
22         >=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
23         >=dev-python/pyasn1-modules-0.2.1[${PYTHON_USEDEP}]
24         >=dev-python/rsa-3.1.4[${PYTHON_USEDEP}]
25         >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
26         >=dev-python/cachetools-2.0.0[${PYTHON_USEDEP}]
27         "
28 DEPEND="${RDEPEND}
29         test? (
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}]
34         )"
35
36 src_prepare() {
37         # delete stray files included in the tarball
38         find "${S}"/tests -name '*.pyc' -delete || die
39         distutils-r1_src_prepare
40 }
41
42 python_test() {
43         pytest -vv || die "Tests failed under ${EPYTHON}"
44 }
45
46 python_install_all() {
47         distutils-r1_python_install_all
48         find "${ED}" -name '*.pth' -delete || die
49 }