diff --git a/{{cookiecutter.repo_name}}/.travis.yml b/{{cookiecutter.repo_name}}/.travis.yml index 6d3798a3..f1892eed 100644 --- a/{{cookiecutter.repo_name}}/.travis.yml +++ b/{{cookiecutter.repo_name}}/.travis.yml @@ -1,20 +1,26 @@ language: python -cache: pip +dist: xenial env: global: - LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so - SEGFAULT_SIGNALS=all - matrix: - - TOXENV=check -{%- if cookiecutter.sphinx_docs == "yes" %} - - TOXENV=docs -{%- endif %} matrix: include: + - python: '3.6' + env: + - TOXENV=check +{%- if cookiecutter.sphinx_docs == "yes" %} + - python: '3.6' + env: + - TOXENV=docs +{%- endif %} {%- for env in ['py27', 'py34', 'py35', 'py36', 'py37', 'pypy', 'pypy3'] %}{{ '' }} - - python: '{{ env.split("-")[0] if env.startswith("pypy") else "{0[2]}.{0[3]}".format(env) }}' -{%- if env.startswith('py37') %} - dist: xenial +{%- if env.startswith("pypy3") %} + - python: 'pypy3.5-6.0' +{%- elif env.startswith("pypy") %} + - python: 'pypy2.7-6.0' +{%- else %} + - python: '{{ "{0[2]}.{0[3]}".format(env) }}' {%- endif %} env: - TOXENV={{ env }}{% if cookiecutter.test_matrix_separate_coverage == 'yes' %}-cover{% endif %},report @@ -23,9 +29,12 @@ matrix: {%- endif %} {%- if cookiecutter.codecov == 'yes' %},codecov{% endif %} {%- if cookiecutter.test_matrix_separate_coverage == 'yes' %} - - python: '{{ env.split("-")[0] if env.startswith("pypy") else "{0[2]}.{0[3]}".format(env) }}' -{%- if env.startswith('py37') %} - dist: xenial +{%- if env.startswith("pypy3") %} + - python: 'pypy3.5-6.0' +{%- elif env.startswith("pypy") %} + - python: 'pypy2.7-6.0' +{%- else %} + - python: '{{ "{0[2]}.{0[3]}".format(env) }}' {%- endif %} env: - TOXENV={{ env }}-nocov @@ -41,27 +50,6 @@ install: - easy_install --version - pip --version - tox --version - - | - set -ex - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then - (cd $HOME - wget https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-linux64.tar.bz2 - tar xf pypy2-*.tar.bz2 - pypy2-*/bin/pypy -m ensurepip - pypy2-*/bin/pypy -m pip install -U virtualenv) - export PATH=$(echo $HOME/pypy2-*/bin):$PATH - export TOXPYTHON=$(echo $HOME/pypy2-*/bin/pypy) - fi - if [[ $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then - (cd $HOME - wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2 - tar xf pypy3-*.tar.bz2 - pypy3-*/bin/pypy3 -m ensurepip - pypy3-*/bin/pypy3 -m pip install -U virtualenv) - export PATH=$(echo $HOME/pypy3-*/bin):$PATH - export TOXPYTHON=$(echo $HOME/pypy3-*/bin/pypy3) - fi - set +x script: - tox -v after_failure: diff --git a/{{cookiecutter.repo_name}}/ci/templates/.travis.yml b/{{cookiecutter.repo_name}}/ci/templates/.travis.yml index 6274a57f..1bf357e4 100644 --- a/{{cookiecutter.repo_name}}/ci/templates/.travis.yml +++ b/{{cookiecutter.repo_name}}/ci/templates/.travis.yml @@ -1,22 +1,28 @@ language: python -cache: pip +dist: xenial env: global: - LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so - SEGFAULT_SIGNALS=all - matrix: - - TOXENV=check -{%- if cookiecutter.sphinx_docs == "yes" %} - - TOXENV=docs -{%- endif %} matrix: include: + - python: '3.6' + env: + - TOXENV=check +{%- if cookiecutter.sphinx_docs == "yes" %} + - python: '3.6' + env: + - TOXENV=docs +{%- endif %} {% if cookiecutter.test_matrix_configurator == "yes" -%} {% raw -%} {%- for env, config in tox_environments|dictsort %}{{ '' }} - - python: '{{ env.split("-")[0] if env.startswith("pypy") else "{0[2]}.{0[3]}".format(env) }}' -{% if env.startswith('py37') %} - dist: xenial +{% if env.startswith("pypy3") %} + - python: 'pypy3.5-6.0' +{% elif env.startswith("pypy") %} + - python: 'pypy2.7-6.0' +{% else %} + - python: '{{ "{0[2]}.{0[3]}".format(env) }}' {% endif %} env: - TOXENV={{ env }}{% if config.cover %},report{% endraw %} @@ -30,9 +36,12 @@ matrix: {% else %} {%- raw -%} {%- for env in tox_environments %}{{ '' }} - - python: '{{ env.split("-")[0] if env.startswith("pypy") else "{0[2]}.{0[3]}".format(env) }}' -{% if env.startswith('py37') %} - dist: xenial +{% if env.startswith("pypy3") %} + - python: 'pypy3.5-6.0' +{% elif env.startswith("pypy") %} + - python: 'pypy2.7-6.0' +{% else %} + - python: '{{ "{0[2]}.{0[3]}".format(env) }}' {% endif %} env: - TOXENV={{ env }}{% endraw -%} @@ -63,27 +72,6 @@ install: - easy_install --version - pip --version - tox --version - - | - set -ex - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then - (cd $HOME - wget https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-linux64.tar.bz2 - tar xf pypy2-*.tar.bz2 - pypy2-*/bin/pypy -m ensurepip - pypy2-*/bin/pypy -m pip install -U virtualenv) - export PATH=$(echo $HOME/pypy2-*/bin):$PATH - export TOXPYTHON=$(echo $HOME/pypy2-*/bin/pypy) - fi - if [[ $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then - (cd $HOME - wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2 - tar xf pypy3-*.tar.bz2 - pypy3-*/bin/pypy3 -m ensurepip - pypy3-*/bin/pypy3 -m pip install -U virtualenv) - export PATH=$(echo $HOME/pypy3-*/bin):$PATH - export TOXPYTHON=$(echo $HOME/pypy3-*/bin/pypy3) - fi - set +x script: - tox -v after_failure: diff --git a/{{cookiecutter.repo_name}}/ci/templates/tox.ini b/{{cookiecutter.repo_name}}/ci/templates/tox.ini index 2a49a0ff..bb4f0e38 100644 --- a/{{cookiecutter.repo_name}}/ci/templates/tox.ini +++ b/{{cookiecutter.repo_name}}/ci/templates/tox.ini @@ -13,7 +13,7 @@ envlist = [testenv] basepython = {%- if cookiecutter.sphinx_docs == "yes" %} - {docs,spell}: {env:TOXPYTHON:python2.7} + {docs,spell}: {env:TOXPYTHON:python3.6} {%- endif %} {bootstrap,clean,check,report{%- if cookiecutter.codecov == 'yes' %},codecov{% endif %}{% if cookiecutter.coveralls == 'yes' %},coveralls{% if cookiecutter.c_extension_support != "no" %},extension-coveralls{% endif %}{% endif %}}: {env:TOXPYTHON:python3} setenv = diff --git a/{{cookiecutter.repo_name}}/setup.py b/{{cookiecutter.repo_name}}/setup.py index e71ed1de..d5cfd718 100644 --- a/{{cookiecutter.repo_name}}/setup.py +++ b/{{cookiecutter.repo_name}}/setup.py @@ -4,7 +4,6 @@ from __future__ import print_function import io - {% if cookiecutter.c_extension_support != 'no' -%} import os {% endif -%} diff --git a/{{cookiecutter.repo_name}}/tox.ini b/{{cookiecutter.repo_name}}/tox.ini index ab26edec..9ea23bc6 100644 --- a/{{cookiecutter.repo_name}}/tox.ini +++ b/{{cookiecutter.repo_name}}/tox.ini @@ -32,10 +32,10 @@ envlist = basepython = pypy: {env:TOXPYTHON:pypy} pypy3: {env:TOXPYTHON:pypy3} - {% if cookiecutter.sphinx_docs == "yes" %}{py27,docs,spell}{% else %}py27{% endif %}: {env:TOXPYTHON:python2.7} + py27: {env:TOXPYTHON:python2.7} py34: {env:TOXPYTHON:python3.4} py35: {env:TOXPYTHON:python3.5} - py36: {env:TOXPYTHON:python3.6} + {% if cookiecutter.sphinx_docs == "yes" %}{py36,docs,spell}{% else %}py36{% endif %}: {env:TOXPYTHON:python3.6} py37: {env:TOXPYTHON:python3.7} {bootstrap,clean,check,report{%- if cookiecutter.codecov == 'yes' %},codecov{% endif %}{% if cookiecutter.coveralls == 'yes' %},coveralls{% if cookiecutter.c_extension_support != "no" %},extension-coveralls{% endif %}{% endif %}}: {env:TOXPYTHON:python3} setenv =