From fd1564f3dd687107c2e9864d0bf91c584e8895dc Mon Sep 17 00:00:00 2001 From: Diane Bruce Date: Sun, 14 Jan 2018 20:33:37 +0000 Subject: [PATCH] exec_command.py states in comments it uses /bin/sh on POSIX for subprocess but incorrectly uses shell from environment. This makes compiles fail when compilation is done using the account 'nobody' which is default on pkg-fallout runs. PR: ports/225156 Submitted by: self Reported by: self Reviewed by: antoine Approved by: antoine --- math/py-numpy/Makefile | 1 + .../files/patch-numpy-distutils-exec_command.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 math/py-numpy/files/patch-numpy-distutils-exec_command.py diff --git a/math/py-numpy/Makefile b/math/py-numpy/Makefile index d33997ffb19c..f30363bdb29c 100644 --- a/math/py-numpy/Makefile +++ b/math/py-numpy/Makefile @@ -4,6 +4,7 @@ PORTNAME= numpy PORTVERSION= 1.13.3 DISTVERSIONPREFIX= v +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= math python MASTER_SITES= http://docs.scipy.org/doc/${PORTNAME}-${PORTVERSION:R}.0/:doc diff --git a/math/py-numpy/files/patch-numpy-distutils-exec_command.py b/math/py-numpy/files/patch-numpy-distutils-exec_command.py new file mode 100644 index 000000000000..ea297206195c --- /dev/null +++ b/math/py-numpy/files/patch-numpy-distutils-exec_command.py @@ -0,0 +1,11 @@ +--- numpy/distutils/exec_command.py.orig 2017-09-29 20:10:10 UTC ++++ numpy/distutils/exec_command.py +@@ -231,7 +231,7 @@ def _exec_command(command, use_shell=Non + + if os.name == 'posix' and use_shell: + # On POSIX, subprocess always uses /bin/sh, override +- sh = os.environ.get('SHELL', '/bin/sh') ++ sh = '/bin/sh' + if is_sequence(command): + command = [sh, '-c', ' '.join(command)] + else: