Skip to content

Commit

Permalink
Ensure Linux UCS2 always uses Py2.7.15 (UCS2)
Browse files Browse the repository at this point in the history
It was not enough to install 2.7.15 and use Pyenv global. The 2.7.13 (UCS2) interpreter was still being recognized.
  • Loading branch information
Eric-Arellano committed Feb 26, 2019
1 parent 225f153 commit 8402c1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ 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. To disambiguate
# what `python2` resolves to, 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
Expand Down
6 changes: 3 additions & 3 deletions build-support/docker/travis_ci_py27_ucs2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,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. By using 2.7.15, `ci.sh` will set the interpreter
# constraints to `CPython==2.7.15` when bootstrapping the PEX, which will disambiguate the
# interpreter version and ensure we always use 2.7.15 with UCS2.
# 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
# the two and always choose the UCS2 interpeter.
ARG PYTHON_2_VERSION=2.7.15
RUN yum install sqlite-devel -y
ENV PYENV_ROOT /pyenv-docker-build
Expand Down
3 changes: 3 additions & 0 deletions build-support/travis/travis.yml.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ 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. To disambiguate
# what `python2` resolves to, 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
Expand Down

0 comments on commit 8402c1f

Please sign in to comment.