summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-09-24 11:26:36 -0400
committerGitHub <noreply@github.com>2020-09-24 11:26:36 -0400
commit1ea521c51b0ed2967a9ff1d8ad41160043a8a981 (patch)
tree972a1ffaab0a67af7fcc274e40c6ca378a67ddc0
parent896ef66ff3b167a13a5efb128013d5bd53633a79 (diff)
parent72e14eaeb6da77ea3160ae0ff8b2e0655942923e (diff)
downloadpython-setuptools-git-1ea521c51b0ed2967a9ff1d8ad41160043a8a981.tar.gz
Merge pull request #2398 from pypa/extract-ppc-patch
Extract ppc patch
-rw-r--r--.travis.yml12
-rw-r--r--tools/ppc64le-patch.py28
2 files changed, 29 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index d12a9ece..7d8c1026 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
@@ -39,15 +37,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 00000000..2a8ff8e0
--- /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()