From: Thomas Danckaert <post@thomasdanckaert.be>
To: 28660@debbugs.gnu.org
Subject: [bug#28660] [PATCH] gnu: python-numpy: Give sh store location instead of setting $SHELL.
Date: Sun, 01 Oct 2017 14:44:04 +0200 (CEST) [thread overview]
Message-ID: <20171001.144404.698351802734865623.post@thomasdanckaert.be> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 494 bytes --]
Hi Guix,
I slightly botched the last numpy update: setting $SHELL works, but
then we have to set $SHELL for every package which uses numpy's
distutils. I don't know how many packages there are, but it includes
scipy and python-hdf (and therefore those builds are currently broken
on master...).
The attached patch should fix the issue for all packages, by setting
the default shell to the “/bin/sh” of the build environment's bash
package (i.e. bash-minimal).
Thomas
[-- Attachment #2: 0001-gnu-python-numpy-Give-sh-store-location-instead-of-s.patch --]
[-- Type: Text/X-Patch, Size: 1842 bytes --]
From cfaebf1b09c71585b5513629005e7cf3c5d17508 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <thomas.danckaert@gmail.com>
Date: Sun, 1 Oct 2017 14:32:04 +0200
Subject: [PATCH] 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 location of bash as a default shell. Otherwise,
we have to set $SHELL for every package which uses numpy's distutils.
---
gnu/packages/python.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e95c22de1..267715b0f 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,10 @@ include_dirs = ~a/include
(assoc-ref inputs "openblas")
(assoc-ref inputs "lapack")
(assoc-ref inputs "lapack"))))
+ ;; Insert bash store location for default shell /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\\(\\)")
--
2.14.1
next reply other threads:[~2017-10-01 12:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-01 12:44 Thomas Danckaert [this message]
2017-10-04 6:30 ` [bug#28660] [PATCH] gnu: python-numpy: Give sh store location instead of setting $SHELL Christopher Baines
2017-10-04 7:04 ` Thomas Danckaert
2017-10-04 7:49 ` Christopher Baines
2017-10-04 12:12 ` bug#28660: " Thomas Danckaert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171001.144404.698351802734865623.post@thomasdanckaert.be \
--to=post@thomasdanckaert.be \
--cc=28660@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.