by turtle4 · 13y ago · 0 comments
Document it in setup.py:
if sys.version_info < (2, 6, 0):
sys.stderr.write("Foo requires Python 2.6 or newer.\n")
sys.exit(1)
You're using setup.py, right? ;) https://devcenter.heroku.com/articles/python-runtimes
I think this works well as a convention even if you're not deploying to Heroku. I also like the suggestion to put a guard in setup.py that checks sys.version_info.