diff options
author | Thomas Danckaert <thomas.danckaert@gmail.com> | 2017-10-01 14:32:04 +0200 |
---|---|---|
committer | Thomas Danckaert <thomas.danckaert@gmail.com> | 2017-10-04 14:09:52 +0200 |
commit | 1033cdbb0c27a75b77a05a97fbbe776060d5c6e7 (patch) | |
tree | bb54c01aba05e6b680ce5ffc40b13bc3c99ad00a /gnu/packages/python.scm | |
parent | 48b68c61789ee1ade873e316cb69b2b87a18123d (diff) | |
download | guix-patches-1033cdbb0c27a75b77a05a97fbbe776060d5c6e7.tar guix-patches-1033cdbb0c27a75b77a05a97fbbe776060d5c6e7.tar.gz |
gnu: python-numpy: Give sh store location instead of setting $SHELL.
* gnu/packages/python.scm (python-numpy): [arguments] Don't set $SHELL in the
environment, but embed the store location of bash-minimal as a default
shell. Otherwise, we have to set $SHELL for every package which uses
numpy's distutils.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r-- | gnu/packages/python.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c0173c51fe..bf451ab06d 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3742,8 +3742,6 @@ between language specification and implementation aspects.") (modify-phases %standard-phases (add-before 'build 'set-environment-variables (lambda* (#:key inputs #:allow-other-keys) - ;; numpy's distutils uses $SHELL to run external commands. - (setenv "SHELL" "bash") (call-with-output-file "site.cfg" (lambda (port) (format port @@ -3762,6 +3760,11 @@ include_dirs = ~a/include (assoc-ref inputs "openblas") (assoc-ref inputs "lapack") (assoc-ref inputs "lapack")))) + ;; Make /gnu/store/...-bash-.../bin/sh the default shell, instead of + ;; /bin/sh. + (substitute* "numpy/distutils/exec_command.py" + (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end) + (string-append match-start (assoc-ref inputs "bash") match-end))) ;; Use "gcc" executable, not "cc". (substitute* "numpy/distutils/system_info.py" (("c = distutils\\.ccompiler\\.new_compiler\\(\\)") |