From 32435d8b84cd59817c4e2505ccd5ae30168415a8 Mon Sep 17 00:00:00 2001 From: Daniel Hahler <git@thequod.de> Date: Sun, 4 Aug 2019 18:11:12 +0200 Subject: [PATCH 1/2] ci: AppVeyor: only install PyPy if used [skip travis] Uses powershell for simpler matching, adding with `--no-progress` to silence choco-install. --- appveyor.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 836eaf5a..1045a2b0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,13 +15,12 @@ init: - ps: echo $env:TOXENV - ps: ls C:\Python* install: - # install pypy using choco (redirect to a file and write to console in case - # choco install returns non-zero, because choco install python.pypy is too - # noisy) - - choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1) - - set PATH=C:\tools\pypy\pypy;%PATH% # so tox can find pypy - - echo PyPy installed - - pypy --version + - ps: | + if ($env:TOXENV -notmatch 'pypy') { + choco install --no-progress python.pypy + $env:PATH = "C:\tools\pypy\pypy;$env:PATH" + pypy --version + } # Upgrade virtualenv for e.g. more-itertools to be handled properly. # Pin it to work around https://github.com/tox-dev/tox/issues/1389. From d3eddb1987c040650a53489bb545d145fc19acb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro> Date: Tue, 3 Sep 2019 14:51:19 +0300 Subject: [PATCH 2/2] Use batch (something weird going on with that powershell) and make the virtualenv pin a minimum requirement. --- appveyor.yml | 18 +++++++----------- ci/templates/appveyor.yml | 18 ++++++++---------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1045a2b0..0212d62a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,20 +15,16 @@ init: - ps: echo $env:TOXENV - ps: ls C:\Python* install: - - ps: | - if ($env:TOXENV -notmatch 'pypy') { + - | + IF "%TOXENV:~0,4%" == "pypy" ( choco install --no-progress python.pypy - $env:PATH = "C:\tools\pypy\pypy;$env:PATH" - pypy --version - } - - # Upgrade virtualenv for e.g. more-itertools to be handled properly. - # Pin it to work around https://github.com/tox-dev/tox/issues/1389. - - C:\Python35\python -m pip install -U virtualenv==16.5.0 - - C:\Python35\python -m pip install tox + C:\tools\pypy\pypy --version + ) + - C:\Python37\python -m pip install -U "virtualenv>=16.5.0" + - C:\Python37\python -m pip install tox test_script: - - C:\Python35\python -m tox + - C:\Python37\python -m tox on_failure: - ps: dir "env:" diff --git a/ci/templates/appveyor.yml b/ci/templates/appveyor.yml index eddf1905..5887fbb9 100644 --- a/ci/templates/appveyor.yml +++ b/ci/templates/appveyor.yml @@ -14,18 +14,16 @@ init: - ps: echo $env:TOXENV - ps: ls C:\Python* install: - # install pypy using choco (redirect to a file and write to console in case - # choco install returns non-zero, because choco install python.pypy is too - # noisy) - - choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1) - - set PATH=C:\tools\pypy\pypy;%PATH% # so tox can find pypy - - echo PyPy installed - - pypy --version - - - C:\Python35\python -m pip install tox + - | + IF "%TOXENV:~0,4%" == "pypy" ( + choco install --no-progress python.pypy + C:\tools\pypy\pypy --version + ) + - C:\Python37\python -m pip install -U "virtualenv>=16.5.0" + - C:\Python37\python -m pip install tox test_script: - - C:\Python35\python -m tox + - C:\Python37\python -m tox on_failure: - ps: dir "env:"