diff --git a/.travis.yml b/.travis.yml index 57e7833..bf91fae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,26 @@ os: linux -dist: xenial -sudo: true language: python cache: pip -python: - - "3.7" - - "3.6" - - "3.5" - - "pypy3.5" - - "2.7" - - "pypy2.7" - before_install: + - uname - sudo apt-get install -y git mercurial - sudo bash travis_build_wheel.sh script: - python --version - bash travis_run_tests.sh + + +matrix: + include: + - python: "3.6" + - python: "3.5" + - python: "3.4" + - python: "2.7" + - python: "pypy3.5" + - python: "pypy2.7" + - python: "3.7" + dist: xenial + sudo: true diff --git a/setup.py b/setup.py index 1ce21c9..0916d9a 100644 --- a/setup.py +++ b/setup.py @@ -68,6 +68,7 @@ setuptools.setup( "Operating System :: MacOS :: MacOS X", "Programming Language :: Python", "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", diff --git a/travis_build_wheel.sh b/travis_build_wheel.sh index 9977220..1c70265 100644 --- a/travis_build_wheel.sh +++ b/travis_build_wheel.sh @@ -1,14 +1,18 @@ #!/bin/bash set -e -if [[ $(which python3.7) ]]; then - python3.7 --version +if [[ $(which python3.6) ]]; then + python3.6 --version else - curl -sSf -o python-3.7.tar.bz2 https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/16.04/x86_64/python-3.7.tar.bz2 - tar xjf python-3.7.tar.bz2 --directory / - source $HOME/virtualenv/python3.7.0/bin/activate + if [[ $(uname) ]]; then + curl -sSf -o python-3.6.tar.bz2 https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/14.04/x86_64/python-3.6.tar.bz2 + else + curl -sSf -o python-3.6.tar.bz2 https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/14.04/x86_64/python-3.6.tar.bz2 + fi + tar xjf python-3.6.tar.bz2 --directory / + source $HOME/virtualenv/python3.6.0/bin/activate fi -python3.7 --version -python3.7 -m pip install setuptools lib3to6 -python3.7 setup.py bdist_wheel --python-tag=py2.py3 +python3.6 --version +python3.6 -m pip install setuptools lib3to6 +python3.6 setup.py bdist_wheel --python-tag=py2.py3 diff --git a/travis_run_tests.sh b/travis_run_tests.sh index cd4a606..d27a138 100644 --- a/travis_run_tests.sh +++ b/travis_run_tests.sh @@ -13,7 +13,7 @@ python -m pip install $(ls -1t dist/pycalver*.whl | head -n 1) grep 'coding: utf-8' $(python -c 'import pycalver;print(pycalver.__file__.replace(".pyc", ".py"))') python -m pytest test/ -if [[ $(python -c "import sys;print(sys.version[:3])") == "3.7" ]]; then +if [[ $(python -c "import sys;sys.exit(sys.version[:3] < '3.6')") ]]; then python -m pip install $(cat requirements-test.txt) python -m flake8 src/pycalver/