lbraun pushed a commit to branch wip-python-pep517
in repository guix.
commit ea426a3ac5b5e36f5c5768f6b8c7e0a61d4883a2
Author: Lars-Dominik Braun <[email protected]>
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