guix-commits
[Top][All Lists]
Advanced

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

01/03: gnu: python2-cliapp: Enable tests.


From: Arun Isaac
Subject: 01/03: gnu: python2-cliapp: Enable tests.
Date: Fri, 1 Sep 2017 02:06:21 -0400 (EDT)

arunisaac pushed a commit to branch master
in repository guix.

commit 689042e5260c6e2ce6190115e9025f49fc8c6b6d
Author: Arun Isaac <address@hidden>
Date:   Thu Aug 24 18:30:26 2017 +0530

    gnu: python2-cliapp: Enable tests.
    
    * gnu/packages/python.scm (python2-cliapp)[arguments]: Replace 'check' phase
    with custom function.
---
 gnu/packages/python.scm | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 993dcb0..0687a23 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14093,7 +14093,22 @@ parse many formal languages.")
          "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2))
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         ;; check phase needs to be run before the build phase. If not,
+         ;; coverage-test-runner looks for tests for the built source files,
+         ;; and fails.
+         (delete 'check)
+         (add-before 'build 'check
+           (lambda _
+             ;; Disable python3 tests
+             (substitute* "check"
+               (("python3") "# python3"))
+             (zero? (system* "./check")))))))
+    (native-inputs
+     `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
+       ("python2-pep8" ,python2-pep8)))
     (propagated-inputs
      `(("python2-pyaml" ,python2-pyaml)))
     (home-page "https://liw.fi/cliapp/";)



reply via email to

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