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
This commit is contained in:
Diane Bruce
2018-01-14 20:33:37 +00:00
parent 1f5e6583f2
commit fd1564f3dd
2 changed files with 12 additions and 0 deletions

View File

@@ -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: