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

Make pyproject.toml PEP 621 compliant #1734

Closed
wants to merge 1 commit into from

Conversation

simontegelid
Copy link

The issue is (had issues with building this with buildroot), which requires this to be correct:

$ validate-pyproject pyproject.toml                          
Invalid file: pyproject.toml
[ERROR] `project.license` must be valid exactly by one definition (2 matches found):

    - keys:
        'file': {type: string}
      required: ['file']
    - keys:
        'text': {type: string}
      required: ['text']

For more info: https://peps.python.org/pep-0621/#license

After this change:

$ validate-pyproject pyproject.toml
Valid file: pyproject.toml

For the record:

$ validate-pyproject --version     
validate_pyproject 0.10.1

@Kludex
Copy link
Sponsor Member

Kludex commented Oct 27, 2022

@ofek do you have instructions here?

@iudeen
Copy link
Contributor

iudeen commented Oct 27, 2022

Based on the Hatch Documentation the existing one seems fine.
Also check https://peps.python.org/pep-0639/#add-string-value-to-license-key

PEP 639 supersedes PEP 621?

@simontegelid
Copy link
Author

PEP 621 is a bit vague in that "The table may have one of two keys" (just "may") and at the same time "A practical string value for the license key has been purposefully left out to allow for a future PEP to specify support for SPDX expressions". Seems like PEP 639 deprecate license sub keys https://peps.python.org/pep-0639/#deprecate-license-key-table-subkeys (had missed this PEP until now). What a mess. So, maybe it's an error to merge this after all.

@Kludex
Copy link
Sponsor Member

Kludex commented Oct 27, 2022

So... Do we close this?

@ofek
Copy link
Contributor

ofek commented Oct 27, 2022

related: psf/black#3326 (comment)

@iudeen
Copy link
Contributor

iudeen commented Oct 27, 2022

Is it only the moon launch that's delaying the approval of PEP639?😂

@ofek
Copy link
Contributor

ofek commented Oct 27, 2022

yup lollll

@Kludex
Copy link
Sponsor Member

Kludex commented Oct 28, 2022

So, maybe it's an error to merge this after all.

Ok. Thanks. 🙏

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.

4 participants