backend-path
parameter in pyproject.toml is ignored when installing from sdist
#7504
Labels
backend-path
parameter in pyproject.toml is ignored when installing from sdist
#7504
Environment
Description
I'm using a custom build backend for my project, and created the following
pyproject.toml
file:However, after building an sdist and trying to install it, the following error emerges:
The module in question is just a single file
ext.py
located in the root directory of my source distribution (and I checked, the file is really there in the sdist tarball). It appears that pip fails to find it because the optionbackend-path
is not properly handled.Looking at the file
_in_process.py
that produces the error, I can see that the backend path is supposed to arrive via thePEP517_BACKEND_PATH
environment variable, and that variable is set inPep517HookCaller._call_hook()
("_vendor/pep517/wrappers.py"). After manually adding a stacktrace printout to the constructor of Pep517HookCaller, I observe that it is invoked viaThus, the problem can be traced to file "_internal/req/req_install.py" lines 548-550:
as you can see, this invocation of the constructor passes only the
build_backend
variable, but not thebackend_path
, which causes the build process to fail later on.Expected behavior
Pip should be able to instal from sdists PEP-517 compliant packages that use in-source-tree build backends.
The text was updated successfully, but these errors were encountered: