From 950151c57286b7becc46cd1584a446c5199db033 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Mon, 16 May 2022 10:26:50 -0400 Subject: [PATCH] build-style/python3-pep517.sh: improve default wheel selection When naming wheels, hyphens are converted to underscores in package names. Recognizing this in the build style eliminates manual definition of `make_install_target` in several templates. --- common/build-style/python3-pep517.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh index a733a521fb3..62cfac7d67d 100644 --- a/common/build-style/python3-pep517.sh +++ b/common/build-style/python3-pep517.sh @@ -23,7 +23,11 @@ do_check() { do_install() { # As with do_build, no need to accommodate cross compilation here - : ${make_install_target:=${pkgname#python3-}-${version}-*-*-*.whl} + if [ -z "${make_install_target}" ]; then + # Default wheel name normalizes hyphens to underscores + local wheelbase="${pkgname#python3-}" + make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl" + fi # If do_build was overridden, make sure the TMPDIR exists mkdir -p build