Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract the Generator from the WHEEL file as metadata #12436

Open
ofek opened this issue Oct 26, 2022 · 5 comments
Open

Extract the Generator from the WHEEL file as metadata #12436

ofek opened this issue Oct 26, 2022 · 5 comments
Labels
blocked Issues we can't or shouldn't get to yet feature request needs discussion a product management/policy issue maintainers and users should discuss

Comments

@ofek
Copy link
Contributor

ofek commented Oct 26, 2022

What's the problem this feature will solve?

Allow easy discovery of what built the artifacts and at what version

Describe the solution you'd like

  1. Section on the side showing the first (multiple wheels possible) parsed build backend, or the full set
  2. Add the backend to wheel JSON API response

Additional context

https://discuss.python.org/t/improving-discoverability-of-build-backends/20140/3

@ofek ofek added feature request requires triaging maintainers need to do initial inspection of issue labels Oct 26, 2022
@di
Copy link
Member

di commented Oct 26, 2022

Thanks for the feature request. Could you add more detail about what the use case is here?

Would something like https://inspector.pypi.io/ suit this use case? e.g. https://inspector.pypi.io/project/hatch/1.6.3/packages/59/ab/44150b2177678139e5d6f5bf922adbd9b3f39c4cdbf7091fef1c63ebd47d/hatch-1.6.3-py3-none-any.whl/hatch-1.6.3.dist-info/WHEEL#line.2

Why does it need to be included in a machine-readable API?

@di di added needs discussion a product management/policy issue maintainers and users should discuss and removed requires triaging maintainers need to do initial inspection of issue labels Oct 26, 2022
@fungi
Copy link

fungi commented Oct 28, 2022

It's possible I'm confused as to the relationship of this request to the build backend classifier discussion, but is it assumed that the wheel generator reflects the PEP-517 build backend used? According to the PEP, wheel generation is the domain of the build frontend, which in at least some cases will be an entirely separate program from the backend (and is the case for a backend I maintain, which relies on the wheel library to create wheels from the sdists that backend builds, so its wheels always have a generator of bdist_wheel (some version) in them which it effectively can't override as that's hard-coded into wheel itself).

@ofek
Copy link
Contributor Author

ofek commented Oct 28, 2022

Could you add more detail about what the use case is here? [...] Why does it need to be included in a machine-readable API?

  • Tracking usage and upgrade patterns
  • Ability to tell if a release was built by a version that had a bug or CVE that affects the contents

According to the PEP, wheel generation is the domain of the build frontend

Which PEP? That's 100% not true, pip, build, etc. do not modify the wheel

is it assumed that the wheel generator reflects the PEP-517 build backend used? [...] in at least some cases will be an entirely separate program from the backend

It should imo as that is what every backend but setuptools does (or users of wheel)

@fungi
Copy link

fungi commented Oct 28, 2022

Apologies, you're right I misinterpreted the terminology section of PEP 517. Just to be clear, though, I maintain a build backend which creates sdists and then relies on the wheel library to create wheels from those, so the wheel generator metadata won't reflect the name of the the build backend for projects relying on it (and as you point out, the same goes for projects using SetupTools, which isn't exactly a negligible subset).

@ofek
Copy link
Contributor Author

ofek commented Oct 28, 2022

pypa/wheel#479

@miketheman miketheman added the blocked Issues we can't or shouldn't get to yet label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issues we can't or shouldn't get to yet feature request needs discussion a product management/policy issue maintainers and users should discuss
Projects
None yet
Development

No branches or pull requests

4 participants