commit: 08cb1492fe62e8f15aa0d546db59ba27ec7a5ab3 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Sat Aug 31 13:18:39 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Sep 8 18:21:29 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08cb1492
distutils-r1.eclass: Don't run cargo_env unless cargo_gen_config has run Normally, failing to run cargo_gen_config results in an error, but that is unhelpful for ebuilds with optional Cargo support. Closes: https://bugs.gentoo.org/938764 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/38041 Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/distutils-r1.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 39705c5c3c84..5a6ebdcede8a 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1253,7 +1253,9 @@ distutils_pep517_install() { fi local cmd=() config_settings= - has cargo ${INHERITED} && cmd+=( cargo_env ) + if has cargo ${INHERITED} && [[ ${_CARGO_GEN_CONFIG_HAS_RUN} ]]; then + cmd+=( cargo_env ) + fi case ${DISTUTILS_USE_PEP517} in maturin)
