commit: a830c1249c408185b448ecb2b9e8a1eb997fac4a
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 05:45:45 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 12:08:49 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a830c124
distutils-r1.eclass: support maturin backend
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
eclass/distutils-r1.eclass | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index dd7f90340141..49c98290f30f 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -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