diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-06-07 10:49:43 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-06-07 10:53:16 +0200 |
commit | 12964df69a99de6190422c752fef65ef813f3b6b (patch) | |
tree | 46296558737a352bab36f52156ee6253c64d7a48 /gnu/packages/python-xyz.scm | |
parent | a8c653f0fc2f63d34b7a0dd84aaa6d9a3f009de5 (diff) | |
download | guix-12964df69a99de6190422c752fef65ef813f3b6b.tar.gz |
gnu: python-attrs: Conditionally execute tests.
* gnu/packages/python-xyz.scm (python-attrs)[arguments]: Wrap "check" phase in conditional expression.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 6a6d7f4b26..e3f5295452 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -16991,18 +16991,20 @@ and bit flag values.") (ice-9 ftw) (srfi srfi-1) (srfi srfi-26)) - #:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (let ((cwd (getcwd))) - (setenv "PYTHONPATH" - (string-append - cwd "/build/" - (find (cut string-prefix? "lib" <>) - (scandir (string-append cwd "/build"))) - ":" - (getenv "PYTHONPATH"))) - (invoke "python" "-m" "pytest"))))))) + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (let ((cwd (getcwd))) + (setenv "PYTHONPATH" + (string-append + cwd "/build/" + (find (cut string-prefix? "lib" <>) + (scandir (string-append cwd "/build"))) + ":" + (getenv "PYTHONPATH"))) + (invoke "python" "-m" "pytest")))))))) (native-inputs `(("python-coverage" ,python-coverage) ("python-hypothesis" ,python-hypothesis) |