简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM