-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Reliable way of retrieving license files #441
Comments
It's my understanding that the Python Packaging Authority is working on a project to specify license details in a structured form, such as an SPDX entry in the metadata spec. That would be my preferred means of soliciting and advertising the license of a package. The goal of
Yes, maybe. The implementation is already getting a little out of hand. The implementation currently returns the result of RECORD, installed-files.txt, or SOURCES.txt. I guess it could additionally fall back to attempting to enumerate files from the dist-info directory, but now there would be another hidden variant of the behavior (sometimes users would get the full file list and other times invisibly only get the metadata files). That all seems undesirable on the whole.
This approach sounds closer to viable. Oh! If
Does that provide everything you need? |
@abravalheri Does that snippet not illustrate a way to satisfy the need of the reported issue? |
Yes, thank you very much @jaraco. Sorry for the delay in replying. Probably this solution will work independently from backend once the new PEP is approved. |
When I need to retrieve the license files from an installed project, I usually go for something like:
However, I recently found out that some OSs will remove the
RECORD
file after installation, this means thatfiles
will returnNone
...With that in mind, I wonder if:
files()
to least at least the contents of the.dist-info
folder even if theRECORD
file is deleted?Maybe it does not have to rely on
files()
, it could use the value ofLicense-File
inMETADATA
...The text was updated successfully, but these errors were encountered: