setup: switch to declarative package metadata #4113
Merged
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_scripts
entry 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-system
data, 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_require
instead of using env vars in setup.pyNO_DEPS
env var, as it's unusedSome quick checks:
python setup.py --version
script/build-and-sign.sh
)python setup.py build
build/lib
)streamlink/plugins/.removed
(via options.package_data)python setup.py sdist
streamlink/plugins/.removed
(via MANIFEST.in)python setup.py bdist_wheel
streamlink/plugins/.removed
(via options.package_data)python setup.py install
streamlink/plugins/.removed
(via options.package_data)python setup.py develop
/pip install -e .
./script/makeinstaller.sh
streamlink/plugins/.removed
(via options.package_data)Please don't merge unless carefully reviewed, as I might have missed something...