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.
This commit is contained in:
Marius Bakke 2022-02-03 19:05:56 +01:00
parent 0945e43bf7
commit a5eb5dd571
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -12083,9 +12083,21 @@ (define-public python-libsass
(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