Signed-off-by: Michał Górny <mgo...@gentoo.org>
---
 eclass/distutils-r1.eclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 1037c0abe239..89223b248157 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1532,6 +1532,14 @@ distutils_pep517_install() {
        DISTUTILS_WHEEL_PATH=${WHEEL_BUILD_DIR}/${wheel}
 }
 
+# @VARIABLE: DISTUTILS_WHEELS
+# @DESCRIPTION:
+# An array of wheels created as a result of distutils-r1_python_compile.
+# Note that this includes only wheels implicitly created by the eclass,
+# and not wheels created as a result of direct distutils_pep517_install
+# calls in the ebuild.
+DISTUTILS_WHEELS=()
+
 # @FUNCTION: distutils-r1_python_compile
 # @USAGE: [additional-args...]
 # @DESCRIPTION:
@@ -1541,6 +1549,7 @@ distutils_pep517_install() {
 #
 # If DISTUTILS_USE_PEP517 is set to any other value, builds a wheel
 # using the PEP517 backend and installs it into ${BUILD_DIR}/install.
+# Path to the wheel is then added to DISTUTILS_WHEELS array.
 #
 # In legacy mode, runs 'esetup.py build'. Any parameters passed to this
 # function will be appended to setup.py invocation, i.e. passed
@@ -1576,6 +1585,7 @@ distutils-r1_python_compile() {
 
        if [[ ${DISTUTILS_USE_PEP517} ]]; then
                distutils_pep517_install "${BUILD_DIR}/install"
+               DISTUTILS_WHEELS+=( "${DISTUTILS_WHEEL_PATH}" )
        fi
 }
 
-- 
2.45.1


Reply via email to