1 |
Protect build-backend getter against stray output to stdout. |
2 |
|
3 |
Signed-off-by: Michał Górny <mgorny@g.o> |
4 |
--- |
5 |
eclass/distutils-r1.eclass | 6 ++++-- |
6 |
1 file changed, 4 insertions(+), 2 deletions(-) |
7 |
|
8 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
9 |
index 28e44cd790ef..1fe69f1a3dde 100644 |
10 |
--- a/eclass/distutils-r1.eclass |
11 |
+++ b/eclass/distutils-r1.eclass |
12 |
@@ -938,10 +938,12 @@ _distutils-r1_get_backend() { |
13 |
# if pyproject.toml exists, try getting the backend from it |
14 |
# NB: this could fail if pyproject.toml doesn't list one |
15 |
build_backend=$( |
16 |
- "${EPYTHON}" - <<-EOF 2>/dev/null |
17 |
+ "${EPYTHON}" - 3>&1 &>/dev/null <<-EOF |
18 |
+ import os |
19 |
import tomli |
20 |
print(tomli.load(open("pyproject.toml", "rb")) |
21 |
- ["build-system"]["build-backend"]) |
22 |
+ ["build-system"]["build-backend"], |
23 |
+ file=os.fdopen(3, "w")) |
24 |
EOF |
25 |
) |
26 |
fi |
27 |
-- |
28 |
2.35.1 |