summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-02-03 19:05:56 +0100
committerMarius Bakke <marius@gnu.org>2022-02-03 23:39:47 +0100
commita5eb5dd57162ee4fc662494b566d0a3c1e515e92 (patch)
tree9d0a9a9db10fd6b8dfc911b2ddef59b8c1729961 /gnu
parent0945e43bf71986f94b3ac2c77c9d434b28c2bb89 (diff)
downloadguix-a5eb5dd57162ee4fc662494b566d0a3c1e515e92.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-xyz.scm16
1 files 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