Use the wheel name returned by build_wheel() rather than trying to guess
it from WHEEL_DIR.
Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 81eea83c67b3..22070f6b74f4 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1032,22 +1032,18 @@ distutils-r1_python_compile() {
local build_backend=$(_distutils-r1_get_backend)
einfo " Building the wheel via ${build_backend}"
- "${EPYTHON}" -c "import ${build_backend%:*}; \
+ local wheel=$("${EPYTHON}" -c "import ${build_backend%:*}; \
import os; \
- ${build_backend/:/.}.build_wheel(os.environ['WHEEL_BUILD_DIR'])" ||
- die "Wheel build failed"
-
- local wheel=( "${WHEEL_BUILD_DIR}"/*.whl )
- if [[ ${#wheel[@]} -ne 1 ]]; then
- die "Incorrect number of wheels created (${#wheel[@]}): ${wheel[*]}"
- fi
+ print(${build_backend/:/.}.build_wheel(os.environ['WHEEL_BUILD_DIR']))" ||
+ die "Wheel build failed")
+ [[ -n ${wheel} ]] || die "No wheel name returned"