* [gentoo-dev] [PATCH] distutils-r1.eclass: Support backend-path in pyproject.toml
@ 2022-03-25 11:51 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2022-03-25 11:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index ed2e9f70269f..0491452104be 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1015,8 +1015,15 @@ distutils_pep517_install() {
einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
local wheel=$(
"${EPYTHON}" - 3>&1 >&2 <<-EOF || die "Wheel build failed"
- import ${build_backend%:*}
import os
+ import sys
+ import tomli
+
+ sys.path[:0] = (tomli.load(open("pyproject.toml", "rb"))
+ .get("build-system", {})
+ .get("backend-path", []))
+
+ import ${build_backend%:*}
print(${build_backend/:/.}.build_wheel(os.environ['WHEEL_BUILD_DIR']),
file=os.fdopen(3, 'w'))
EOF
--
2.35.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-25 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-25 11:51 [gentoo-dev] [PATCH] distutils-r1.eclass: Support backend-path in pyproject.toml Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox