guix-commits
[Top][All Lists]
Advanced

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

143/150: gnu: python-libsass: Fix 'sanity-check phase.


From: guix-commits
Subject: 143/150: gnu: python-libsass: Fix 'sanity-check phase.
Date: Sun, 24 Apr 2022 05:12:50 -0400 (EDT)

lbraun pushed a commit to branch wip-python-pep517
in repository guix.

commit ea426a3ac5b5e36f5c5768f6b8c7e0a61d4883a2
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Sun Jan 16 15:04:09 2022 +0100

    gnu: python-libsass: Fix 'sanity-check phase.
    
    * gnu/packages/python-xyz.scm (python-libsass)[arguments]: Replace custom
    'check phase with #:test-flags. Add new phase 'ignore-tests.
---
 gnu/packages/python-xyz.scm | 26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9e9bb8e428..c69fed3896 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12300,27 +12300,17 @@ specification.")
         (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
     (build-system python-build-system)
     (arguments
-     '(#:phases
+     `(#:test-flags '("-vv" "sasstests.py")
+       #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'ignore-tests
+           (lambda _
+             (substitute* "setup.py" (("'sasstests'") ""))))
          ;; Use Guix package of libsass instead of compiling from a checkout.
          (add-before 'build 'set-libsass
-           (lambda _ (setenv "SYSTEM_SASS" "indeed")))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (invoke "pytest" "sasstests.py"))))
-         (add-after 'install 'delete-test
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;; Delete sasstests.py because it attempts to open a file
-             ;; that is not installed when loaded, which breaks the sanity
-             ;; check.
-             (delete-file (string-append
-                           (assoc-ref outputs "out")
-                           "/lib/python"
-                           (python-version
-                            (dirname (dirname
-                                      (search-input-file inputs 
"bin/python"))))
-                           "/site-packages/sasstests.py")))))))
+           (lambda _
+             (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
+             #t)))))
     (native-inputs
      (list python-pytest python-werkzeug))
     (inputs



reply via email to

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