forked from pypa/setuptools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract PPC64LE into script and port to Python.
- Loading branch information
Showing
2 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |