From d8b54614aa93b42695666bc6bdbc6263da9cbbc0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 09:47:47 -0400 Subject: [PATCH 1/2] Extract PPC64LE into script and port to Python. --- .travis.yml | 10 +--------- tools/ppc64le-patch.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 tools/ppc64le-patch.py diff --git a/.travis.yml b/.travis.yml index d12a9ecee9..62da9b2078 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,15 +39,7 @@ jobs: cache: pip before_install: - - | - # Except on bionic, Travis Linux base image for PPC64LE - # platform lacks the proper - # permissions to the directory ~/.cache/pip/wheels that allow - # the user running travis build to install pip packages. - # TODO: is someone tracking this issue? Maybe just move to bionic? - if [[ "$TRAVIS_CPU_ARCH" == "ppc64le" ]]; then - sudo chown -Rfv $USER:$GROUP ~/.cache/pip/wheels - fi +- python tools/ppc64le-patch.py install: diff --git a/tools/ppc64le-patch.py b/tools/ppc64le-patch.py new file mode 100644 index 0000000000..2a8ff8e0a0 --- /dev/null +++ b/tools/ppc64le-patch.py @@ -0,0 +1,28 @@ +""" +Except on bionic, Travis Linux base image for PPC64LE +platform lacks the proper +permissions to the directory ~/.cache/pip/wheels that allow +the user running travis build to install pip packages. +TODO: is someone tracking this issue? Maybe just move to bionic? +""" + +import subprocess +import collections +import os + + +def patch(): + env = collections.defaultdict(str, os.environ) + if env['TRAVIS_CPU_ARCH'] != 'ppc64le': + return + cmd = [ + 'sudo', + 'chown', + '-Rfv', + '{USER}:{GROUP}'.format_map(env), + os.path.expanduser('~/.cache/pip/wheels'), + ] + subprocess.Popen(cmd) + + +__name__ == '__main__' and patch() From 72e14eaeb6da77ea3160ae0ff8b2e0655942923e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 10:46:49 -0400 Subject: [PATCH 2/2] Remove pypy3 from ppc64le (doesn't work). --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62da9b2078..7d8c102629 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,8 +30,6 @@ jobs: allow_failures: # suppress failures due to pypa/setuptools#2000 - python: pypy3 - - arch: ppc64le - python: pypy3 - <<: *latest_py3 env: TOXENV=docs