summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-10 13:51:14 +0100
committerChristopher Baines <mail@cbaines.net>2020-05-26 09:02:06 +0100
commitcf7381612c3bf2fd89fd03a53e85ed6eb9e9f9f8 (patch)
tree1cb24f60c5d1bf96669b481de98e54bf89bdadf0 /gnu
parent06fe35cf0c27545e8d995aaf35b7b11987f4ed67 (diff)
downloadguix-cf7381612c3bf2fd89fd03a53e85ed6eb9e9f9f8.tar.gz
gnu: python2-dogtail: Update to 0.9.11.
There are newer releases on a gitlab.com repository compared to PyPI. Make an
attempt at getting the tests to work, they don't yet I believe because DBus
isn't working properly. This update is a step towards getting a Python 3
variant of the package, which can be used to test virt-manager.

* gnu/packages/python-xyz.scm (python2-dogtail): Update to 0.9.11.
[source]: Switch from PyPI to gitlab.com, as gitlab.com contains newer
releases.
[arguments]: Replace the check phase, and update comment about disabling the
tests.
[propagated-inputs,native-inputs]: Add relevant packages.
[home-page]: Change to https://gitlab.com/dogtail/dogtail/
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-xyz.scm38
1 files changed, 31 insertions, 7 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index efd92beb9f..0cbb5e81e3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1753,18 +1753,42 @@ Python 3.3+.")
   ;; spaces in indentation" with Python 3.
   (package
     (name "python2-dogtail")
-    (version "0.9.9")
+    (version "0.9.11")
     (source (origin
              (method url-fetch)
-             (uri (pypi-uri "dogtail" version))
+             (uri
+              (string-append
+               "https://gitlab.com/dogtail/dogtail/-/raw/released/"
+               "dogtail-" version ".tar.gz"))
              (sha256
               (base32
-               "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
+               "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
     (build-system python-build-system)
-    (arguments `(#:python ,python-2
-                 #:tests? #f))                    ; invalid command "test"
-    ;; Currently no offical homepage.
-    (home-page "https://pypi.org/project/dogtail/")
+    (arguments
+     `(#:python ,python-2
+       #:tests? #f                      ; TODO Launching dbus for the tests
+                                        ; fails
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (system "Xvfb :1 &")
+               (setenv "DISPLAY" ":1")
+               (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
+             #t)))))
+    (propagated-inputs
+     `(("python-pygobject" ,python2-pygobject)
+       ("python-pycairo" ,python2-pycairo)
+       ("python-pyatspi" ,python2-pyatspi)))
+    (native-inputs
+     `(("python-nose" ,python2-nose)
+       ("gtk+" ,gtk+)
+       ("xvfb" ,xorg-server)
+       ("dbus" ,dbus)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("gobject-introspection" ,gobject-introspection)))
+    (home-page "https://gitlab.com/dogtail/dogtail/")
     (synopsis "GUI test tool and automation framework written in Python")
     (description
      "Dogtail is a GUI test tool and automation framework written in Python.