-
-
Notifications
You must be signed in to change notification settings - Fork 227
PEP 639 compliance #1166
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
base: develop
Are you sure you want to change the base?
PEP 639 compliance #1166
Conversation
ca30599 to
7cb93f1
Compare
|
windows errors are unrelated and fixed in another pr |
|
this implicitly makes the project python 3.9 plus - so it will have to wait until after the 8.4 release as i want to ensure bugfixes for build issues with python3.8 and 3.9 deliver to down-streams/enterprise distro users |
|
Additionally, part of the ecosystem ( |
7cb93f1 to
c0135bd
Compare
pyproject.toml
Outdated
| readme = "README.md" | ||
| license.file = "LICENSE" | ||
| license = "MIT" | ||
| license-files = ["LICENSE"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe setuptools does not need an explicit license-files key according to Controlling files in the distribution:
- All files specified by the
license-filesconfiguration parameter inpyproject.tomland/or equivalent insetup.cfg/setup.py; note that if you don’t explicitly set this parameter,setuptoolswill include any files that match the following glob patterns:LICEN[CS]E*,COPYING*,NOTICE*,AUTHORS**;
@RonnyPfannschmidt Do you prefer implicit or explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implicit please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps implicit is not a good idea after all. From Appendix: Rejected Ideas:
Use a default value for
license-filesif not specifiedA previous draft of the PEP proposed a default value for detecting license files in case the users have not declared any and not marked the key as dynamic. That value was defined as an array of globs:
["LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*"]However, this would create an exception among the existing metadata, as no other key has got implicit defaults defined. Implicit values in
pyproject.tomlkeys are delegated to the dynamic field, which is specified as being calculated. Also, the values were chosen arbitrarily, without a strong justification why they should pose a standard.
The implicit default values look like a leftover from an experimental feature that eventually got rejected.
0d02ca6 to
01877f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for preparing this - the failing tests are from python versions to remove
|
afte the next release i'll take this into the branch for the next version |
Indeed setuptools will automatically pick up files with standard names, including `LICEN[CS]E*`: https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
649e4ee to
2121cde
Compare
|
i merged this in my prep branch, please no longer force push as that would disconnect history |
This merges the PEP 639 compliance changes from PR pypa#1166: - Updates license format from 'license.file' to 'license = "MIT"' - Bumps setuptools requirement to >=77.0.3 for PEP 639 support - Removes 'License :: OSI Approved :: MIT License' classifier (redundant with new license field) - License file auto-detection relies on setuptools defaults Co-authored-by: Dimitri Papadopoulos <[email protected]>
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-and-license-files.