summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-04-18 00:50:11 +0200
committerMichał Górny <mgorny@gentoo.org>2021-04-29 13:42:15 +0200
commit166c9795548f98e284aa25cad198657138543daa (patch)
tree922a96ba6c140b93bea9cea2ecdd57a94402cbb5 /metadata
parentinstall-qa-check.d: Extend DUS check to handle no egg-info (diff)
downloadgentoo-166c9795548f98e284aa25cad198657138543daa.tar.gz
gentoo-166c9795548f98e284aa25cad198657138543daa.tar.bz2
gentoo-166c9795548f98e284aa25cad198657138543daa.zip
install-qa-check.d: Future-proof entry point values for DUS
Accept both 'rdepend' and 'bdepend' as DISTUTILS_USE_SETUPTOOLS values for packages installing entry points. Starting with Python 3.8, these packages do not require any runtime dependency. However, we do not want to proactively bother people with updating everything and instead provide the option to start performing opt-in updates. Note that technically PyPy3 (that implements Python 3.7 at the moment) continues requiring additional dependencies for entry point support. However, we do not support PyPy3 target in stable and generally do not consider it important enough to maintain extra complexity for. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'metadata')
-rw-r--r--metadata/install-qa-check.d/60distutils-use-setuptools20
1 files changed, 14 insertions, 6 deletions
diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools b/metadata/install-qa-check.d/60distutils-use-setuptools
index 61209302ef3e..69164608fcaa 100644
--- a/metadata/install-qa-check.d/60distutils-use-setuptools
+++ b/metadata/install-qa-check.d/60distutils-use-setuptools
@@ -57,18 +57,26 @@ distutils_use_setuptools_check() {
[[ ${#expected[@]} -eq 0 ]] && expected=( no )
# *+rdepend=rdepend
has rdepend "${expected[@]}" && expected=( rdepend )
- # for the time being, entry points imply rdepend
- has entry-point "${expected[@]}" && expected=( rdepend )
- # at this point, expected should have exactly one value
- [[ ${#expected[@]} -eq 1 ]] || die "integrity error"
- if [[ ${DISTUTILS_USE_SETUPTOOLS} != ${expected} ]]; then
+ if has entry-point "${expected[@]}"; then
+ if [[ ${DISTUTILS_STRICT_ENTRY_POINTS} ]]; then
+ # option for devs to future-proof their packages
+ # please don't let ago enable it
+ expected=( bdepend )
+ else
+ # accept either rdepend or bdepend for the time being
+ # but suggest bdepend as the future-proof option
+ expected=( bdepend rdepend )
+ fi
+ fi
+
+ if ! has ${DISTUTILS_USE_SETUPTOOLS} "${expected[@]}"; then
local def=
[[ ${DISTUTILS_USE_SETUPTOOLS} == bdepend ]] && def=' (or unset)'
eqawarn "DISTUTILS_USE_SETUPTOOLS value is probably incorrect"
eqawarn " have: DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}${def}"
- eqawarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected}"
+ eqawarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected[0]}"
fi
fi
}