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

Add SPDX license data #799

Closed
wants to merge 3 commits into from
Closed

Add SPDX license data #799

wants to merge 3 commits into from

Conversation

ofek
Copy link
Contributor

@ofek ofek commented May 10, 2024

In response to this comment by a maintainer expressing approval for license parsing functionality, this PR introduces an invoke task to update an enumeration encoded as a Python structure.

This setup is the same as what Hatchling does:

The parser itself and what the API should look like will be discussed in a separate PR.

The file may be generated by running: invoke licenses.update

@ofek ofek force-pushed the spdx branch 4 times, most recently from 4ab216d to 3d8d9af Compare May 10, 2024 21:22
@befeleme
Copy link

befeleme commented Sep 3, 2024

I've got one suggestion: The PEP specifies that the supported SPDX license list is version 3.17 or any later compatible version - should we add a check that nothing gets lost when updating to a newer list version?

The code looks straightforward to me and it works fine.
I'd suggest adding print(f"File written: {SPDX_LICENSES}") at the end of tasks/licenses.py - I know the path is stored somewhere else, but seeing it printed out would save me a few clicks.

I wonder whether this should be a job running on every PR or only a part of the build path?

Side note: the other task, pep440, doesn't seem to work anymore. I'll open an issue.

tasks/licenses.py Outdated Show resolved Hide resolved
ewdurbin added a commit to ewdurbin/packaging that referenced this pull request Sep 4, 2024
Per feedback, integrate a variant of pypa#799 that builds a minimal JSON dataset to feed vendored license-expression

32K	src/packaging/_spdx.json

vs

848K	src/packaging/_vendor/license_expression/data/scancode-licensedb-index.json
ewdurbin added a commit to ewdurbin/packaging that referenced this pull request Sep 4, 2024
Per feedback, integrate a variant of pypa#799 that builds a minimal JSON dataset to feed vendored license-expression

32K	src/packaging/_spdx.json

vs

848K	src/packaging/_vendor/license_expression/data/scancode-licensedb-index.json
ewdurbin added a commit to ewdurbin/packaging that referenced this pull request Sep 5, 2024
Per feedback, integrate a variant of pypa#799 that builds a minimal JSON dataset to feed vendored license-expression

32K	src/packaging/_spdx.json

vs

848K	src/packaging/_vendor/license_expression/data/scancode-licensedb-index.json
@ofek
Copy link
Contributor Author

ofek commented Sep 5, 2024

Superseded by #828

@ofek ofek closed this Sep 5, 2024
@ofek ofek deleted the spdx branch September 5, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants