diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /eclass/python-r1.eclass | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'eclass/python-r1.eclass')
-rw-r--r-- | eclass/python-r1.eclass | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 2f8cfa0316d9..3471e17bdde6 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -625,6 +625,24 @@ _python_multibuild_wrapper() { python_foreach_impl() { debug-print-function ${FUNCNAME} "${@}" + if [[ ${_DISTUTILS_R1} ]]; then + if has "${EBUILD_PHASE}" prepare configure compile test install && + [[ ! ${_DISTUTILS_CALLING_FOREACH_IMPL} && + ! ${_DISTUTILS_FOREACH_IMPL_WARNED} ]] + then + eqawarn "python_foreach_impl has been called directly while using distutils-r1." + eqawarn "Please redefine python_*() phase functions to meet your expectations" + eqawarn "instead." + _DISTUTILS_FOREACH_IMPL_WARNED=1 + + if ! has "${EAPI}" 6 7 8; then + die "Calling python_foreach_impl from distutils-r1 is banned in EAPI ${EAPI}" + fi + fi + # undo the eclass-set value to catch nested calls + local _DISTUTILS_CALLING_FOREACH_IMPL= + fi + local MULTIBUILD_VARIANTS _python_obtain_impls |