From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 02/30] distutils-r1.eclass: Get wheel name from the backend
Date: Sun, 6 Feb 2022 13:48:13 +0100 [thread overview]
Message-ID: <20220206124841.1299133-3-mgorny@gentoo.org> (raw)
In-Reply-To: <20220206124841.1299133-1-mgorny@gentoo.org>
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"
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"
--
2.35.1
next prev parent reply other threads:[~2022-02-06 12:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-06 12:48 [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 01/30] distutils-r1.eclass: Split backend getting code into a function Michał Górny
2022-02-06 12:48 ` Michał Górny [this message]
2022-02-06 12:48 ` [gentoo-dev] [PATCH 03/30] distutils-r1.eclass: Create distutils_pep517_install helper Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 04/30] dev-python/isort: Switch to PEP 517 build Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 05/30] python-r1.eclass: Remove deprecated python_gen_usedep Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 06/30] python-any-r1.eclass: Move EPYTHON validity check to python_setup() Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 07/30] python-utils-r1.eclass: Add function to run python_check_deps() Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 08/30] python-any-r1.eclass: Explain the reason for interpreter choice Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 09/30] python-utils-r1.eclass: Report _python_run_check_deps verbosely Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 10/30] python-utils-r1.eclass: Inline python_is_installed Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 11/30] distutils-r1.eclass: Fix has_version for distutils_enable_sphinx Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 12/30] python-utils-r1.eclass: Add a verbose python_has_version() wrapper Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 13/30] distutils-r1.eclass: Use python_has_version in ...enable_sphinx Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 14/30] python-utils-r1.eclass: Fix sphinx_build for non-autodoc case Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 15/30] python-utils-r1.eclass: Remove deprecated python_export Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 16/30] python-utils-r1.eclass: Remove python_wrapper_setup Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 17/30] python-single-r1.eclass: Inline & simplify USE-deps in gen_cond_dep Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 18/30] python-r1.eclass: Improve comment for USE-dep generation Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 19/30] python-utils-r1.eclass: Remove python_is_python3 Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 20/30] python-single-r1.eclass: Remove PYTHON_MULTI_USEDEP Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 21/30] distutils-r1.eclass: Use heredoc instead of "python -c" Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 22/30] python-utils-r1.eclass: " Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 23/30] python-utils-r1.eclass: Remove old phase check from python_optimize Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 24/30] python-utils-r1.eclass: Add status messages to python_optimize Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 25/30] python-utils-r1.eclass: Support matching impls by stdlib version Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 26/30] dev-python/jaraco-text: Use python_gen_cond_dep w/ stdlib ver Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 27/30] python-any-r1.eclass: Do not test EPYTHON twice Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 28/30] python-utils-r1.eclass: Add QA check for obsolete PYTHON_COMPAT Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 29/30] dev-libs/libwacom: Use python_has_version for verbose output Michał Górny
2022-02-08 23:00 ` Matt Turner
2022-02-08 23:18 ` Matt Turner
2022-02-08 23:54 ` Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 30/30] distutils-r1.eclass: Add min version to tomli dep Michał Górny
2022-02-09 7:34 ` [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all Sam James
2022-02-09 9:22 ` Joshua Kinard
2022-02-09 9:39 ` Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220206124841.1299133-3-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox