guix-commits
[Top][All Lists]
Advanced

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

01/03: gnu: ghmm: Run tests after install.


From: Ricardo Wurmus
Subject: 01/03: gnu: ghmm: Run tests after install.
Date: Tue, 4 Oct 2016 06:55:59 +0000 (UTC)

rekado pushed a commit to branch master
in repository guix.

commit ced12a7bff314eb173d292448713d6081fe8f21a
Author: Ricardo Wurmus <address@hidden>
Date:   Mon Oct 3 19:12:08 2016 +0200

    gnu: ghmm: Run tests after install.
    
    * gnu/packages/machine-learning.scm (ghmm)[arguments]: Move "check"
    phase after "install"; add phase "fix-PYTHONPATH".
---
 gnu/packages/machine-learning.scm |   27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index 7fd0a26..c239c4f 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -134,20 +134,25 @@ classification.")
                   "0qbq1rqp94l530f043qzp8aw5lj7dng9wq0miffd7spd1ff638wq"))))
       (build-system gnu-build-system)
       (arguments
-       `(#:phases
+       `(#:imported-modules (,@%gnu-build-system-modules
+                             (guix build python-build-system))
+         #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'enter-dir
              (lambda _ (chdir "ghmm") #t))
-           (add-after 'enter-dir 'fix-PYTHONPATH
-             (lambda* (#:key outputs #:allow-other-keys)
-               ;; The Python tests fail as the library is assumed to be stored
-               ;; in ./build/lib.linux-i686-*.  To fix this we detect the CPU
-               ;; and use it in the path.
-               (substitute* "configure.in"
-                 (("AM_INIT_AUTOMAKE" line)
-                  (string-append line "\nAC_CANONICAL_HOST\n")))
-               (substitute* "ghmmwrapper/Makefile.am"
-                 (("i686") "@host_cpu@"))
+           (delete 'check)
+           (add-after 'install 'check
+             (assoc-ref %standard-phases 'check))
+           (add-before 'check 'fix-PYTHONPATH
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((python-version ((@@ (guix build python-build-system)
+                                           get-python-version)
+                                      (assoc-ref inputs "python"))))
+                 (setenv "PYTHONPATH"
+                         (string-append (getenv "PYTHONPATH")
+                                        ":" (assoc-ref outputs "out")
+                                        "/lib/python" python-version
+                                        "/site-packages")))
                #t))
            (add-after 'enter-dir 'fix-runpath
              (lambda* (#:key outputs #:allow-other-keys)



reply via email to

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