guix-commits
[Top][All Lists]
Advanced

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

02/05: gnu: python-scipy: Build with OpenBLAS and lapack.


From: Ricardo Wurmus
Subject: 02/05: gnu: python-scipy: Build with OpenBLAS and lapack.
Date: Mon, 15 Jun 2015 08:36:50 +0000

rekado pushed a commit to branch master
in repository guix.

commit 719b01c1575b8599b0dca9f245a9d759032f3168
Author: Ricardo Wurmus <address@hidden>
Date:   Fri Jun 12 11:30:51 2015 +0200

    gnu: python-scipy: Build with OpenBLAS and lapack.
    
    * gnu/packages/python.scm (python-scipy)[inputs]: Remove "atlas", add 
"lapack"
      and "openblas".
    * gnu/packages/python.scm (python-scipy)[arguments]: Replace phase
      "set-environment-variables" with "configure-openblas".
---
 gnu/packages/python.scm |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 39fd90a..065658f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2630,7 +2630,8 @@ toolkits.")
        ("python-pyparsing" ,python-pyparsing)
        ("python-nose" ,python-nose)
        ("python-sphinx" ,python-sphinx)
-       ("atlas" ,atlas)))
+       ("lapack" ,lapack)
+       ("openblas" ,openblas)))
     (native-inputs
      `(("gfortran" ,gfortran-4.8)
        ("texlive" ,texlive)
@@ -2639,18 +2640,23 @@ toolkits.")
     (arguments
      `(#:phases
        (alist-cons-before
-        'build 'set-environment-variables
+        'build 'configure-openblas
         (lambda* (#:key inputs #:allow-other-keys)
-          (let* ((atlas-threaded
-                  (string-append (assoc-ref inputs "atlas")
-                                 "/lib/libtatlas.so"))
-                 ;; On single core CPUs only the serial library is created.
-                 (atlas-lib
-                  (if (file-exists? atlas-threaded)
-                      atlas-threaded
-                      (string-append (assoc-ref inputs "atlas")
-                                     "/lib/libsatlas.so"))))
-            (setenv "ATLAS" atlas-lib)))
+          (call-with-output-file "site.cfg"
+            (lambda (port)
+              (format port
+                      "[blas]
+libraries = openblas
+library_dirs = ~a/lib
+include_dirs = ~a/include
+[atlas]
+library_dirs = ~a/lib
+atlas_libs = openblas
+"
+                      (assoc-ref inputs "openblas")
+                      (assoc-ref inputs "openblas")
+                      (assoc-ref inputs "openblas"))))
+          #t)
         (alist-cons-after
          'install 'install-doc
          (lambda* (#:key outputs #:allow-other-keys)



reply via email to

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