diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-07-09 20:19:40 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-07-12 17:34:13 -0400 |
commit | 606533603f4a1b0af93abc0cf3bcd492545c398d (patch) | |
tree | 0e5acd09b65c7165039883b961cfe454118c09ce | |
parent | games-server/bedrock-server: add 1.19.10.03 (diff) | |
download | gentoo-606533603f4a1b0af93abc0cf3bcd492545c398d.tar.gz gentoo-606533603f4a1b0af93abc0cf3bcd492545c398d.tar.bz2 gentoo-606533603f4a1b0af93abc0cf3bcd492545c398d.zip |
distutils-r1.eclass: support >=dev-util/maturin-0.13.0
pep517 mode had some options changed around (as part of 1.0
release roadmap), notably adds --jobs/--profile, and removes
--cargo-extra-args.
--jobs is semi-optional given cargo.eclass handles that, but will
be useful in the event don't use cargo.eclass (e.g. vendored crates),
or if maturin ever uses it internally for non-cargo bits.
Errors out on unrecognized options, so split in two blocks with intend
to cleanup the old once a 0.13.x is stable rather than do messy
per-option conditions (likely won't stable .0, releases are frequent).
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r-- | eclass/distutils-r1.eclass | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 612db00e36b7..2de70fd13ffa 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1442,12 +1442,22 @@ distutils-r1_python_compile() { 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" + if has_version '>=dev-util/maturin-0.13'; then + # auditwheel may auto-bundle libraries (bug #831171), + # also support cargo.eclass' IUSE=debug if available + local -x MATURIN_PEP517_ARGS=" + --jobs=$(makeopts_jobs) + --skip-auditwheel + $(in_iuse debug && usex debug --profile=dev '') + " + else + # legacy support, can cleanup when depend on >=0.13 + local -x MATURIN_PEP517_ARGS=" + --skip-auditwheel + $(in_iuse debug && usex debug \ + --cargo-extra-args=--profile=dev '') + " + fi ;; no) return |