guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: python-numpy: Build against OpenBLAS.


From: Mark H. Weaver
Subject: 01/01: gnu: python-numpy: Build against OpenBLAS.
Date: Sun, 07 Jun 2015 21:31:17 +0000

mhw pushed a commit to branch master
in repository guix.

commit dbdfe515989d18785164e647790a0da48c4017ea
Author: Ricardo Wurmus <address@hidden>
Date:   Fri May 22 16:48:05 2015 +0200

    gnu: python-numpy: Build against OpenBLAS.
    
    * gnu/packages/python.scm (python-numpy)[inputs]: Use "openblas" instead of
      "atlas".
    * gnu/packages/python.scm (python-numpy)[arguments]: Configure build against
      OpenBLAS.
    
    Modified-By: Mark H Weaver <address@hidden>
---
 gnu/packages/python.scm |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5dd1165..914c2dc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2283,7 +2283,7 @@ writing C extensions for Python as easy as Python 
itself.")
     (build-system python-build-system)
     (inputs
      `(("python-nose" ,python-nose)
-       ("atlas" ,atlas)))
+       ("openblas" ,openblas)))
     (native-inputs
      `(("gfortran" ,gfortran-4.8)))
     (arguments
@@ -2291,16 +2291,18 @@ writing C extensions for Python as easy as Python 
itself.")
        (alist-cons-before
         'build 'set-environment-variables
         (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 "[openblas]
+libraries = openblas
+library_dirs = ~a/lib
+include_dirs = ~a/include
+" (assoc-ref inputs "openblas") (assoc-ref inputs "openblas"))))
+          ;; Use "gcc" executable, not "cc".
+          (substitute* "numpy/distutils/system_info.py"
+            (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
+             "c = distutils.ccompiler.new_compiler(); 
c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc
 -shared')"))
+          #t)
         ;; Tests can only be run after the library has been installed and not
         ;; within the source directory.
         (alist-cons-after



reply via email to

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