Hacker News new | ask | show | jobs
by ryebit 2327 days ago
If your code relies on a minimum python version, you can add `python_requires=">=3.5"` to your setup.py [https://packaging.python.org/guides/distributing-packages-us...] to ensure it's not installed on older releases.

That field itself is kinda new; but if needing to block users with older versions, that shouldn't be an issue.

2 comments

personally, i just drop a f-string in setup.py and that'll filter out any python for which this issue pertains.
This might not work if you’re distributing a wheel.
Python 3.4 is EOL anyway so there's no need to do this. Anybody running 3.4 is already unsupported.
and 3.5 dies in september. hurray!