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 <mhw@netris.org>
This commit is contained in:
Ricardo Wurmus 2015-05-22 16:48:05 +02:00 committed by Mark H Weaver
parent a647e0b8ee
commit dbdfe51598

View File

@ -2283,7 +2283,7 @@ writing C extensions for Python as easy as Python itself.")
(build-system python-build-system) (build-system python-build-system)
(inputs (inputs
`(("python-nose" ,python-nose) `(("python-nose" ,python-nose)
("atlas" ,atlas))) ("openblas" ,openblas)))
(native-inputs (native-inputs
`(("gfortran" ,gfortran-4.8))) `(("gfortran" ,gfortran-4.8)))
(arguments (arguments
@ -2291,16 +2291,18 @@ writing C extensions for Python as easy as Python itself.")
(alist-cons-before (alist-cons-before
'build 'set-environment-variables 'build 'set-environment-variables
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let* ((atlas-threaded (call-with-output-file "site.cfg"
(string-append (assoc-ref inputs "atlas") (lambda (port)
"/lib/libtatlas.so")) (format port "[openblas]
;; On single core CPUs only the serial library is created. libraries = openblas
(atlas-lib library_dirs = ~a/lib
(if (file-exists? atlas-threaded) include_dirs = ~a/include
atlas-threaded " (assoc-ref inputs "openblas") (assoc-ref inputs "openblas"))))
(string-append (assoc-ref inputs "atlas") ;; Use "gcc" executable, not "cc".
"/lib/libsatlas.so")))) (substitute* "numpy/distutils/system_info.py"
(setenv "ATLAS" atlas-lib))) (("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 ;; Tests can only be run after the library has been installed and not
;; within the source directory. ;; within the source directory.
(alist-cons-after (alist-cons-after