The following ebuild: EAPI=8 PYTHON_COMPAT=( python3_12 ) DISTUTILS_SINGLE_IMPL=1 DISTUTILS_USE_PEP517=no inherit distutils-r1 S="${WORKDIR}" SLOT=0 python_prepare() { : } fails with this error: * ERROR: <package> failed (prepare phase): * DISTUTILS_IN_SOURCE_BUILD is not supported in PEP517 mode * * Call stack: * ebuild.sh, line 136: Called src_prepare * environment, line 4846: Called distutils-r1_src_prepare * environment, line 2839: Called _distutils-r1_run_foreach_impl 'python_prepare' * environment, line 1710: Called distutils-r1_run_phase 'python_prepare' * environment, line 2737: Called die * The specific snippet of code: * [[ -n ${DISTUTILS_USE_PEP517} ]] && die "DISTUTILS_IN_SOURCE_BUILD is not supported in PEP517 mode"; Setting DISTUTILS_IN_SOURCE_BUILD to empty value helps.
From my understanding, I don't think python_prepare really makes sense in a post-pep517 world which doesn't support in-source build (in-source is automagic enabled if it's defined). It also further doesn't make sense for single impl given it was meant to do "per-impl" preparation, and isn't needed when there's only one. Any reason not just using src_prepare or python_prepare_all? python_prepare isn't used anywhere in the tree anymore (not counting a function named the same in non-distutils-r1 ebuild).
We don't support copying sources like that anymore.