summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python.scm59
1 files changed, 59 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 378660482f9..7967201f17b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -35,6 +35,8 @@
35 #:use-module (gnu packages readline) 35 #:use-module (gnu packages readline)
36 #:use-module (gnu packages openssl) 36 #:use-module (gnu packages openssl)
37 #:use-module (gnu packages elf) 37 #:use-module (gnu packages elf)
38 #:use-module (gnu packages maths)
39 #:use-module (gnu packages gcc)
38 #:use-module (gnu packages pkg-config) 40 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages databases) 41 #:use-module (gnu packages databases)
40 #:use-module (gnu packages zip) 42 #:use-module (gnu packages zip)
@@ -1873,3 +1875,60 @@ writing C extensions for Python as easy as Python itself.")
1873 (name "python2-cython") 1875 (name "python2-cython")
1874 (inputs 1876 (inputs
1875 `(("python-2" ,python-2))))) ; this is not automatically changed 1877 `(("python-2" ,python-2))))) ; this is not automatically changed
1878
1879;; This version of numpy is missing the documentation and is only used to
1880;; build matplotlib which is required to build numpy's documentation.
1881(define python-numpy-bootstrap
1882 (package
1883 (name "python-numpy-bootstrap")
1884 (version "1.9.1")
1885 (source
1886 (origin
1887 (method url-fetch)
1888 (uri (string-append "mirror://sourceforge/numpy"
1889 "/numpy-" version ".tar.gz"))
1890 (sha256
1891 (base32
1892 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
1893 (build-system python-build-system)
1894 (inputs
1895 `(("python-nose" ,python-nose)
1896 ("atlas" ,atlas)))
1897 (native-inputs
1898 `(("gfortran" ,gfortran-4.8)))
1899 (arguments
1900 `(#:phases
1901 (alist-cons-before
1902 'build 'set-environment-variables
1903 (lambda* (#:key inputs #:allow-other-keys)
1904 (let* ((atlas-threaded
1905 (string-append (assoc-ref inputs "atlas")
1906 "/lib/libtatlas.so"))
1907 ;; On single core CPUs only the serial library is created.
1908 (atlas-lib
1909 (if (file-exists? atlas-threaded)
1910 atlas-threaded
1911 (string-append (assoc-ref inputs "atlas")
1912 "/lib/libsatlas.so"))))
1913 (setenv "ATLAS" atlas-lib)))
1914 ;; Tests can only be run after the library has been installed and not
1915 ;; within the source directory.
1916 (alist-cons-after
1917 'install 'check
1918 (lambda _
1919 (with-directory-excursion "/tmp"
1920 (zero? (system* "python" "-c" "import numpy; numpy.test()"))))
1921 (alist-delete
1922 'check
1923 %standard-phases)))))
1924 (home-page "http://www.numpy.org/")
1925 (synopsis "Fundamental package for scientific computing with Python")
1926 (description "NumPy is the fundamental package for scientific computing
1927with Python. It contains among other things: a powerful N-dimensional array
1928object, sophisticated (broadcasting) functions, tools for integrating C/C++
1929and Fortran code, useful linear algebra, Fourier transform, and random number
1930capabilities.")
1931 (license bsd-3)))
1932
1933(define python2-numpy-bootstrap
1934 (package-with-python2 python-numpy-bootstrap))