build-style/python3-pep517.sh: abandon pip

This commit is contained in:
Andrew J. Hesford 2022-11-08 11:48:04 -05:00 committed by Andrew J. Hesford
parent c4eb6b0c64
commit 936a6ed85d
2 changed files with 7 additions and 14 deletions

View File

@ -3,13 +3,9 @@
# #
do_build() { do_build() {
# No PEP517 build tool currently supports compiled extensions
# Thus, there is no need to accommodate cross compilation here
: ${make_build_target:=.} : ${make_build_target:=.}
: ${make_build_args:=--no-isolation --wheel}
mkdir -p build python3 -m build ${make_build_args} ${make_build_target}
TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
--no-build-isolation ${make_build_args} ${make_build_target}
} }
do_check() { do_check() {
@ -26,16 +22,12 @@ do_check() {
} }
do_install() { do_install() {
# As with do_build, no need to accommodate cross compilation here
if [ -z "${make_install_target}" ]; then if [ -z "${make_install_target}" ]; then
# Default wheel name normalizes hyphens to underscores # Default wheel name normalizes hyphens to underscores
local wheelbase="${pkgname#python3-}" local wheelbase="${pkgname#python3-}"
make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl" make_install_target="dist/${wheelbase//-/_}-${version}-*-*-*.whl"
fi fi
# If do_build was overridden, make sure the TMPDIR exists python3 -m installer --destdir ${DESTDIR} \
mkdir -p build ${make_install_args} ${make_install_target}
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}
} }

View File

@ -1,2 +1,3 @@
hostmakedepends+=" python3-pip" hostmakedepends+=" python3-build python3-installer"
lib32disabled=yes lib32disabled=yes
build_helper+=" python3"