diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-03-25 12:29:51 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-04-02 18:29:47 +0200 |
commit | c8b8dc11f7235ad4f7b05f24bd75a85c110ec400 (patch) | |
tree | 6b8c0a96e118c82736879b05ed2b728c0cac64fd /eclass | |
parent | python-utils-r1.eclass: Make python_fix_shebang force full path (diff) | |
download | gentoo-c8b8dc11f7235ad4f7b05f24bd75a85c110ec400.tar.gz gentoo-c8b8dc11f7235ad4f7b05f24bd75a85c110ec400.tar.bz2 gentoo-c8b8dc11f7235ad4f7b05f24bd75a85c110ec400.zip |
distutils-r1.eclass: Support backend-path in pyproject.toml
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 9 |
1 files changed, 8 insertions, 1 deletions
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 |