diff options
author | David Seifert <soap@gentoo.org> | 2023-03-17 23:04:31 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2023-03-17 23:04:31 +0100 |
commit | 2cba2db27919bc449ed2a7bf7ed3259c6b96e65f (patch) | |
tree | c89a0929ca3e7cc95c737085614214e89450c999 /eclass/distutils-r1.eclass | |
parent | xdg.eclass: remove EAPI 5 (diff) | |
download | gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.gz gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.bz2 gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.zip |
eclass: standardize prologue/epilogue
Closes: https://github.com/gentoo/gentoo/pull/30061
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 95911f912ca0..78f53658285e 100644 --- a/eclass/distutils-r1.eclass +++ b/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 |