Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 02 Apr 2022 16:29:55
Message-Id: 1648916987.c8b8dc11f7235ad4f7b05f24bd75a85c110ec400.mgorny@gentoo
1 commit: c8b8dc11f7235ad4f7b05f24bd75a85c110ec400
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 25 11:29:51 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 2 16:29:47 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8b8dc11
7
8 distutils-r1.eclass: Support backend-path in pyproject.toml
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 eclass/distutils-r1.eclass | 9 ++++++++-
13 1 file changed, 8 insertions(+), 1 deletion(-)
14
15 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
16 index ed2e9f70269f..0491452104be 100644
17 --- a/eclass/distutils-r1.eclass
18 +++ b/eclass/distutils-r1.eclass
19 @@ -1015,8 +1015,15 @@ distutils_pep517_install() {
20 einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
21 local wheel=$(
22 "${EPYTHON}" - 3>&1 >&2 <<-EOF || die "Wheel build failed"
23 - import ${build_backend%:*}
24 import os
25 + import sys
26 + import tomli
27 +
28 + sys.path[:0] = (tomli.load(open("pyproject.toml", "rb"))
29 + .get("build-system", {})
30 + .get("backend-path", []))
31 +
32 + import ${build_backend%:*}
33 print(${build_backend/:/.}.build_wheel(os.environ['WHEEL_BUILD_DIR']),
34 file=os.fdopen(3, 'w'))
35 EOF