guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#27922] [PATCH] gnu: python-numpy: Update to 1.12.1.


From: Thomas Danckaert
Subject: [bug#27922] [PATCH] gnu: python-numpy: Update to 1.12.1.
Date: Tue, 26 Sep 2017 18:59:21 +0200 (CEST)

From: Leo Famulari <address@hidden>
Subject: Re: [bug#27922] [PATCH] gnu: python-numpy: Update to 1.12.1.
Date: Tue, 26 Sep 2017 11:46:20 -0400

On Tue, Sep 26, 2017 at 01:48:45PM +0200, Ludovic Courtès wrote:
Thomas Danckaert <address@hidden> skribis:
> I can push a modified patch (with the pypi source) if it's ok. Is there
> any reason we would not update to version 1.13.1 rightaway?

If the dependents of NumPy build fine, I see no reason not to upgrade to
1.13.1.

Thanks for picking this up!

Yes, thank you! I got distracted and had to take a little break, which
is why this patch fell by the wayside.

Attached patch updates to 1.13.1. I had to add bash-minimal as a native input because the numpy people made their build system a little more convoluted ;-) (external commands such as gcc are run within a shell with $SHELL -c 'gcc [...]', I didn't look up the motivation for that).

If there are no objections, I'll push this soon.

Thomas

ps I couldn't check if matplotlib still builds with this numpy version, because our bluez package (on which matplotlib apparently depends) appears to be broken. But that's another story.
>From 2b90b6e2a9b7ac73937ee8e52b08bb715ba33fb7 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <address@hidden>
Date: Tue, 26 Sep 2017 16:26:08 +0200
Subject: [PATCH] gnu: python-numpy: Update to 1.13.1.

* gnu/packages/python.scm (python-numpy, python2-numpy): Update to 1.12.1.
[source]: Download the zip release from pypi instead of a git snapshot.
[native-inputs]: Add unzip and bash-minimal.
[arguments]: Set SHELL environment variable.

Co-authored by Leo Famulari <address@hidden>
---
 gnu/packages/python.scm | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5dcb5a05c..6b9de923d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3720,22 +3720,24 @@ between language specification and implementation 
aspects.")
 (define-public python-numpy
   (package
     (name "python-numpy")
-    (version "1.12.0")
+    (version "1.13.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://github.com/numpy/numpy/archive/v"; version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (uri (pypi-uri "numpy" version ".zip"))
        (sha256
         (base32
-         "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
+         "1fsgkhh1vdkhmlz8vmdgxnj9n9yaanckxxzz9s0b4p08fqvjic69"))))
     (build-system python-build-system)
     (inputs
      `(("openblas" ,openblas)
        ("lapack" ,lapack)))
     (native-inputs
-     `(("python-cython" ,python-cython)
+     `(("unzip" ,unzip)
+       ;; We need bash because numpy's distutils runs external commands with
+       ;; $SHELL -c '...'.
+       ("bash" ,bash-minimal)
+       ("python-cython" ,python-cython)
        ("python-nose" ,python-nose)
        ("gfortran" ,gfortran)))
     (arguments
@@ -3743,6 +3745,8 @@ between language specification and implementation 
aspects.")
        (modify-phases %standard-phases
         (add-before 'build 'set-environment-variables
          (lambda* (#:key inputs #:allow-other-keys)
+          (setenv "SHELL"
+                  (string-append (assoc-ref inputs "bash") "/bin/bash"))
           (call-with-output-file "site.cfg"
             (lambda (port)
               (format port
-- 
2.14.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]