Skip to content

setup: show error on older python versions #4079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bastimeyer
Copy link
Member

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 in setup.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

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.
@gravyboat
Copy link
Member

Good idea!

@gravyboat gravyboat merged commit 5b01621 into streamlink:master Oct 9, 2021
@bastimeyer bastimeyer deleted the setup/python-version-error-message branch October 9, 2021 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants