tests: Fix running python condition.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 15 Mar 2017 07:45:18 +0000 (16:45 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 15 Mar 2017 07:45:18 +0000 (16:45 +0900)
* tests/gpgme/gpgme-defs.scm (run-python-tests?): We need Python.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
tests/gpgme/gpgme-defs.scm

index 2b104f2..0583774 100644 (file)
 (define python (catch #f
                      (path-expand "python" (string-split (getenv "PATH") *pathsep*))))
 (define (run-python-tests?)
-  (let* ((python-version
-         (string-trim char-whitespace?
-                      (call-popen `(,python -c "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))") "")))
-        (build-path (path-join gpgme-builddir "lang" "python"
-                               (string-append "python" python-version "-gpg"))))
-    (trace (file-exists? (trace build-path)))))
+  (and python
+       (let* ((python-version
+              (string-trim char-whitespace?
+                           (call-popen `(,python -c "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))") "")))
+             (build-path (path-join gpgme-builddir "lang" "python"
+                                    (string-append "python" python-version "-gpg"))))
+        (trace (file-exists? (trace build-path))))))