pip wheel should provide the name of the resulting file
See original GitHub issueWhat’s the problem this feature will solve?
We want to adopt PEP 517 & 518 for Fedora, which uses separate build
and install
phases. We want to run these commands (separately, and as automatically as possible):
pip wheel
pip install <resulting wheel>
The problem is that while the PEP 517 build_wheel
hook returns the basename of the built wheel, pip
AFAIK doesn’t share this information any further. We simply don’t know where the built wheel is located.
(Miro asked in packaging Discourse to see if this should go in the non-normative section of PEP 517. The response was that this would be a good feature request for pip
, but that’s it.)
Describe the solution you’d like Either:
- Print the wheel name in some parseable format, like:
Resulting wheel: foo-1.2.3-py2.py3-none-any.whl
, call this an API, and include tests to ensure it doesn’t change. - Add a option to name of a file to which the wheel name would be written.
Alternative Solutions Any other way to get the wheel name from pip would work. We don’t want to guess/construct it ourselves – we feel that should be pip’s job to provide the complete name.
Additional
We’re happy to provide the PR if y’all agree it would be an improvement.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
I see that this was done in #6377, but I’m kind of curious why we couldn’t do something like this instead:
IMO this ends up being more robust compared to writing the filenames to a file, and avoids issues like:
Following #7420, would you consider an alternative approach that lets
pip wheel
output a JSON file summarizing what it did?It could start small (with the list of wheel names it produced), and would be extensible. It could include, for instance, information about direct URL references (e.g. how VCS references were resolved), and possibly in the future it could contain information about the result of the dependency resolution algorithm.