distutils-r1.eclass: support maturin backend

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Ionen Wolkens
2022-04-25 14:08:49 +02:00
committed by Michał Górny
parent 0b6372ab70
commit a830c1249c
+17
View File
@@ -104,6 +104,8 @@ esac
#
# - jupyter - jupyter_packaging backend
#
# - maturin - maturin backend
#
# - pdm - pdm.pep517 backend
#
# - poetry - poetry-core backend
@@ -212,6 +214,10 @@ _distutils_set_globals() {
bdep+='
>=dev-python/jupyter_packaging-0.11.1[${PYTHON_USEDEP}]'
;;
maturin)
bdep+='
>=dev-util/maturin-0.12.7[${PYTHON_USEDEP}]'
;;
pdm)
bdep+='
>=dev-python/pdm-pep517-0.12.3[${PYTHON_USEDEP}]'
@@ -992,6 +998,9 @@ _distutils-r1_backend_to_key() {
jupyter_packaging.build_api)
echo jupyter
;;
maturin)
echo maturin
;;
pdm.pep517.api)
echo pdm
;;
@@ -1210,6 +1219,14 @@ distutils-r1_python_compile() {
esetup.py build -j "${jobs}" "${@}"
fi
;;
maturin)
# auditwheel may attempt to auto-bundle libraries, bug #831171
local -x MATURIN_PEP517_ARGS=--skip-auditwheel
# support cargo.eclass' IUSE=debug if available
in_iuse debug && use debug &&
MATURIN_PEP517_ARGS+=" --cargo-extra-args=--profile=dev"
;;
esac
if [[ ${DISTUTILS_USE_PEP517} ]]; then