gnu: python-pillow: Make check phase conditional.
authorEfraim Flashner <efraim@flashner.co.il>
Mon, 2 Dec 2019 09:02:47 +0000 (11:02 +0200)
committerEfraim Flashner <efraim@flashner.co.il>
Mon, 2 Dec 2019 13:12:49 +0000 (15:12 +0200)
* gnu/packages/python-xyz.scm (python-pillow)[arguments]: Wrap custom
'check phase in check for 'tests?'.

gnu/packages/python-xyz.scm

index 59f7128..c628c98 100644 (file)
@@ -4706,13 +4706,15 @@ the OleFileIO module from PIL, the Python Image Library.")
              (substitute* "setup.py"
                (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
          (replace 'check
-           (lambda* (#:key outputs inputs #:allow-other-keys)
-             (begin
-               (setenv "HOME" (getcwd))
-               ;; Make installed package available for running the tests.
-               (add-installed-pythonpath inputs outputs)
-               (invoke "python" "selftest.py" "--installed")
-               (invoke "python" "-m" "pytest" "-vv")))))))
+           (lambda* (#:key outputs inputs tests? #:allow-other-keys)
+             (if tests?
+               (begin
+                 (setenv "HOME" (getcwd))
+                 ;; Make installed package available for running the tests.
+                 (add-installed-pythonpath inputs outputs)
+                 (invoke "python" "selftest.py" "--installed")
+                 (invoke "python" "-m" "pytest" "-vv"))
+               #t))))))
     (home-page "https://python-pillow.org")
     (synopsis "Fork of the Python Imaging Library")
     (description