From 4f7098c59496072625406c822be3e10c5bd05661 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 12:06:52 -0800 Subject: [PATCH 01/12] Add Windows support to file locking --- pex/common.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/pex/common.py b/pex/common.py index d4d8e421e..071df3446 100644 --- a/pex/common.py +++ b/pex/common.py @@ -6,7 +6,6 @@ import atexit import contextlib import errno -import fcntl import os import re import shutil @@ -21,8 +20,14 @@ from datetime import datetime from uuid import uuid4 +from pex.compatibility import WINDOWS from pex.typing import TYPE_CHECKING +if WINDOWS: + import msvcrt +else: + import fcntl + if TYPE_CHECKING: from typing import Any, DefaultDict, Iterable, Iterator, NoReturn, Optional, Set, Sized @@ -393,7 +398,10 @@ def unlock(): if lock_fd is None: return try: - fcntl.lockf(lock_fd, fcntl.LOCK_UN) + if WINDOWS: + msvcrt.locking(lock_fd, msvcrt.LK_UNLCK, 1) + else: + fcntl.lockf(lock_fd, fcntl.LOCK_UN) finally: os.close(lock_fd) @@ -410,7 +418,18 @@ def unlock(): # N.B.: Since lockf operates on an open file descriptor and these are guaranteed to be # closed by the operating system when the owning process exits, this lock is immune to # staleness. - fcntl.lockf(lock_fd, fcntl.LOCK_EX) # A blocking write lock. + if WINDOWS: + while True: + # Force the non-blocking lock to be blocking. LK_LOCK is msvcrt's implementation of + # a blocking lock, but it only tries 10 times, once per second before rasing an + # OSError. + try: + msvcrt.locking(lock_fd, msvcrt.LK_NBLCK, 1) + break + except OSError: + safe_sleep(1) + else: + fcntl.lockf(lock_fd, fcntl.LOCK_EX) # A blocking write lock. if atomic_dir.is_finalized: # We lost the double-checked locking race and our work was done for us by the race # winner so exit early. From edc84354c38a4d422fc551f58564a8323cadbf06 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 13:42:02 -0800 Subject: [PATCH 02/12] Use LK_LOCK --- pex/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pex/common.py b/pex/common.py index 071df3446..8b5adc6dd 100644 --- a/pex/common.py +++ b/pex/common.py @@ -424,9 +424,12 @@ def unlock(): # a blocking lock, but it only tries 10 times, once per second before rasing an # OSError. try: - msvcrt.locking(lock_fd, msvcrt.LK_NBLCK, 1) + msvcrt.locking(lock_fd, msvcrt.LK_LOCK, 1) break - except OSError: + except OSError as ex: + # Deadlock error is raised after failing to lock the file + if ex.errno != errno.EDEADLOCK: + raise safe_sleep(1) else: fcntl.lockf(lock_fd, fcntl.LOCK_EX) # A blocking write lock. From 041aa5ef72771fb43ef78612be287f1276c3cc22 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 14:45:49 -0800 Subject: [PATCH 03/12] Add CI for Windows --- .travis.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2cc480f39..7d21d408e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,6 +51,9 @@ x-pyenv-install: &x-pyenv-install | "${PYENV}" install --keep --skip-existing ${PYENV_VERSION} "${PYENV}" global ${PYENV_VERSION} +x-pyenv-27-env: &x-pyenv-27-env > + PYENV_VERSION=2.7.18 + x-pyenv-39-env: &x-pyenv-39-env > PYENV_VERSION=3.9.1 @@ -89,7 +92,7 @@ x-osx-27-shard: &x-osx-27-shard env: - *x-tox-env - *x-pyenv-env - - PYENV_VERSION=2.7.18 + - *x-pyenv-27-env x-osx-39-shard: &x-osx-39-shard <<: *x-osx-shard @@ -98,6 +101,41 @@ x-osx-39-shard: &x-osx-39-shard - *x-pyenv-env - *x-pyenv-39-env +x-windows-shard: &x-windows-shard + os: windows + language: shell + cache: + # The default is 3 minutes (180). + timeout: 300 + directories: + - .pyenv_test + - "${PYENV_ROOT}" + install: + - *x-tox-install + - *x-pyenv-install + +x-windows-27-shard: &x-windows-27-shard + <<: *x-windows-shard + before_install: + - choco install python2 + - python -m pip install --upgrade pip + env: + - PATH=/c/Python27:/c/Python27/Scripts:$PATH + - *x-tox-env + - *x-pyenv-env + - *x-pyenv-27-env + +x-windows-39-shard: &x-windows-39-shard + <<: *x-windows-shard + before_install: + - choco install python --version 3.9.0 + - python -m pip install --upgrade pip + env: + - PATH=/c/Python39:/c/Python39/Scripts:$PATH + - *x-tox-env + - *x-pyenv-env + - *x-pyenv-39-env + # NB: Travis partitions caches using a combination of os, language amd env vars. As such, we do not # use TOXENV and instead pass the toxenv via -e on the command line. This helps ensure we share # caches as much as possible (eg: all linux python 2.7.15 shards share a cache). @@ -177,3 +215,19 @@ matrix: - <<: *x-osx-39-shard name: TOXENV=py39-integration script: ${TOX_CMD} -e py39-integration + + - <<: *x-windows-27-shard + name: TOXENV=py27 + script: ${TOX_CMD} -e py27 + + - <<: *x-windows-39-shard + name: TOXENV=py39 + script: ${TOX_CMD} -e py39 + + - <<: *x-windows-27-shard + name: TOXENV=py27-integration + script: ${TOX_CMD} -e py27-integration + + - <<: *x-windows-39-shard + name: TOXENV=py39-integration + script: ${TOX_CMD} -e py39-integration From 20e36c665fa268609a21e97a96ea7e746f255095 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 15:29:17 -0800 Subject: [PATCH 04/12] Fix for Git Bash symlinks issue --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d21d408e..e193071cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,10 @@ x-pyenv-env: &x-pyenv-env > PATH="${PYENV_ROOT}/shims:${PATH}" x-pyenv-install: &x-pyenv-install | - # Ensure we have the targeted Python for tox to find on $PATH - PYENV="${PYENV_ROOT}/bin/pyenv" + # Ensure we have the targeted Python for tox to find on $PATH. + # Relative symlinks don't work on Git Bash, which is why + # "${PYENV_ROOT}/bin/pyenv" isn't used. + PYENV="${PYENV_ROOT}/libexec/pyenv" if [ ! -x "${PYENV}" ]; then rm -rf ${PYENV_ROOT} git clone https://github.com/pyenv/pyenv "${PYENV_ROOT}"; From c85a71a9a6c4742934f6ab1d2bcd8dc61648c7b6 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 16:14:43 -0800 Subject: [PATCH 05/12] Use penv-win for Windows CI --- .travis.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index e193071cf..c5062b4a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,18 +40,23 @@ x-pyenv-env: &x-pyenv-env > PYENV_ROOT=~/.pyenv-pex PATH="${PYENV_ROOT}/shims:${PATH}" +x-pyenv-unix-env: &x-pyenv-unix-env > + PYENV_CMD="${PYENV_ROOT}/bin/pyenv" + PYENV_REPO=https://github.com/pyenv/pyenv + +x-pyenv-windows-env: &x-pyenv-windows-env > + PYENV_CMD="${PYENV_ROOT}/pyenv-win/bin/pyenv" + PYENV_REPO=https://github.com/pyenv-win/pyenv-win + x-pyenv-install: &x-pyenv-install | - # Ensure we have the targeted Python for tox to find on $PATH. - # Relative symlinks don't work on Git Bash, which is why - # "${PYENV_ROOT}/bin/pyenv" isn't used. - PYENV="${PYENV_ROOT}/libexec/pyenv" + # Ensure we have the targeted Python for tox to find on $PATH if [ ! -x "${PYENV}" ]; then rm -rf ${PYENV_ROOT} - git clone https://github.com/pyenv/pyenv "${PYENV_ROOT}"; + git clone "${PYENV_REPO}" "${PYENV_ROOT}"; fi GIT_DIR="${PYENV_ROOT}/.git" git pull --ff-only - "${PYENV}" install --keep --skip-existing ${PYENV_VERSION} - "${PYENV}" global ${PYENV_VERSION} + ./"${PYENV_CMD}" install --keep --skip-existing ${PYENV_VERSION} + ./"${PYENV_CMD}" global ${PYENV_VERSION} x-pyenv-27-env: &x-pyenv-27-env > PYENV_VERSION=2.7.18 @@ -94,6 +99,7 @@ x-osx-27-shard: &x-osx-27-shard env: - *x-tox-env - *x-pyenv-env + - *x-pyenv-unix-env - *x-pyenv-27-env x-osx-39-shard: &x-osx-39-shard @@ -101,6 +107,7 @@ x-osx-39-shard: &x-osx-39-shard env: - *x-tox-env - *x-pyenv-env + - *x-pyenv-unix-env - *x-pyenv-39-env x-windows-shard: &x-windows-shard @@ -125,7 +132,9 @@ x-windows-27-shard: &x-windows-27-shard - PATH=/c/Python27:/c/Python27/Scripts:$PATH - *x-tox-env - *x-pyenv-env - - *x-pyenv-27-env + - *x-pyenv-windows-env + # TODO: Use *x-pyenv-27-env when the pyenv-windows 2.7.18 image is available + - PYENV_VERSION=2.7.17 x-windows-39-shard: &x-windows-39-shard <<: *x-windows-shard @@ -136,7 +145,9 @@ x-windows-39-shard: &x-windows-39-shard - PATH=/c/Python39:/c/Python39/Scripts:$PATH - *x-tox-env - *x-pyenv-env - - *x-pyenv-39-env + - *x-pyenv-windows-env + # TODO: Use *x-pyenv-39-env when the pyenv-windows 3.9.1 image is available + - PYENV_VERSION=3.9.0a4 # NB: Travis partitions caches using a combination of os, language amd env vars. As such, we do not # use TOXENV and instead pass the toxenv via -e on the command line. This helps ensure we share From dd262d5e9c7785c747bb7a983532d9908eaaa617 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 16:23:08 -0800 Subject: [PATCH 06/12] Pyenv install flags only work on Unix version --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c5062b4a8..b07166fc2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ x-pyenv-env: &x-pyenv-env > x-pyenv-unix-env: &x-pyenv-unix-env > PYENV_CMD="${PYENV_ROOT}/bin/pyenv" PYENV_REPO=https://github.com/pyenv/pyenv + PYENV_INSTALL_FLAGS="--keep --skip-existing" x-pyenv-windows-env: &x-pyenv-windows-env > PYENV_CMD="${PYENV_ROOT}/pyenv-win/bin/pyenv" @@ -55,7 +56,7 @@ x-pyenv-install: &x-pyenv-install | git clone "${PYENV_REPO}" "${PYENV_ROOT}"; fi GIT_DIR="${PYENV_ROOT}/.git" git pull --ff-only - ./"${PYENV_CMD}" install --keep --skip-existing ${PYENV_VERSION} + ./"${PYENV_CMD}" install ${PYENV_INSTALL_FLAGS} ${PYENV_VERSION} ./"${PYENV_CMD}" global ${PYENV_VERSION} x-pyenv-27-env: &x-pyenv-27-env > From 186713ebc781a106e3dcac86bf5c48c596c0de05 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 16:26:05 -0800 Subject: [PATCH 07/12] Don't use pyenv for Windows CI --- .travis.yml | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index b07166fc2..e3b1f70c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,24 +40,16 @@ x-pyenv-env: &x-pyenv-env > PYENV_ROOT=~/.pyenv-pex PATH="${PYENV_ROOT}/shims:${PATH}" -x-pyenv-unix-env: &x-pyenv-unix-env > - PYENV_CMD="${PYENV_ROOT}/bin/pyenv" - PYENV_REPO=https://github.com/pyenv/pyenv - PYENV_INSTALL_FLAGS="--keep --skip-existing" - -x-pyenv-windows-env: &x-pyenv-windows-env > - PYENV_CMD="${PYENV_ROOT}/pyenv-win/bin/pyenv" - PYENV_REPO=https://github.com/pyenv-win/pyenv-win - x-pyenv-install: &x-pyenv-install | # Ensure we have the targeted Python for tox to find on $PATH + PYENV="${PYENV_ROOT}/bin/pyenv" if [ ! -x "${PYENV}" ]; then rm -rf ${PYENV_ROOT} - git clone "${PYENV_REPO}" "${PYENV_ROOT}"; + git clone https://github.com/pyenv/pyenv "${PYENV_ROOT}"; fi GIT_DIR="${PYENV_ROOT}/.git" git pull --ff-only - ./"${PYENV_CMD}" install ${PYENV_INSTALL_FLAGS} ${PYENV_VERSION} - ./"${PYENV_CMD}" global ${PYENV_VERSION} + "${PYENV}" install --keep --skip-existing ${PYENV_VERSION} + "${PYENV}" global ${PYENV_VERSION} x-pyenv-27-env: &x-pyenv-27-env > PYENV_VERSION=2.7.18 @@ -100,7 +92,6 @@ x-osx-27-shard: &x-osx-27-shard env: - *x-tox-env - *x-pyenv-env - - *x-pyenv-unix-env - *x-pyenv-27-env x-osx-39-shard: &x-osx-39-shard @@ -108,7 +99,6 @@ x-osx-39-shard: &x-osx-39-shard env: - *x-tox-env - *x-pyenv-env - - *x-pyenv-unix-env - *x-pyenv-39-env x-windows-shard: &x-windows-shard @@ -117,12 +107,8 @@ x-windows-shard: &x-windows-shard cache: # The default is 3 minutes (180). timeout: 300 - directories: - - .pyenv_test - - "${PYENV_ROOT}" install: - *x-tox-install - - *x-pyenv-install x-windows-27-shard: &x-windows-27-shard <<: *x-windows-shard @@ -130,12 +116,7 @@ x-windows-27-shard: &x-windows-27-shard - choco install python2 - python -m pip install --upgrade pip env: - - PATH=/c/Python27:/c/Python27/Scripts:$PATH - *x-tox-env - - *x-pyenv-env - - *x-pyenv-windows-env - # TODO: Use *x-pyenv-27-env when the pyenv-windows 2.7.18 image is available - - PYENV_VERSION=2.7.17 x-windows-39-shard: &x-windows-39-shard <<: *x-windows-shard @@ -143,12 +124,7 @@ x-windows-39-shard: &x-windows-39-shard - choco install python --version 3.9.0 - python -m pip install --upgrade pip env: - - PATH=/c/Python39:/c/Python39/Scripts:$PATH - *x-tox-env - - *x-pyenv-env - - *x-pyenv-windows-env - # TODO: Use *x-pyenv-39-env when the pyenv-windows 3.9.1 image is available - - PYENV_VERSION=3.9.0a4 # NB: Travis partitions caches using a combination of os, language amd env vars. As such, we do not # use TOXENV and instead pass the toxenv via -e on the command line. This helps ensure we share From 9f953bdcc48fdc700729878026b3336adbc40fad Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 16:54:16 -0800 Subject: [PATCH 08/12] Use ensurepip --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3b1f70c8..007137965 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,15 +114,15 @@ x-windows-27-shard: &x-windows-27-shard <<: *x-windows-shard before_install: - choco install python2 - - python -m pip install --upgrade pip + - python -m ensurepip --upgrade env: - *x-tox-env x-windows-39-shard: &x-windows-39-shard <<: *x-windows-shard before_install: - - choco install python --version 3.9.0 - - python -m pip install --upgrade pip + - choco install python --version 3.9.1 + - python -m ensurepip --upgrade env: - *x-tox-env From b766f0865968f3690a10f567cc25ddc45dded8c3 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 18:00:27 -0800 Subject: [PATCH 09/12] Use correct python --- .travis.yml | 156 ++++++++++++++++++++++++++-------------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/.travis.yml b/.travis.yml index 007137965..c55a7b1cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ x-tox-env: &x-tox-env > TOX_CMD="tox --skip-missing-interpreters=false -v" x-tox-install: &x-tox-install | - pip install -U pip - pip install 'tox<=3.14.5' 'virtualenv<20.0.5' + ${PIP_PATH:-pip} install -U pip + ${PIP_PATH:-pip} install 'tox<=3.14.5' 'virtualenv<20.0.5' x-linux-shard: &x-linux-shard os: linux @@ -114,16 +114,16 @@ x-windows-27-shard: &x-windows-27-shard <<: *x-windows-shard before_install: - choco install python2 - - python -m ensurepip --upgrade env: + - PIP_PATH="C:\Python27 -m pip" - *x-tox-env x-windows-39-shard: &x-windows-39-shard <<: *x-windows-shard before_install: - choco install python --version 3.9.1 - - python -m ensurepip --upgrade env: + - PIP_PATH="C:\Python39 -m pip" - *x-tox-env # NB: Travis partitions caches using a combination of os, language amd env vars. As such, we do not @@ -131,80 +131,80 @@ x-windows-39-shard: &x-windows-39-shard # caches as much as possible (eg: all linux python 2.7.15 shards share a cache). matrix: include: - - <<: *x-linux-shard - name: TOXENV=format-check - script: ${TOX_CMD} -e format-check - - - <<: *x-linux-shard - name: TOXENV=typecheck - script: ${TOX_CMD} -e typecheck - - - <<: *x-linux-38-shard - name: TOXENV=vendor-check - script: ${TOX_CMD} -e vendor-check - - - <<: *x-linux-27-shard - name: TOXENV=py27 - script: ${TOX_CMD} -e py27 - - - <<: *x-linux-27-shard - name: TOXENV=py27-subprocess - script: ${TOX_CMD} -e py27-subprocess - - - <<: *x-linux-shard - name: TOXENV=py35 - python: 3.5.9 - script: ${TOX_CMD} -e py35 - - - <<: *x-linux-shard - name: TOXENV=py36 - python: 3.6.10 - script: ${TOX_CMD} -e py36 - - - <<: *x-linux-shard - name: TOXENV=py37 - python: 3.7.7 - script: ${TOX_CMD} -e py37 - - - <<: *x-linux-38-shard - name: TOXENV=py38 - script: ${TOX_CMD} -e py38 - - - <<: *x-linux-39-shard - name: TOXENV=py39 - script: ${TOX_CMD} -e py39 - - - <<: *x-linux-pypy-shard - name: TOXENV=pypy - script: ${TOX_CMD} -e pypy - - - <<: *x-linux-27-shard - name: TOXENV=py27-integration - script: ${TOX_CMD} -e py27-integration - - - <<: *x-linux-39-shard - name: TOXENV=py39-integration - script: ${TOX_CMD} -e py39-integration - - - <<: *x-linux-pypy-shard - name: TOXENV=pypy-integration - script: ${TOX_CMD} -e pypy-integration - - - <<: *x-osx-27-shard - name: TOXENV=py27 - script: ${TOX_CMD} -e py27 - - - <<: *x-osx-39-shard - name: TOXENV=py39 - script: ${TOX_CMD} -e py39 - - - <<: *x-osx-27-shard - name: TOXENV=py27-integration - script: ${TOX_CMD} -e py27-integration - - - <<: *x-osx-39-shard - name: TOXENV=py39-integration - script: ${TOX_CMD} -e py39-integration + # - <<: *x-linux-shard + # name: TOXENV=format-check + # script: ${TOX_CMD} -e format-check + + # - <<: *x-linux-shard + # name: TOXENV=typecheck + # script: ${TOX_CMD} -e typecheck + + # - <<: *x-linux-38-shard + # name: TOXENV=vendor-check + # script: ${TOX_CMD} -e vendor-check + + # - <<: *x-linux-27-shard + # name: TOXENV=py27 + # script: ${TOX_CMD} -e py27 + + # - <<: *x-linux-27-shard + # name: TOXENV=py27-subprocess + # script: ${TOX_CMD} -e py27-subprocess + + # - <<: *x-linux-shard + # name: TOXENV=py35 + # python: 3.5.9 + # script: ${TOX_CMD} -e py35 + + # - <<: *x-linux-shard + # name: TOXENV=py36 + # python: 3.6.10 + # script: ${TOX_CMD} -e py36 + + # - <<: *x-linux-shard + # name: TOXENV=py37 + # python: 3.7.7 + # script: ${TOX_CMD} -e py37 + + # - <<: *x-linux-38-shard + # name: TOXENV=py38 + # script: ${TOX_CMD} -e py38 + + # - <<: *x-linux-39-shard + # name: TOXENV=py39 + # script: ${TOX_CMD} -e py39 + + # - <<: *x-linux-pypy-shard + # name: TOXENV=pypy + # script: ${TOX_CMD} -e pypy + + # - <<: *x-linux-27-shard + # name: TOXENV=py27-integration + # script: ${TOX_CMD} -e py27-integration + + # - <<: *x-linux-39-shard + # name: TOXENV=py39-integration + # script: ${TOX_CMD} -e py39-integration + + # - <<: *x-linux-pypy-shard + # name: TOXENV=pypy-integration + # script: ${TOX_CMD} -e pypy-integration + + # - <<: *x-osx-27-shard + # name: TOXENV=py27 + # script: ${TOX_CMD} -e py27 + + # - <<: *x-osx-39-shard + # name: TOXENV=py39 + # script: ${TOX_CMD} -e py39 + + # - <<: *x-osx-27-shard + # name: TOXENV=py27-integration + # script: ${TOX_CMD} -e py27-integration + + # - <<: *x-osx-39-shard + # name: TOXENV=py39-integration + # script: ${TOX_CMD} -e py39-integration - <<: *x-windows-27-shard name: TOXENV=py27 From 81445c67a3aef0597d6ede72aa3eeb07172f6aa9 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 18:02:38 -0800 Subject: [PATCH 10/12] Use Python executable --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c55a7b1cf..db39a1997 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,7 +115,7 @@ x-windows-27-shard: &x-windows-27-shard before_install: - choco install python2 env: - - PIP_PATH="C:\Python27 -m pip" + - PIP_PATH="C:\Python27\python.exe -m pip" - *x-tox-env x-windows-39-shard: &x-windows-39-shard @@ -123,7 +123,7 @@ x-windows-39-shard: &x-windows-39-shard before_install: - choco install python --version 3.9.1 env: - - PIP_PATH="C:\Python39 -m pip" + - PIP_PATH="C:\Python39\python.exe -m pip" - *x-tox-env # NB: Travis partitions caches using a combination of os, language amd env vars. As such, we do not From 9735cadcd4f2be172aa301b7b8a0753baba57245 Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 18:10:29 -0800 Subject: [PATCH 11/12] Add correct tox path --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index db39a1997..002b98174 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ x-tox-env: &x-tox-env > - TOX_CMD="tox --skip-missing-interpreters=false -v" + TOX_CMD="${TOX_PATH:-tox} --skip-missing-interpreters=false -v" x-tox-install: &x-tox-install | ${PIP_PATH:-pip} install -U pip @@ -116,6 +116,7 @@ x-windows-27-shard: &x-windows-27-shard - choco install python2 env: - PIP_PATH="C:\Python27\python.exe -m pip" + - TOX_PATH="C:\Python27\Scripts\tox" - *x-tox-env x-windows-39-shard: &x-windows-39-shard @@ -124,6 +125,7 @@ x-windows-39-shard: &x-windows-39-shard - choco install python --version 3.9.1 env: - PIP_PATH="C:\Python39\python.exe -m pip" + - TOX_PATH="C:\Python39\Scripts\tox" - *x-tox-env # NB: Travis partitions caches using a combination of os, language amd env vars. As such, we do not From 54c6c74f84c1c680ad5fe072077133534e0f2e0c Mon Sep 17 00:00:00 2001 From: Christopher Bremner Date: Wed, 30 Dec 2020 18:26:04 -0800 Subject: [PATCH 12/12] Restore commented out shards --- .travis.yml | 148 ++++++++++++++++++++++++++-------------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/.travis.yml b/.travis.yml index 002b98174..6ca06e3de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,80 +133,80 @@ x-windows-39-shard: &x-windows-39-shard # caches as much as possible (eg: all linux python 2.7.15 shards share a cache). matrix: include: - # - <<: *x-linux-shard - # name: TOXENV=format-check - # script: ${TOX_CMD} -e format-check - - # - <<: *x-linux-shard - # name: TOXENV=typecheck - # script: ${TOX_CMD} -e typecheck - - # - <<: *x-linux-38-shard - # name: TOXENV=vendor-check - # script: ${TOX_CMD} -e vendor-check - - # - <<: *x-linux-27-shard - # name: TOXENV=py27 - # script: ${TOX_CMD} -e py27 - - # - <<: *x-linux-27-shard - # name: TOXENV=py27-subprocess - # script: ${TOX_CMD} -e py27-subprocess - - # - <<: *x-linux-shard - # name: TOXENV=py35 - # python: 3.5.9 - # script: ${TOX_CMD} -e py35 - - # - <<: *x-linux-shard - # name: TOXENV=py36 - # python: 3.6.10 - # script: ${TOX_CMD} -e py36 - - # - <<: *x-linux-shard - # name: TOXENV=py37 - # python: 3.7.7 - # script: ${TOX_CMD} -e py37 - - # - <<: *x-linux-38-shard - # name: TOXENV=py38 - # script: ${TOX_CMD} -e py38 - - # - <<: *x-linux-39-shard - # name: TOXENV=py39 - # script: ${TOX_CMD} -e py39 - - # - <<: *x-linux-pypy-shard - # name: TOXENV=pypy - # script: ${TOX_CMD} -e pypy - - # - <<: *x-linux-27-shard - # name: TOXENV=py27-integration - # script: ${TOX_CMD} -e py27-integration - - # - <<: *x-linux-39-shard - # name: TOXENV=py39-integration - # script: ${TOX_CMD} -e py39-integration - - # - <<: *x-linux-pypy-shard - # name: TOXENV=pypy-integration - # script: ${TOX_CMD} -e pypy-integration - - # - <<: *x-osx-27-shard - # name: TOXENV=py27 - # script: ${TOX_CMD} -e py27 - - # - <<: *x-osx-39-shard - # name: TOXENV=py39 - # script: ${TOX_CMD} -e py39 - - # - <<: *x-osx-27-shard - # name: TOXENV=py27-integration - # script: ${TOX_CMD} -e py27-integration - - # - <<: *x-osx-39-shard - # name: TOXENV=py39-integration - # script: ${TOX_CMD} -e py39-integration + - <<: *x-linux-shard + name: TOXENV=format-check + script: ${TOX_CMD} -e format-check + + - <<: *x-linux-shard + name: TOXENV=typecheck + script: ${TOX_CMD} -e typecheck + + - <<: *x-linux-38-shard + name: TOXENV=vendor-check + script: ${TOX_CMD} -e vendor-check + + - <<: *x-linux-27-shard + name: TOXENV=py27 + script: ${TOX_CMD} -e py27 + + - <<: *x-linux-27-shard + name: TOXENV=py27-subprocess + script: ${TOX_CMD} -e py27-subprocess + + - <<: *x-linux-shard + name: TOXENV=py35 + python: 3.5.9 + script: ${TOX_CMD} -e py35 + + - <<: *x-linux-shard + name: TOXENV=py36 + python: 3.6.10 + script: ${TOX_CMD} -e py36 + + - <<: *x-linux-shard + name: TOXENV=py37 + python: 3.7.7 + script: ${TOX_CMD} -e py37 + + - <<: *x-linux-38-shard + name: TOXENV=py38 + script: ${TOX_CMD} -e py38 + + - <<: *x-linux-39-shard + name: TOXENV=py39 + script: ${TOX_CMD} -e py39 + + - <<: *x-linux-pypy-shard + name: TOXENV=pypy + script: ${TOX_CMD} -e pypy + + - <<: *x-linux-27-shard + name: TOXENV=py27-integration + script: ${TOX_CMD} -e py27-integration + + - <<: *x-linux-39-shard + name: TOXENV=py39-integration + script: ${TOX_CMD} -e py39-integration + + - <<: *x-linux-pypy-shard + name: TOXENV=pypy-integration + script: ${TOX_CMD} -e pypy-integration + + - <<: *x-osx-27-shard + name: TOXENV=py27 + script: ${TOX_CMD} -e py27 + + - <<: *x-osx-39-shard + name: TOXENV=py39 + script: ${TOX_CMD} -e py39 + + - <<: *x-osx-27-shard + name: TOXENV=py27-integration + script: ${TOX_CMD} -e py27-integration + + - <<: *x-osx-39-shard + name: TOXENV=py39-integration + script: ${TOX_CMD} -e py39-integration - <<: *x-windows-27-shard name: TOXENV=py27