package-url / purl-spec

A minimal specification for purl aka. a package "mostly universal" URL, join the discussion at https://gitter.im/package-url/Lobby
https://github.com/package-url/purl-spec
Other
696 stars 161 forks source link

pypi: Enhance guidance on how to reconstruct a "file_name" qualifier from inspecting installed Python packages #349

Open pombredanne opened 23 hours ago

pombredanne commented 23 hours ago

As a follow up to:

So to recap, I think we can use the existing file_name qualifier as-is, but we would need to provide guidance on how a tool can reconstruct this from an installed distribution. Can you update this PR along these lines, using file_name and providing some guidance on its usage, including pointers on how to reconstruct a filename from an installed PyPI wheel? This would be wonderful! (Sorry for it taking so long!)

matt-phylum commented 22 hours ago

The formats are:

I don't know if pip keeps a record of where the package came from so it may be difficult to figure out the appropriate name from an install package. Packages that were downloaded as a source distribution may appear to have been installed from a binary distribution.