setup: switch to declarative package metadata#4113
Merged
gravyboat merged 1 commit intoOct 23, 2021
Conversation
- move static package metadata to setup.cfg
- rename deprecated license_file field to license_files
Remove setuptools arguments:
- test_suite:
Unneeded, as we disable the deprecated setuptools test command
Keep dynamic setuptools arguments:
- version/cmdclass:
For writing static version info via versioneer
- install_requires:
Some dependencies still depend on special environment variables
instead of package "extra" dependency fields
- entry_points:
The `gui_scripts` entry point should only be set when building wheels
for Windows via `--plat-name={win32,win-amd64,cygwin}`
- data_files:
All data files are optional and should not cause the build to fail if
they are missing, eg. when building from sdist
9067df9 to
eb1cde2
Compare
gravyboat
approved these changes
Oct 22, 2021
gravyboat
left a comment
Member
There was a problem hiding this comment.
This looks good to me when comparing against the setup.cfg options from the setuptools documentation, other changes look good as well. We can wait for someone else to approve if you would like, but I'm happy with this change and don't see any errors.
Member
Author
|
Let's get this merged later today then if there's no further review. It's all looking fine as far as I can tell. Btw, there's |
3 tasks
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.
Remove setuptools arguments:
Unneeded, as we disable the deprecated setuptools test command
Keep dynamic setuptools arguments:
For writing static version info via versioneer
Some dependencies still depend on special environment variables
instead of package "extra" dependency fields
The
gui_scriptsentry point should only be set when building wheelsfor Windows via
--plat-name={win32,win-amd64,cygwin}All data files are optional and should not cause the build to fail if
they are missing, eg. when building from sdist
Static package metadata could've also been moved into pyproject.toml (PEP 518 / PEP 621), but this would've changed how Streamlink gets built from source by tools like pip, and this causes issues with the integrated versioneer module that's required by setup.py.
TODO (in future PRs):
build-systemdata, as it defines setuptools as build tool, which is currently only implied as a default.I had already added it but then ran into issues with installing in develop mode (pip install -e) because it couldn't import versioneer.
extras_requireinstead of using env vars in setup.pyNO_DEPSenv var, as it's unusedSome quick checks:
python setup.py --versionscript/build-and-sign.sh)python setup.py buildbuild/lib)streamlink/plugins/.removed(via options.package_data)python setup.py sdiststreamlink/plugins/.removed(via MANIFEST.in)python setup.py bdist_wheelstreamlink/plugins/.removed(via options.package_data)python setup.py installstreamlink/plugins/.removed(via options.package_data)python setup.py develop/pip install -e ../script/makeinstaller.shstreamlink/plugins/.removed(via options.package_data)Please don't merge unless carefully reviewed, as I might have missed something...