Protect build-backend getter against stray output to stdout.
Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 28e44cd790ef..1fe69f1a3dde 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -938,10 +938,12 @@ _distutils-r1_get_backend() {
# if pyproject.toml exists, try getting the backend from it
# NB: this could fail if pyproject.toml doesn't list one
build_backend=$(
- "${EPYTHON}" - <<-EOF 2>/dev/null
+ "${EPYTHON}" - 3>&1 &>/dev/null <<-EOF
+ import os
import tomli
print(tomli.load(open("pyproject.toml", "rb")) - ["build-system"]["build-backend"])
+ ["build-system"]["build-backend"],
+ file=os.fdopen(3, "w"))
EOF
)
fi
--
2.35.1
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)