setup: show error on older python versions #4079
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.
Show an error message when the python_requires classifier of the
package gets ignored, so that users can't accidentally install
an incompatible version of Streamlink with their unsupported
Python version / environment.
Also bump the required version of pip to >=9 in dev-requirements.
I've seen this too many times now. We should add a check to setup.py which prevents installs of Streamlink in incompatible python environments when the python_requires package classifier gets ignored (eg. on older pip versions).
Copied from here and modified / reworded:
https://github.com/urllib3/urllib3/blob/327f871f5dc2dcb47d5a7eb17108fbafdabd3333/setup.py#L10-L35
I would also prefer having a clean
setup.cfg
with declarative package information instead of having package information defined programmatically insetup.py
. That's a different issue though. Also a bit confusing for me since I don't know much of the history of python package management. It's pretty messy and everyone's doing their own thing (which the community is trying to change from what it looks like).https://setuptools.pypa.io/en/latest/userguide/declarative_config.html