3 ms·
Heroku allows specifying the Python version in a file called runtime.txt, which is analogous to requirements.txt: https://devcenter.heroku.com/articles/pyth
by grosskur 14y ago
Heroku allows specifying the Python version in a file called runtime.txt, which is analogous to requirements.txt:
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.