From a5eb5dd57162ee4fc662494b566d0a3c1e515e92 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 3 Feb 2022 19:05:56 +0100 Subject: 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 -- cgit v1.2.3