commit: 96e7f21a53c92eb4a5c4077267bb1bf1ee8accfd Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com> AuthorDate: Mon May 1 04:16:57 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue May 2 19:11:08 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96e7f21a
distutils-r1.eclass: ensure meson-python uses a stable build directory When not passing an explicit build directory, meson-python configures meson into a build directory that is rooted in a tempdir with a random suffix. This results in unstable paths, which currently disappear after meson-python completes (either with success or failure). It doesn't handle incremental or resumed builds, and it's very difficult to debug -- for example by inspecting the logfile that meson itself prints out when the configure stage fails. Bug: https://bugs.gentoo.org/905396 Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/distutils-r1.eclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 4346a86c2097..57c0548e28ff 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1305,6 +1305,7 @@ distutils_pep517_install() { fi local root=${1} + export BUILD_DIR local -x WHEEL_BUILD_DIR=${BUILD_DIR}/wheel mkdir -p "${WHEEL_BUILD_DIR}" || die @@ -1326,6 +1327,7 @@ distutils_pep517_install() { ninjaopts = shlex.split(os.environ["NINJAOPTS"]) print(json.dumps({ + "builddir": "${BUILD_DIR}", "setup-args": sys.argv[1:], "compile-args": ["-v"] + ninjaopts, })) @@ -1341,6 +1343,7 @@ distutils_pep517_install() { ninjaopts = shlex.split(os.environ["NINJAOPTS"]) print(json.dumps({ + "builddir": "${BUILD_DIR}", "setup-args": sys.argv[1:], "compile-args": [ "-v",