mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-attrs: Conditionally execute tests.
* gnu/packages/python-xyz.scm (python-attrs)[arguments]: Wrap "check" phase in conditional expression.
This commit is contained in:
parent
a8c653f0fc
commit
12964df69a
1 changed files with 14 additions and 12 deletions
|
@ -16991,18 +16991,20 @@ and bit flag values.")
|
||||||
(ice-9 ftw)
|
(ice-9 ftw)
|
||||||
(srfi srfi-1)
|
(srfi srfi-1)
|
||||||
(srfi srfi-26))
|
(srfi srfi-26))
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases
|
||||||
(replace 'check
|
(modify-phases %standard-phases
|
||||||
(lambda _
|
(replace 'check
|
||||||
(let ((cwd (getcwd)))
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(setenv "PYTHONPATH"
|
(when tests?
|
||||||
(string-append
|
(let ((cwd (getcwd)))
|
||||||
cwd "/build/"
|
(setenv "PYTHONPATH"
|
||||||
(find (cut string-prefix? "lib" <>)
|
(string-append
|
||||||
(scandir (string-append cwd "/build")))
|
cwd "/build/"
|
||||||
":"
|
(find (cut string-prefix? "lib" <>)
|
||||||
(getenv "PYTHONPATH")))
|
(scandir (string-append cwd "/build")))
|
||||||
(invoke "python" "-m" "pytest")))))))
|
":"
|
||||||
|
(getenv "PYTHONPATH")))
|
||||||
|
(invoke "python" "-m" "pytest"))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("python-coverage" ,python-coverage)
|
`(("python-coverage" ,python-coverage)
|
||||||
("python-hypothesis" ,python-hypothesis)
|
("python-hypothesis" ,python-hypothesis)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue