Archived
1
0
Fork 0

gnu: python-numpy-bootstrap, python-numpy: Fix build.

* gnu/packages/python.scm (python-numpy-bootstrap): Correct inputs, use
  modify-phases, add dummy newlines character to string to make emacs happy,
  set PYTHONPATH prior to running tests. (python-numpy): propagate inputs, set
  PYTHONPATH prior to building docs.
This commit is contained in:
Hartmut Goebel 2016-10-13 14:34:13 +02:00
parent 9e8c6a37db
commit 2efabc5589
No known key found for this signature in database
GPG key ID: 634A8DFFD3F631DF

View file

@ -3098,17 +3098,16 @@ between language specification and implementation aspects.")
(base32 (base32
"1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp")))) "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
(build-system python-build-system) (build-system python-build-system)
(native-inputs
`(("python-nose" ,python-nose)))
(inputs (inputs
`(("openblas" ,openblas) `(("openblas" ,openblas)
("lapack" ,lapack))) ("lapack" ,lapack)))
(native-inputs (native-inputs
`(("gfortran" ,gfortran))) `(("python-nose" ,python-nose)
("gfortran" ,gfortran)))
(arguments (arguments
`(#:phases `(#:phases
(alist-cons-before (modify-phases %standard-phases
'build 'set-environment-variables (add-before 'build 'set-environment-variables
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(call-with-output-file "site.cfg" (call-with-output-file "site.cfg"
(lambda (port) (lambda (port)
@ -3118,7 +3117,8 @@ libraries = openblas
library_dirs = ~a/lib library_dirs = ~a/lib
include_dirs = ~a/include include_dirs = ~a/include
[lapack] # backslash-n to make emacs happy
\n[lapack]
lapack_libs = lapack lapack_libs = lapack
library_dirs = ~a/lib library_dirs = ~a/lib
include_dirs = ~a/include include_dirs = ~a/include
@ -3131,18 +3131,17 @@ include_dirs = ~a/include
(substitute* "numpy/distutils/system_info.py" (substitute* "numpy/distutils/system_info.py"
(("c = distutils\\.ccompiler\\.new_compiler\\(\\)") (("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')")) "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
#t) #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 (delete 'check)
'install 'check (add-after 'install 'check
(lambda _ (lambda* (#:key outputs inputs #:allow-other-keys)
;; Make installed package available for running the tests
(add-installed-pythonpath inputs outputs)
(with-directory-excursion "/tmp" (with-directory-excursion "/tmp"
(zero? (system* "python" "-c" (zero? (system* "python" "-c"
"import numpy; numpy.test(verbose=2)")))) "import numpy; numpy.test(verbose=2)"))))))))
(alist-delete
'check
%standard-phases)))))
(home-page "http://www.numpy.org/") (home-page "http://www.numpy.org/")
(synopsis "Fundamental package for scientific computing with Python") (synopsis "Fundamental package for scientific computing with Python")
(description "NumPy is the fundamental package for scientific computing (description "NumPy is the fundamental package for scientific computing
@ -3175,10 +3174,10 @@ capabilities.")
("python2-matplotlib" ,python2-matplotlib) ("python2-matplotlib" ,python2-matplotlib)
("python2-pandas" ,python2-pandas) ("python2-pandas" ,python2-pandas)
("python2-scikit-learn" ,python2-scikit-learn) ("python2-scikit-learn" ,python2-scikit-learn)
("python2-cython" ,python2-cython)
("python2-pysnptools" ,python2-pysnptools))) ("python2-pysnptools" ,python2-pysnptools)))
(native-inputs (native-inputs
`(("unzip" ,unzip) `(("unzip" ,unzip)
("python2-cython" ,python2-cython)
("python2-mock" ,python2-mock))) ("python2-mock" ,python2-mock)))
(home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/") (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
(synopsis "Perform genome-wide association studies on large data sets") (synopsis "Perform genome-wide association studies on large data sets")
@ -3193,14 +3192,15 @@ association studies (GWAS) on extremely large data sets.")
(name "python-numpy") (name "python-numpy")
(outputs '("out" "doc")) (outputs '("out" "doc"))
(inputs (inputs
`(("which" ,which) `(("which" ,which)))
("python-matplotlib" ,python-matplotlib) (propagated-inputs
("python-sphinx" ,python-sphinx) `(("python-matplotlib" ,python-matplotlib)
("python-pyparsing" ,python-pyparsing) ("python-pyparsing" ,python-pyparsing)
("python-numpydoc" ,python-numpydoc)
,@(package-inputs python-numpy-bootstrap))) ,@(package-inputs python-numpy-bootstrap)))
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config) `(("pkg-config" ,pkg-config)
("python-sphinx" ,python-sphinx)
("python-numpydoc" ,python-numpydoc)
("texlive" ,texlive) ("texlive" ,texlive)
("texinfo" ,texinfo) ("texinfo" ,texinfo)
("perl" ,perl) ("perl" ,perl)
@ -3211,7 +3211,10 @@ association studies (GWAS) on extremely large data sets.")
((#:phases phases) ((#:phases phases)
`(alist-cons-after `(alist-cons-after
'install 'install-doc 'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
;; Make installed package available for building the
;; documentation
(add-installed-pythonpath inputs outputs)
(let* ((data (string-append (assoc-ref outputs "doc") "/share")) (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
(doc (string-append (doc (string-append
data "/doc/" ,name "-" data "/doc/" ,name "-"