I think I need some clarification. Currently the tool “stack” consists of:
- Build backend - responsible for building the package. Chosen by the package maintainer.
- Build frontend - responsible for calling the build backend and spitting out a ready to be installed
.whl
file. Chosen by the package end-user. - Installer - responsible for installing a
.whl
file created by build backend and build frontend working together. Chosen by the package end-user.
We can consider 2 different scenarios regarding the end-user part (build frontend and installer):
- two separate tools, one being a build frontend, and one working as an installer (e.g.
pypa/build
andpradyunsg/installer
pair). - one tool working both as a build fronend and an installer (e.g.
pip
)
Am I right so far?
Given that, which part of the stack is responsible for creating a direct_url.json
? If it’s the installer, how can it know when it’s installing an editable wheel? How can it know what exactly should be inside a direct_url.json
file? Of course if the installer is consolidated in one tool with the build fronted, this information can be just passed internally, but it won’t be possible when using 2 separate tools.
If that’s the case, I think we should either:
- move the responsibility to the build frontend or build backend,
- provide an interface to pass this information to the installer,
- restrict the editable builds feature to tools that are working both as a build frontend and an installer (which I think should be avoided).