Skip to content
Permalink
Browse files

Set $PY to disambiguate which Py2.7 version to use

Interpreter constraints don't work, as previously noted.
  • Loading branch information...
Eric-Arellano committed Feb 26, 2019
1 parent 8dd215d commit 2166efe79ce38d0ebf435e8c4c4dd1235034d59b
Showing with 8 additions and 2 deletions.
  1. +2 −0 .travis.yml
  2. +4 −2 build-support/docker/travis_ci_py27_ucs2/Dockerfile
  3. +2 −0 build-support/travis/travis.yml.mustache
@@ -462,6 +462,8 @@ py27_osx_build_wheels_ucs4: &py27_osx_build_wheels_ucs4
- PATH="/usr/local/opt/openssl/bin:$PATH" LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" PYENV_ROOT="${HOME}/.pyenv" PATH="${PYENV_ROOT}/shims:${PATH}"

- 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
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
@@ -9,7 +9,9 @@ FROM pantsbuild/centos6:latest

# Note we use 2.7.15, rather than 2.7.13, as the centos6 image already comes with 2.7.13
# installed, which uses UCS4 instead of UCS2. This allows us to disambiguate which Python 2
# interpreter to use when `ci.sh` sets the interpreter constraints for Pants and PEX.
# interpreter to use when `ci.sh` sets the interpreter constraints for Pants and PEX. We
# set $PY to the exact Python 2.7 version we want to ensure the PEX is bootstrapped
# with UCS 2.
ARG PYTHON_2_VERSION=2.7.15
RUN yum install sqlite-devel -y
ENV PYENV_ROOT /pyenv-docker-build
@@ -19,7 +21,7 @@ ENV PYTHON_CONFIGURE_OPTS --enable-unicode=ucs2
RUN /usr/bin/scl enable devtoolset-7 -- bash -c '\
${PYENV_ROOT}/bin/pyenv install ${PYTHON_2_VERSION} \
&& ${PYENV_ROOT}/bin/pyenv global ${PYTHON_2_VERSION}'
ENV PATH "${PYENV_ROOT}/shims:${PATH}"
ENV PY "${PYENV_ROOT}/shims/python2.7"

# Setup mount points for the travis ci user & workdir.
VOLUME /travis/home
@@ -440,6 +440,8 @@ py27_osx_build_wheels_ucs4: &py27_osx_build_wheels_ucs4
- CACHE_NAME=osxwheelsbuild.ucs4
- {{>env_osx_with_pyenv}}
- 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
before_install:
{{>before_install_osx}}
- git clone https://github.com/pyenv/pyenv ${PYENV_ROOT}

0 comments on commit 2166efe

Please sign in to comment.
You can’t perform that action at this time.