build: project metadata in pyproject.toml PEP621#5438
Merged
Conversation
Move Streamlink's project metadata from setuptools's own `setup.cfg` to the standardized `pyproject.toml` format (PEP621) - Bump setuptools to `>=64.0.0` - Bump pip dev-requirement to `>=21.0.0` - Set two `author` entries, to keep the same `Author` and `Author-email` core metadata in the resulting sdist and bdist packages - Set `license.text` field instead of `license.file` and add the setuptools-specific `license-files` config attribute, so that the `License` and `License-File` core metadata doesn't change. License data will receive another change in the future once PEP639 comes into effect - By switching to PEP621 metadata, implicitly move the `Home-page` core metadata to `Project-URL: Homepage, ...` - Remove upper version constraint from `requires-python` - Reformat some version strings of the `dependencies` field
- Move setuptools's package discovery config and data-files config to pyproject.toml - Remove empty setup.cfg
977dfb8 to
48272be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #5401
Fresh PR in favor of #4441 (going to close that now).
Changes
This bumps the min version requirement of setuptools to 64.0.0 and replaces the project metadata defined in the setuptools-specific
setup.cfgfile with the standardized metadata format inpyproject.toml(PEP621):The important part of these changes are the resulting packaging contents (sdist and bdist), as well as the packaging metadata (core metadata). Diffs shown below.
Definition of the packaging "core metadata":
The setuptools-specific pyproject configs are still considered "BETA", but that's nothing to worry about. The "custom" (aka. non-auto) package discovery of
streamlinkandstreamlink_cliis pretty straightforward, and so is the package-data config.The additional license-files config is tagged as provisional, because PEP639 will solve the licensing mess in the package metadata spec once supported by setuptools (it'll deprecate certain core metadata fields, so this is just package-tooling specific stuff).
Resulting core metadata changes
The
Home-Pagecore metadata gets replaced with theProject-Url: Homepage, ...field.This is intended behavior of the PEP621 metadata spec because it's considered redundant. Setuptools does the correct job when writing the final package metadata by leaving out the
Home-Pagefield (so do other build backends likehatchfor example).However, there's currently a bug in pip which doesn't respect the project URL defined in the
Project-Urlmetadata field whenHome-Pageis missing (pypa/pip#11221) when runningpip showwithout the verbose flag. That shouldn't matter too much though and it'll get fixed eventually anyway.Notes
requires-pythonSee https://discuss.python.org/t/requires-python-upper-limits/12663
dependenciesfield for consistency reasonsstreamlinkwentry script works fine, just like beforeBuild
Diffs
No changes in package file structure apart from version strings in the bdist (comparing the
RECORDfile):And finally, the metadata diff (with the mentioned additional minor changes)