From 57444e7cbc265a2a02b17240c829a195327467c3 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 20 Mar 2023 07:23:56 +0000 Subject: [PATCH] eclass/distutils-r1: Sync with Gentoo It's from Gentoo commit 2cba2db27919bc449ed2a7bf7ed3259c6b96e65f. --- .../portage-stable/eclass/distutils-r1.eclass | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/distutils-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/distutils-r1.eclass index 95911f912c..78f5365828 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/distutils-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/distutils-r1.eclass @@ -44,9 +44,9 @@ # For more information, please see the Python Guide: # https://projects.gentoo.org/python/guide/ -case ${EAPI:-0} in +case ${EAPI} in 7|8) ;; - *) die "EAPI=${EAPI:-0} not supported";; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac # @ECLASS_VARIABLE: DISTUTILS_OPTIONAL @@ -169,7 +169,8 @@ esac # ${DISTUTILS_DEPS}" # @CODE -if [[ ! ${_DISTUTILS_R1} ]]; then +if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then +_DISTUTILS_R1_ECLASS=1 inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs @@ -179,14 +180,6 @@ else inherit python-single-r1 fi -fi - -if [[ ! ${DISTUTILS_OPTIONAL} ]]; then - EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install -fi - -if [[ ! ${_DISTUTILS_R1} ]]; then - _distutils_set_globals() { local rdep bdep if [[ ${DISTUTILS_USE_PEP517} ]]; then @@ -2107,5 +2100,8 @@ distutils-r1_src_install() { return ${ret} } -_DISTUTILS_R1=1 +fi + +if [[ ! ${DISTUTILS_OPTIONAL} ]]; then + EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install fi