Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying exact Python version for Travis CI in combination with tox

I have the following .travis.yml:

language: python

env:
  - TOXENV=py27
  - TOXENV=py34

install:
  - pip install -U tox

script:
  - tox

and the following tox.ini:

[tox]
envlist = py27,py34

[testenv]
commands = py.test tests/
deps = -rtests/test_requirements.txt

I need Python 3.4.3, which is available since awhile back in Travis. How can I specify this exact version of Python in .travis.yml so tox can use the correct version for the py34 environment?

like image 937
S.G Avatar asked Aug 13 '15 10:08

S.G


1 Answers

Inspired by pip's .travis.yml it seems easiest to specify the Travis matrix with different environment variables:

matrix:
    include:
        - python: 3.4.3
          env: TOXENV=py34
        - python: 2.7
          env: TOXENV=py27
like image 98
S.G Avatar answered Oct 16 '22 10:10

S.G