From 936a6ed85d23702523646480bfbc8bea8b78a500 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 8 Nov 2022 11:48:04 -0500 Subject: [PATCH] build-style/python3-pep517.sh: abandon pip --- common/build-style/python3-pep517.sh | 18 +++++------------- .../environment/build-style/python3-pep517.sh | 3 ++- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh index 0994384aacf..b8bdee58520 100644 --- a/common/build-style/python3-pep517.sh +++ b/common/build-style/python3-pep517.sh @@ -3,13 +3,9 @@ # do_build() { - # No PEP517 build tool currently supports compiled extensions - # Thus, there is no need to accommodate cross compilation here : ${make_build_target:=.} - - mkdir -p build - TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \ - --no-build-isolation ${make_build_args} ${make_build_target} + : ${make_build_args:=--no-isolation --wheel} + python3 -m build ${make_build_args} ${make_build_target} } do_check() { @@ -26,16 +22,12 @@ do_check() { } do_install() { - # As with do_build, no need to accommodate cross compilation here if [ -z "${make_install_target}" ]; then # Default wheel name normalizes hyphens to underscores local wheelbase="${pkgname#python3-}" - make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl" + make_install_target="dist/${wheelbase//-/_}-${version}-*-*-*.whl" fi - # If do_build was overridden, make sure the TMPDIR exists - mkdir -p build - TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \ - --root ${DESTDIR} --no-deps --no-build-isolation \ - --no-clean ${make_install_args} ${make_install_target} + python3 -m installer --destdir ${DESTDIR} \ + ${make_install_args} ${make_install_target} } diff --git a/common/environment/build-style/python3-pep517.sh b/common/environment/build-style/python3-pep517.sh index 48f0c1b17f4..f4faf980f50 100644 --- a/common/environment/build-style/python3-pep517.sh +++ b/common/environment/build-style/python3-pep517.sh @@ -1,2 +1,3 @@ -hostmakedepends+=" python3-pip" +hostmakedepends+=" python3-build python3-installer" lib32disabled=yes +build_helper+=" python3"