guix-commits
[Top][All Lists]
Advanced

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

11/16: gnu: python-libsass: Fix build.


From: guix-commits
Subject: 11/16: gnu: python-libsass: Fix build.
Date: Thu, 3 Feb 2022 17:44:58 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit a5eb5dd57162ee4fc662494b566d0a3c1e515e92
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Feb 3 19:05:56 2022 +0100

    gnu: python-libsass: Fix build.
    
    * gnu/packages/python-xyz.scm (python-libsass)[arguments]: Add phase to
    appease sanity check.  While here, make tests conditional and remove 
trailing #t.
---
 gnu/packages/python-xyz.scm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 01c9ea3cf1..7493379cb6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12083,9 +12083,21 @@ specification.")
              (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
              #t))
          (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)
-             (add-installed-pythonpath inputs outputs)
-             (invoke "pytest" "sasstests.py"))))))
+             ;; 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")))))))
     (native-inputs
      (list python-pytest python-werkzeug))
     (inputs



reply via email to

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