summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass14
1 files changed, 5 insertions, 9 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 81eea83c67b3..ef7bea8d36fa 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']), \
+ file=os.fdopen(3, 'w'))" 3>&1 >&2 || die "Wheel build failed")
+ [[ -n ${wheel} ]] || die "No wheel name returned"
local root=${BUILD_DIR}/install
einfo " Installing the wheel to ${root}"
# NB: --compile-bytecode does not produce the correct paths,
# and python_optimize doesn't handle being called outside D,
# so we just defer compiling until the final merge
- "${EPYTHON}" -m installer -d "${root}" "${wheel}" \
+ "${EPYTHON}" -m installer -d "${root}" "${WHEEL_BUILD_DIR}/${wheel}" \
--no-compile-bytecode ||
die "installer failed"