commit:     c68108e4e7f72b6fe6254caf426929610e188f91
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 24 06:41:08 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Apr  2 07:06:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c68108e4

distutils-r1.eclass: Use unique setuptools build directories

Add a dynamic component to the build directory used by setuptools,
to enable calling distutils-r1_python_compile multiple times without
having the builds share the same build directory (and therefore end up
being combined).

Closes: https://bugs.gentoo.org/951853
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/distutils-r1.eclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 27f2dcebc9f9..3e432101968a 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1490,11 +1490,15 @@ distutils-r1_python_compile() {
                *)
                        # we do this for all build systems, since other backends
                        # and custom hooks may wrap setuptools
+                       #
+                       # we are appending a dynamic component so that
+                       # distutils-r1_python_compile can be called multiple
+                       # times and don't end up combining resulting packages
                        mkdir -p "${BUILD_DIR}" || die
                        local -x 
DIST_EXTRA_CONFIG="${BUILD_DIR}/extra-setup.cfg"
                        cat > "${DIST_EXTRA_CONFIG}" <<-EOF || die
                                [build]
-                               build_base = ${BUILD_DIR}/build
+                               build_base = 
${BUILD_DIR}/build${#DISTUTILS_WHEELS[@]}
 
                                [build_ext]
                                parallel = $(makeopts_jobs "${MAKEOPTS} ${*}")

Reply via email to