Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine required Python versions from tox.ini and install if required

tox documentation suggests that the versions of Python that you want to test against must already be installed in the environment, otherwise you'll experience errors. With that in mind, is there a generally accepted practice of checking envlist in tox.ini and using that to then install the required versions. E.g. for:

envlist = py27, py36

check if these are installed and if not, install them.

like image 744
runnerpaul Avatar asked Mar 09 '26 17:03

runnerpaul


1 Answers

You can make a custom script in order to install desired versions of python using pyenv and then use them with tox.

Some useful links about how you can install python versions with pyenv can be found here:

https://anil.io/blog/python/pyenv/using-pyenv-to-install-multiple-python-versions-tox/

https://github.com/lablup/backend.ai/wiki/Install-Python-via-pyenv

For using tox along with pyenv you can check this links as well:

http://ishcray.com/supporting-multiple-python-versions-with-tox

http://blog.pinaxproject.com/2015/12/08/how-test-against-multiple-python-versions-parallel/

like image 179
Moldovan Daniel Avatar answered Mar 11 '26 06:03

Moldovan Daniel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!