Better log on guess_build_system error
Description
On a project have a bad pyproject.toml file without the line
build-backend = "poetry.core.masonry.api"
the idea is to clearly indicate this line is missing
Implementation ideas
if [[ "$build_backend" ]]
then
case "$build_backend" in
poetry.core.masonry.api)
log_info "--- Build system auto-detected: PEP 517 with Poetry backend"
export PYTHON_BUILD_SYSTEM="poetry"
return
;;
setuptools.build_meta)
log_info "--- Build system auto-detected: PEP 517 with Setuptools backend"
export PYTHON_BUILD_SYSTEM="setuptools"
return
;;
add this
"")
log_error "--- Build system auto-detected: PEP 517 but file pyproject.toml don't have build-backend = \"XXX\""
exit 1
;;
rest of the template code
*)
log_error "--- Build system auto-detected: PEP 517 with unsupported backend \\e[33;1m${build_backend}\\e[0m: please read template doc"
exit 1
;;
esac
fi
fi
Edited by Gaëtan Montury