gnu: Move testing packages from python.scm to check.scm.
[jackhill/guix/guix.git] / gnu / packages / dav.scm
index 835b8fc..3513116 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix download)
   #:use-module (guix licenses)
   #:use-module (guix packages)
-  #:use-module (gnu packages python))
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-web))
 
 (define-public radicale
   (package
     (name "radicale")
-    (version "1.1.1")
+    (version "1.1.2")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "Radicale" version))
              (sha256
               (base32
-               "1c5lv8qca21mndkx350wxv34qypqh6gb4rhzms4anr642clq3jg2"))))
+               "1g20p3998f46ywda7swv0py63wjbrhvk0nrafajlbb6wgzxjmqpb"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (zero? (system* "py.test")))))))
-    (native-inputs
-     `(("python-pytest" ,python-pytest)))
+     '(#:tests? #f)) ; The tests are not distributed in the PyPi release.
     (propagated-inputs
       ;; TODO: Add python-pam
      `(("python-requests" ,python-requests)))
@@ -60,39 +57,32 @@ clients.")
 (define-public vdirsyncer
   (package
     (name "vdirsyncer")
-    (version "0.14.0")
+    (version "0.16.3")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri name version))
              (sha256
               (base32
-               "1mbh2gykx9sqsnyfa962ifxksx4afl2lb9rcsbd6rsh3gj2il898"))))
+               "0dpwbfi97ksijqng191659m8k0v215y8ld95w8gb126m4m96qpzw"))))
     (build-system python-build-system)
     (arguments
       `(#:phases (modify-phases %standard-phases
-         ;; vdirsyncer requires itself to be installed in order to build
-         ;; the manpage.
+         (replace 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
+             (setenv "DETERMINISTIC_TESTS" "true")
+             (setenv "DAV_SERVER" "radicale")
+             (setenv "REMOTESTORAGE_SERVER" "skip")
+             (zero? (system* "make" "test"))))
          (add-after 'install 'manpage
-           (lambda* (#:key outputs #:allow-other-keys)
-             (setenv "PYTHONPATH"
-                     (string-append
-                       (getenv "PYTHONPATH")
-                       ":" (assoc-ref outputs "out")))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
              (zero? (system* "make" "--directory=docs/" "man"))
              (install-file
                "docs/_build/man/vdirsyncer.1"
                (string-append
                  (assoc-ref outputs "out")
-                 "/share/man/man1"))))
-         ;; vdirsyncer requires itself to be installed in order to run the test
-         ;; suite.
-         (delete 'check)
-         (add-after 'install 'check-later
-           (lambda _
-             (setenv "DETERMINISTIC_TESTS" "true")
-             (setenv "DAV_SERVER" "radicale")
-             (setenv "REMOTESTORAGE_SERVER" "skip")
-             (zero? (system* "make" "test")))))))
+                 "/share/man/man1")))))))
     (native-inputs
      `(("python-setuptools-scm" ,python-setuptools-scm)
        ("python-sphinx" ,python-sphinx)
@@ -101,6 +91,7 @@ clients.")
        ("python-pytest" ,python-pytest)
        ("python-pytest-localserver" ,python-pytest-localserver)
        ("python-pytest-subtesthack" ,python-pytest-subtesthack)
+       ("python-urllib3" ,python-urllib3)
        ("python-wsgi-intercept" ,python-wsgi-intercept)
        ("radicale" ,radicale)))
     (propagated-inputs
@@ -116,4 +107,4 @@ synchronize a CalDAV or CardDAV server with a local folder or file.  The
 local data can then be accessed via a variety of programs, none of which
 have to know or worry about syncing to a server.")
     (home-page "https://github.com/untitaker/vdirsyncer")
-    (license expat)))
+    (license bsd-3)))