From 46ce1c6a502c6ee7b2aa1e310132a7d33bb4740a Mon Sep 17 00:00:00 2001 From: John Sirois Date: Fri, 5 Apr 2019 12:17:33 -0600 Subject: [PATCH] Hack up interpreter selection in non-default UCS python 2.7 wheel building shards for Linux and OSX. --- .travis.yml | 2 ++ build-support/docker/travis_ci_py27_ucs2/Dockerfile | 5 +++++ build-support/travis/travis.yml.mustache | 2 ++ 3 files changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 85bb317a81d9..ccab2f840f83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -596,6 +596,8 @@ py27_osx_build_wheels_ucs4: &py27_osx_build_wheels_ucs4 - PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs4 # We set $PY to ensure the UCS4 interpreter is used when bootstrapping the PEX. - PY=${PYENV_ROOT}/shims/python2.7 + # We hack selection of the the UCS4 interpreter by Pants with this constraint. + - PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['2.7.13']" before_install: - curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64 -o /usr/local/bin/jq - chmod 755 /usr/local/bin/jq diff --git a/build-support/docker/travis_ci_py27_ucs2/Dockerfile b/build-support/docker/travis_ci_py27_ucs2/Dockerfile index 0babfbe32e66..f5fa55a844eb 100644 --- a/build-support/docker/travis_ci_py27_ucs2/Dockerfile +++ b/build-support/docker/travis_ci_py27_ucs2/Dockerfile @@ -30,6 +30,11 @@ ENV PATH "${PYENV_ROOT}/shims:${PATH}" ENV PY "${PYENV_ROOT}/shims/python2.7" ENV PEX_PYTHON_PATH "${PYENV_ROOT}/shims/python2.7" +# We hack selection of the the UCS4 interpreter by Pants with the interpreter constraint. +# This hack may be un-neccessary due to setting PEX_PYTHON_PATH above, but we add it for +# (non-local :/) symmetry with .travis.yml setup of said-same for the non-default UCS OSX shard. +ENV PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS "['2.7.13']" + # Setup mount points for the travis ci user & workdir. VOLUME /travis/home VOLUME /travis/workdir diff --git a/build-support/travis/travis.yml.mustache b/build-support/travis/travis.yml.mustache index 412513842ea0..661e055274a3 100644 --- a/build-support/travis/travis.yml.mustache +++ b/build-support/travis/travis.yml.mustache @@ -543,6 +543,8 @@ py27_osx_build_wheels_ucs4: &py27_osx_build_wheels_ucs4 - PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs4 # We set $PY to ensure the UCS4 interpreter is used when bootstrapping the PEX. - PY=${PYENV_ROOT}/shims/python2.7 + # We hack selection of the the UCS4 interpreter by Pants with this constraint. + - PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['2.7.13']" before_install: {{>before_install_osx}} - ./build-support/bin/install_python_for_ci.sh 2.7.13 ${PYENV_PY36_VERSION}