Skip to content

Commit

Permalink
distutils-r1.eclass: Support backend-path in pyproject.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Apr 2, 2022
1 parent 85820b0 commit c8b8dc1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion eclass/distutils-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c8b8dc1

Please sign in to comment.