Skip to content
Permalink
Browse files

Stop hardcoding interpreter constraints

Let ci.sh determine them based on the $PY value. While working on the Linux UCS2 shard, it became clear that what really matters is which interpreter $PY (i.e. `python2`) resolves to. Setting the interpreter constraints will not impact what this resolves to nor how we bootstrap Pants. So, we should focus on setting $PY and let the interpreter constraints be resolved accordingly.
  • Loading branch information...
Eric-Arellano committed Feb 26, 2019
1 parent c3dd843 commit 49fe5760763b57769c93f17bfe5c4b13fec110c4
Showing with 2 additions and 10 deletions.
  1. +0 −3 .travis.yml
  2. +2 −4 build-support/docker/travis_ci_py27_ucs2/Dockerfile
  3. +0 −3 build-support/travis/travis.yml.mustache
@@ -462,9 +462,6 @@ 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
# This OSX shard comes already with Python 2.7.10 (UCS2). We install 2.7.13 (UCS4) and set
# this interpreter constraint to ensure we always use UCS4.
- PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['CPython==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
@@ -8,9 +8,8 @@
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. We pair this change with setting
# PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS to exactly 2.7.15 to disambiguate
# the two and always choose the UCS2 interpeter.
# 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.
ARG PYTHON_2_VERSION=2.7.15
RUN yum install sqlite-devel -y
ENV PYENV_ROOT /pyenv-docker-build
@@ -21,7 +20,6 @@ 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 PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS "['CPython==${PYTHON_2_VERSION}']"

# Setup mount points for the travis ci user & workdir.
VOLUME /travis/home
@@ -440,9 +440,6 @@ py27_osx_build_wheels_ucs4: &py27_osx_build_wheels_ucs4
- CACHE_NAME=osxwheelsbuild.ucs4
- {{>env_osx_with_pyenv}}
- PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs4
# This OSX shard comes already with Python 2.7.10 (UCS2). We install 2.7.13 (UCS4) and set
# this interpreter constraint to ensure we always use UCS4.
- PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['CPython==2.7.13']"
before_install:
{{>before_install_osx}}
- git clone https://github.com/pyenv/pyenv ${PYENV_ROOT}

0 comments on commit 49fe576

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