Skip to content
Permalink
Browse files

Move interpreter constraints to Docker env entry

Docker does not pull in external env vars. Instead, we must specify this in the Dockerfile.

This change has added benefit that it moves all of the Py2 logic into the Dockerfile out of .travis.yml, and leaves .travis.yml solely to call the Dockerfile.
  • Loading branch information...
Eric-Arellano committed Feb 26, 2019
1 parent b9efbf0 commit f810849d58c1cd0fbdb9af10f8bb4c6c8c27ce65
Showing with 2 additions and 7 deletions.
  1. +0 −3 .travis.yml
  2. +2 −1 build-support/docker/travis_ci_py27_ucs2/Dockerfile
  3. +0 −3 build-support/travis/travis.yml.mustache
@@ -400,9 +400,6 @@ py27_linux_build_wheels_ucs2: &py27_linux_build_wheels_ucs2
name: "Build wheels - Linux and cp27m (UCS2)"
env:
- *base_build_wheels_env
# While we install 2.7.15 with UCS2, the Centos6 image already has 2.7.13 (UCS4). To disambiguate
# what `python2` resolves to and ensure we always use UCS2, we require exactly 2.7.15.
- PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['CPython==2.7.15']"
- CACHE_NAME=linuxwheelsbuild.ucs2
script:
- docker build --rm -t travis_ci_py27_ucs2
@@ -9,7 +9,7 @@ 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 in `.travis.yml` to disambiguate
# PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS to exactly 2.7.15 to disambiguate
# the two and always choose the UCS2 interpeter.
ARG PYTHON_2_VERSION=2.7.15
RUN yum install sqlite-devel -y
@@ -21,6 +21,7 @@ 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
@@ -379,9 +379,6 @@ py27_linux_build_wheels_ucs2: &py27_linux_build_wheels_ucs2
name: "Build wheels - Linux and cp27m (UCS2)"
env:
- *base_build_wheels_env
# While we install 2.7.15 with UCS2, the Centos6 image already has 2.7.13 (UCS4). To disambiguate
# what `python2` resolves to and ensure we always use UCS2, we require exactly 2.7.15.
- PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['CPython==2.7.15']"
- CACHE_NAME=linuxwheelsbuild.ucs2
script:
- docker build --rm -t travis_ci_py27_ucs2

0 comments on commit f810849

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