guix-commits
[Top][All Lists]
Advanced

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

30/37: gnu: python-msgpack: Run the tests.


From: Marius Bakke
Subject: 30/37: gnu: python-msgpack: Run the tests.
Date: Wed, 28 Feb 2018 10:33:55 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit 2441239842fa6f786008e8c75651342b2c0172d2
Author: Marius Bakke <address@hidden>
Date:   Wed Feb 28 05:04:26 2018 +0100

    gnu: python-msgpack: Run the tests.
    
    * gnu/packages/python.scm (python-msgpack)[arguments]: Add #:modules.  
Replace
    CHECK-PHASE with pytest invocation.
    [native-inputs]: Add PYTHON-PYTEST.
---
 gnu/packages/python.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 32fcea4..80ea4ca 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5840,6 +5840,26 @@ should be stored on various operating systems.")
                (base32
                 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
     (build-system python-build-system)
+    (arguments
+     `(#:modules ((guix build utils)
+                  (guix build python-build-system)
+                  (ice-9 ftw)
+                  (srfi srfi-1)
+                  (srfi srfi-26))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (let ((cwd (getcwd)))
+               (setenv "PYTHONPATH"
+                       (string-append cwd "/build/"
+                                      (find (cut string-prefix? "lib" <>)
+                                            (scandir (string-append cwd 
"/build")))
+                                      ":"
+                                      (getenv "PYTHONPATH")))
+             (invoke "pytest" "-v" "test")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
     (synopsis "MessagePack (de)serializer")
     (description "MessagePack is a fast, compact binary serialization format,
 suitable for similar data to JSON.  This package provides CPython bindings for



reply via email to

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