net-misc/google-cloud-sdk: Properly use the python single eclass

If python-single-r1.eclass is inherited, then PYTHON_USEDEP can't be
used directly inside dependency variable - either PYTHON_SINGLE_USEDEP
(for single-python-impl packages) should be used or the dependency
should be wrapped into python_gen_cond_dep function (for
multi-python-impl packages). crcmod is a multi-python-impl package, so
use the latter.

Also follow the practice of specifying the BDEPEND in terms of
RDEPEND. For this, we need to bump the EAPI to 7.
This commit is contained in:
Krzesimir Nowak 2021-12-01 22:41:44 +01:00
parent 54dbfd2cf4
commit 4c4b6192f9

View File

@ -1,7 +1,7 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
PYTHON_COMPAT=( python3_{6..10} )
@ -15,12 +15,15 @@ LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
S="${WORKDIR}/${PN}"
DEPEND="${PYTHON_DEPS}"
RDEPEND="${DEPEND}
dev-python/crcmod[${PYTHON_USEDEP}]"
RDEPEND="${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/crcmod[${PYTHON_USEDEP}]
')"
BDEPEND="${RDEPEND}"
src_prepare() {
# Drop unused python2 code