python3-pep517.sh (1021B)
1# 2# This style is for templates installing python3 modules adhering to PEP517 3# 4 5do_build() { 6 # No PEP517 build tool currently supports compiled extensions 7 # Thus, there is no need to accommodate cross compilation here 8 : ${make_build_target:=.} 9 10 mkdir -p build 11 TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \ 12 --no-build-isolation ${make_build_args} ${make_build_target} 13} 14 15do_check() { 16 if python3 -m pytest --help >/dev/null 2>&1; then 17 python3 -m pytest ${make_check_args} ${make_check_target} 18 else 19 msg_warn "Unable to determine tests for PEP517 Python templates" 20 return 0 21 fi 22} 23 24do_install() { 25 # As with do_build, no need to accommodate cross compilation here 26 : ${make_install_target:=${pkgname#python3-}-${version}-*-*-*.whl} 27 28 # If do_build was overridden, make sure the TMPDIR exists 29 mkdir -p build 30 TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \ 31 --root ${DESTDIR} --no-deps --no-build-isolation \ 32 --no-clean ${make_install_args} ${make_install_target} 33}