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 <mgo...@gentoo.org> --- .../60distutils-use-setuptools | 20 +++++++++++++------ 1 file 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 } -- 2.31.1