Skip to content

Conversation

@DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Jul 31, 2025

@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review July 31, 2025 08:46
@RonnyPfannschmidt
Copy link
Contributor

windows errors are unrelated and fixed in another pr

@RonnyPfannschmidt
Copy link
Contributor

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

@RonnyPfannschmidt RonnyPfannschmidt added this to the v9.0 milestone Jul 31, 2025
@DimitriPapadopoulos
Copy link
Contributor Author

Additionally, part of the ecosystem (pip-licenses) doesn't support PEP 639 yet.

pyproject.toml Outdated
readme = "README.md"
license.file = "LICENSE"
license = "MIT"
license-files = ["LICENSE"]
Copy link
Contributor Author

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-files configuration parameter in pyproject.toml and/or equivalent in setup.cfg/setup.py; note that if you don’t explicitly set this parameter, setuptools will include any files that match the following glob patterns: LICEN[CS]E*, COPYING*, NOTICE*, AUTHORS**;

@RonnyPfannschmidt Do you prefer implicit or explicit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implicit please

Copy link
Contributor Author

@DimitriPapadopoulos DimitriPapadopoulos Oct 12, 2025

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-files if not specified

A 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.toml keys 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.

Copy link
Contributor

@RonnyPfannschmidt RonnyPfannschmidt left a 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

@RonnyPfannschmidt
Copy link
Contributor

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
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the PEP639 branch 2 times, most recently from 649e4ee to 2121cde Compare October 12, 2025 10:40
@RonnyPfannschmidt RonnyPfannschmidt changed the base branch from main to develop October 12, 2025 18:25
@RonnyPfannschmidt
Copy link
Contributor

i merged this in my prep branch, please no longer force push as that would disconnect history

RonnyPfannschmidt added a commit to RonnyPfannschmidt/setuptools_scm that referenced this pull request Oct 12, 2025
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]>
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.

2 participants