setup: show error on older python versions#4079
Merged
gravyboat merged 1 commit intoOct 9, 2021
Merged
Conversation
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.
Member
|
Good idea! |
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.
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.cfgwith 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