all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#40543] [PATCH 0/4] Work towards enabling virt-manager tests
@ 2020-04-10 16:09 Christopher Baines
  2020-04-10 16:21 ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Christopher Baines
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-10 16:09 UTC (permalink / raw)
  To: 40543

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]


Christopher Baines (4):
  gnu: Add python2-pyatspi.
  gnu: python2-dogtail: Update to 0.9.11.
  gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
  gnu: virt-manager: Work towards enabling some tests.

 gnu/packages/gnome.scm          |  8 ++++++
 gnu/packages/python-xyz.scm     | 46 +++++++++++++++++++++++++--------
 gnu/packages/virtualization.scm | 22 +++++++++++++---
 3 files changed, 62 insertions(+), 14 deletions(-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi.
  2020-04-10 16:09 [bug#40543] [PATCH 0/4] Work towards enabling virt-manager tests Christopher Baines
@ 2020-04-10 16:21 ` Christopher Baines
  2020-04-10 16:21   ` [bug#40543] [PATCH 2/4] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
                     ` (3 more replies)
  2020-04-15 17:49 ` [bug#40543] [PATCH v2 1/5] " Christopher Baines
  2020-05-26  8:03 ` bug#40543: [PATCH 0/4] Work towards enabling virt-manager tests Christopher Baines
  2 siblings, 4 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-10 16:21 UTC (permalink / raw)
  To: 40543

This will enable updating python2-dogtail to 0.9.11.

* gnu/packages/gnome.scm (python2-pyatspi): New variable.
---
 gnu/packages/gnome.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 088de7dd4c..b28fe6594b 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8773,6 +8773,14 @@ accessibility infrastructure.")
     (license license:lgpl2.0)
     (properties '((upstream-name . "pyatspi")))))
 
+(define-public python2-pyatspi
+  (package
+    (inherit python-pyatspi)
+    (name "python2-pyatspi")
+    (inputs
+     `(("python" ,python-2)
+       ("python-pygobject" ,python2-pygobject)))))
+
 (define-public orca
   (package
     (name "orca")
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH 2/4] gnu: python2-dogtail: Update to 0.9.11.
  2020-04-10 16:21 ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Christopher Baines
@ 2020-04-10 16:21   ` Christopher Baines
  2020-04-10 16:21   ` [bug#40543] [PATCH 3/4] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-10 16:21 UTC (permalink / raw)
  To: 40543

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/
---
 gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 64aa7da41e..455bebf1b7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1740,18 +1740,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.
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH 3/4] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
  2020-04-10 16:21 ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Christopher Baines
  2020-04-10 16:21   ` [bug#40543] [PATCH 2/4] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
@ 2020-04-10 16:21   ` Christopher Baines
  2020-04-10 16:21   ` [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests Christopher Baines
  2020-04-10 16:41   ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Marius Bakke
  3 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-10 16:21 UTC (permalink / raw)
  To: 40543

* gnu/packages/python-xyz.scm (python2-dogtail): Rename to python-dogtail.
[name]: Change python2-dogtail to python-dogtail.
[arguments]: Remove #:python.
[propagated-inputs,native-inputs]: Switch Python 2 packages to Python 3
variants.
(python2-dogtail): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 455bebf1b7..dac43eeea8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1735,11 +1735,9 @@ Python 3.3+.")
                (delete-file "test/test_Script.py")
                #t))))))))
 
-(define-public python2-dogtail
-  ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
-  ;; spaces in indentation" with Python 3.
+(define-public python-dogtail
   (package
-    (name "python2-dogtail")
+    (name "python-dogtail")
     (version "0.9.11")
     (source (origin
              (method url-fetch)
@@ -1752,8 +1750,7 @@ Python 3.3+.")
                "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2
-       #:tests? #f                      ; TODO Launching dbus for the tests
+     `(#:tests? #f                      ; TODO Launching dbus for the tests
                                         ; fails
        #:phases
        (modify-phases %standard-phases
@@ -1765,11 +1762,11 @@ Python 3.3+.")
                (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
              #t)))))
     (propagated-inputs
-     `(("python-pygobject" ,python2-pygobject)
-       ("python-pycairo" ,python2-pycairo)
-       ("python-pyatspi" ,python2-pyatspi)))
+     `(("python-pygobject" ,python-pygobject)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pyatspi" ,python-pyatspi)))
     (native-inputs
-     `(("python-nose" ,python2-nose)
+     `(("python-nose" ,python-nose)
        ("gtk+" ,gtk+)
        ("xvfb" ,xorg-server)
        ("dbus" ,dbus)
@@ -1784,6 +1781,9 @@ applications. dogtail scripts are written in Python and executed like any
 other Python program.")
     (license license:gpl2+)))
 
+(define-public python2-dogtail
+  (package-with-python2 python-dogtail))
+
 (define-public python-empy
   (package
     (name "python-empy")
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests.
  2020-04-10 16:21 ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Christopher Baines
  2020-04-10 16:21   ` [bug#40543] [PATCH 2/4] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
  2020-04-10 16:21   ` [bug#40543] [PATCH 3/4] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
@ 2020-04-10 16:21   ` Christopher Baines
  2020-04-10 16:54     ` Marius Bakke
  2020-04-10 16:41   ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Marius Bakke
  3 siblings, 1 reply; 24+ messages in thread
From: Christopher Baines @ 2020-04-10 16:21 UTC (permalink / raw)
  To: 40543

* gnu/packages/virtualization.scm (virt-manager)[arguments]: Set #:test-target
to "test_ui", replace the 'check phase.
[native-inputs]: Add some inputs required for running tests.
---
 gnu/packages/virtualization.scm | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 5bee79cbb4..292c4d41f4 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -596,9 +596,10 @@ virtualization library.")
     (build-system python-build-system)
     (arguments
      `(#:use-setuptools? #f          ; uses custom distutils 'install' command
-       ;; Some of the tests seem to require network access to install virtual
-       ;; machines.
-       #:tests? #f
+       #:test-target "test_ui"
+       #:tests? #f                      ; TODO The tests currently fail
+                                        ; RuntimeError: Loop condition wasn't
+                                        ; met
        #:imported-modules ((guix build glib-or-gtk-build-system)
                            ,@%python-build-system-modules)
        #:modules ((ice-9 match)
@@ -645,6 +646,16 @@ virtualization library.")
                                ,(filter identity paths))))
                          bin-files))
              #t))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (setenv "HOME" "/tmp")
+               (system "Xvfb :1 &")
+               (setenv "DISPLAY" ":1")
+               ;; Dogtail requires that Assistive Technology support be enabled
+               (setenv "GTK_MODULES" "gail:atk-bridge")
+               (invoke "dbus-run-session" "--" "python" "setup.py" "test_ui"))
+             #t))
          (add-after 'install 'glib-or-gtk-compile-schemas
            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
          (add-after 'install 'glib-or-gtk-wrap
@@ -673,6 +684,11 @@ virtualization library.")
        ("gobject-introspection" ,gobject-introspection)
        ("gtk+" ,gtk+ "bin")             ; gtk-update-icon-cache
        ("perl" ,perl)                   ; pod2man
+       ("python-dogtail" ,python-dogtail)
+       ("xvfb" ,xorg-server)
+       ("dbus" ,dbus)
+       ("at-spi2-core" ,at-spi2-core)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("intltool" ,intltool)))
     (home-page "https://virt-manager.org/")
     (synopsis "Manage virtual machines")
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi.
  2020-04-10 16:21 ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Christopher Baines
                     ` (2 preceding siblings ...)
  2020-04-10 16:21   ` [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests Christopher Baines
@ 2020-04-10 16:41   ` Marius Bakke
  2020-04-15 17:58     ` Christopher Baines
  3 siblings, 1 reply; 24+ messages in thread
From: Marius Bakke @ 2020-04-10 16:41 UTC (permalink / raw)
  To: Christopher Baines, 40543

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

Christopher Baines <mail@cbaines.net> writes:

> This will enable updating python2-dogtail to 0.9.11.
>
> * gnu/packages/gnome.scm (python2-pyatspi): New variable.
> ---
>  gnu/packages/gnome.scm | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 088de7dd4c..b28fe6594b 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -8773,6 +8773,14 @@ accessibility infrastructure.")
>      (license license:lgpl2.0)
>      (properties '((upstream-name . "pyatspi")))))
>  
> +(define-public python2-pyatspi
> +  (package
> +    (inherit python-pyatspi)
> +    (name "python2-pyatspi")
> +    (inputs
> +     `(("python" ,python-2)
> +       ("python-pygobject" ,python2-pygobject)))))

Should the latter not be propagated?  I think the #:python argument of
python-build-system will still refer to python3 in this case.

It's better to use (package-with-python2 ...), see e.g. commit
1ffd618eba4836da5e5eaf6edd394ee949512bd8 for an example.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests.
  2020-04-10 16:21   ` [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests Christopher Baines
@ 2020-04-10 16:54     ` Marius Bakke
  2020-04-15 17:57       ` Christopher Baines
  0 siblings, 1 reply; 24+ messages in thread
From: Marius Bakke @ 2020-04-10 16:54 UTC (permalink / raw)
  To: Christopher Baines, 40543

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

Christopher Baines <mail@cbaines.net> writes:

> * gnu/packages/virtualization.scm (virt-manager)[arguments]: Set #:test-target
> to "test_ui", replace the 'check phase.
> [native-inputs]: Add some inputs required for running tests.

[...]

> @@ -673,6 +684,11 @@ virtualization library.")
>         ("gobject-introspection" ,gobject-introspection)
>         ("gtk+" ,gtk+ "bin")             ; gtk-update-icon-cache
>         ("perl" ,perl)                   ; pod2man
> +       ("python-dogtail" ,python-dogtail)
> +       ("xvfb" ,xorg-server)
> +       ("dbus" ,dbus)
> +       ("at-spi2-core" ,at-spi2-core)
> +       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)

Please leave a comment along the lines of

;; The following are required for running the tests.

...to leave a clue for the next packager who wonders whether these
inputs are misplaced.

Apart from these comments, the series LGTM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 1/5] gnu: Add python2-pyatspi.
  2020-04-10 16:09 [bug#40543] [PATCH 0/4] Work towards enabling virt-manager tests Christopher Baines
  2020-04-10 16:21 ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Christopher Baines
@ 2020-04-15 17:49 ` Christopher Baines
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
                     ` (4 more replies)
  2020-05-26  8:03 ` bug#40543: [PATCH 0/4] Work towards enabling virt-manager tests Christopher Baines
  2 siblings, 5 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-15 17:49 UTC (permalink / raw)
  To: 40543

This will enable updating python2-dogtail to 0.9.11.

* gnu/packages/gnome.scm (python2-pyatspi): New variable.
---
 gnu/packages/gnome.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 33aae4545e..4710bd1349 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8774,6 +8774,14 @@ accessibility infrastructure.")
     (license license:lgpl2.0)
     (properties '((upstream-name . "pyatspi")))))
 
+(define-public python2-pyatspi
+  (package
+    (inherit python-pyatspi)
+    (name "python2-pyatspi")
+    (inputs
+     `(("python" ,python-2)
+       ("python-pygobject" ,python2-pygobject)))))
+
 (define-public orca
   (package
     (name "orca")
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject.
  2020-04-15 17:49 ` [bug#40543] [PATCH v2 1/5] " Christopher Baines
@ 2020-04-15 17:49   ` Christopher Baines
  2020-04-15 18:37     ` Marius Bakke
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 3/5] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 24+ messages in thread
From: Christopher Baines @ 2020-04-15 17:49 UTC (permalink / raw)
  To: 40543

As python-pygobject is required at runtime.

* gnu/packages/gnome.scm (python-pygobject)[inputs]: Move python-pygobject to…
[propagated-inputs]: …here.
(python2-pygobject)[inputs]: Move python2-pygobject to…
[propagated-inputs]: …here.
---
 gnu/packages/gnome.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4710bd1349..e7b36fff1d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8763,8 +8763,9 @@ from gi.repository import Atspi"))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("python" ,python)
-       ("python-pygobject" ,python-pygobject)))
+     `(("python" ,python)))
+    (propagated-inputs
+     `(("python-pygobject" ,python-pygobject)))
     (synopsis "Python client bindings for D-Bus AT-SPI")
     (home-page "https://wiki.linuxfoundation.org/accessibility\
 /atk/at-spi/at-spi_on_d-bus")
@@ -8779,8 +8780,9 @@ accessibility infrastructure.")
     (inherit python-pyatspi)
     (name "python2-pyatspi")
     (inputs
-     `(("python" ,python-2)
-       ("python-pygobject" ,python2-pygobject)))))
+     `(("python" ,python-2)))
+    (propagated-inputs
+     `(("python-pygobject" ,python2-pygobject)))))
 
 (define-public orca
   (package
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 3/5] gnu: python2-dogtail: Update to 0.9.11.
  2020-04-15 17:49 ` [bug#40543] [PATCH v2 1/5] " Christopher Baines
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
@ 2020-04-15 17:49   ` Christopher Baines
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-15 17:49 UTC (permalink / raw)
  To: 40543

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/
---
 gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 20b8784c05..3dccedd6df 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1741,18 +1741,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.
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
  2020-04-15 17:49 ` [bug#40543] [PATCH v2 1/5] " Christopher Baines
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 3/5] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
@ 2020-04-15 17:49   ` Christopher Baines
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests Christopher Baines
  2020-04-16  8:28   ` [bug#40543] [PATCH v3 1/5] gnu: Add python2-pyatspi Christopher Baines
  4 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-15 17:49 UTC (permalink / raw)
  To: 40543

* gnu/packages/python-xyz.scm (python2-dogtail): Rename to python-dogtail.
[name]: Change python2-dogtail to python-dogtail.
[arguments]: Remove #:python.
[propagated-inputs,native-inputs]: Switch Python 2 packages to Python 3
variants.
(python2-dogtail): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3dccedd6df..768f030051 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1736,11 +1736,9 @@ Python 3.3+.")
                (delete-file "test/test_Script.py")
                #t))))))))
 
-(define-public python2-dogtail
-  ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
-  ;; spaces in indentation" with Python 3.
+(define-public python-dogtail
   (package
-    (name "python2-dogtail")
+    (name "python-dogtail")
     (version "0.9.11")
     (source (origin
              (method url-fetch)
@@ -1753,8 +1751,7 @@ Python 3.3+.")
                "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2
-       #:tests? #f                      ; TODO Launching dbus for the tests
+     `(#:tests? #f                      ; TODO Launching dbus for the tests
                                         ; fails
        #:phases
        (modify-phases %standard-phases
@@ -1766,11 +1763,11 @@ Python 3.3+.")
                (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
              #t)))))
     (propagated-inputs
-     `(("python-pygobject" ,python2-pygobject)
-       ("python-pycairo" ,python2-pycairo)
-       ("python-pyatspi" ,python2-pyatspi)))
+     `(("python-pygobject" ,python-pygobject)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pyatspi" ,python-pyatspi)))
     (native-inputs
-     `(("python-nose" ,python2-nose)
+     `(("python-nose" ,python-nose)
        ("gtk+" ,gtk+)
        ("xvfb" ,xorg-server)
        ("dbus" ,dbus)
@@ -1785,6 +1782,9 @@ applications. dogtail scripts are written in Python and executed like any
 other Python program.")
     (license license:gpl2+)))
 
+(define-public python2-dogtail
+  (package-with-python2 python-dogtail))
+
 (define-public python-empy
   (package
     (name "python-empy")
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests.
  2020-04-15 17:49 ` [bug#40543] [PATCH v2 1/5] " Christopher Baines
                     ` (2 preceding siblings ...)
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
@ 2020-04-15 17:49   ` Christopher Baines
  2020-04-15 18:46     ` Marius Bakke
  2020-04-16  8:28   ` [bug#40543] [PATCH v3 1/5] gnu: Add python2-pyatspi Christopher Baines
  4 siblings, 1 reply; 24+ messages in thread
From: Christopher Baines @ 2020-04-15 17:49 UTC (permalink / raw)
  To: 40543

* gnu/packages/virtualization.scm (virt-manager)[arguments]: Set #:test-target
to "test_ui", replace the 'check phase.
[native-inputs]: Add some inputs required for running tests.
---
 gnu/packages/virtualization.scm | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index be17ec15f0..c8840f345a 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -602,9 +602,10 @@ virtualization library.")
     (build-system python-build-system)
     (arguments
      `(#:use-setuptools? #f          ; uses custom distutils 'install' command
-       ;; Some of the tests seem to require network access to install virtual
-       ;; machines.
-       #:tests? #f
+       #:test-target "test_ui"
+       #:tests? #f                      ; TODO The tests currently fail
+                                        ; RuntimeError: Loop condition wasn't
+                                        ; met
        #:imported-modules ((guix build glib-or-gtk-build-system)
                            ,@%python-build-system-modules)
        #:modules ((ice-9 match)
@@ -651,6 +652,16 @@ virtualization library.")
                                ,(filter identity paths))))
                          bin-files))
              #t))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (setenv "HOME" "/tmp")
+               (system "Xvfb :1 &")
+               (setenv "DISPLAY" ":1")
+               ;; Dogtail requires that Assistive Technology support be enabled
+               (setenv "GTK_MODULES" "gail:atk-bridge")
+               (invoke "dbus-run-session" "--" "python" "setup.py" "test_ui"))
+             #t))
          (add-after 'install 'glib-or-gtk-compile-schemas
            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
          (add-after 'install 'glib-or-gtk-wrap
@@ -679,7 +690,13 @@ virtualization library.")
        ("gobject-introspection" ,gobject-introspection)
        ("gtk+" ,gtk+ "bin")             ; gtk-update-icon-cache
        ("perl" ,perl)                   ; pod2man
-       ("intltool" ,intltool)))
+       ("intltool" ,intltool)
+       ;; The following are required for running the tests
+       ("python-dogtail" ,python-dogtail)
+       ("xvfb" ,xorg-server)
+       ("dbus" ,dbus)
+       ("at-spi2-core" ,at-spi2-core)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
     (home-page "https://virt-manager.org/")
     (synopsis "Manage virtual machines")
     (description
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests.
  2020-04-10 16:54     ` Marius Bakke
@ 2020-04-15 17:57       ` Christopher Baines
  0 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-15 17:57 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 40543

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]


Marius Bakke <mbakke@fastmail.com> writes:

> Christopher Baines <mail@cbaines.net> writes:
>
>> * gnu/packages/virtualization.scm (virt-manager)[arguments]: Set #:test-target
>> to "test_ui", replace the 'check phase.
>> [native-inputs]: Add some inputs required for running tests.
>
> [...]
>
>> @@ -673,6 +684,11 @@ virtualization library.")
>>         ("gobject-introspection" ,gobject-introspection)
>>         ("gtk+" ,gtk+ "bin")             ; gtk-update-icon-cache
>>         ("perl" ,perl)                   ; pod2man
>> +       ("python-dogtail" ,python-dogtail)
>> +       ("xvfb" ,xorg-server)
>> +       ("dbus" ,dbus)
>> +       ("at-spi2-core" ,at-spi2-core)
>> +       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
>
> Please leave a comment along the lines of
>
> ;; The following are required for running the tests.
>
> ...to leave a clue for the next packager who wonders whether these
> inputs are misplaced.
>
> Apart from these comments, the series LGTM.

Sure, I've sent some new patches now with this change.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi.
  2020-04-10 16:41   ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Marius Bakke
@ 2020-04-15 17:58     ` Christopher Baines
  0 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-15 17:58 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 40543

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]


Marius Bakke <mbakke@fastmail.com> writes:

> Christopher Baines <mail@cbaines.net> writes:
>
>> This will enable updating python2-dogtail to 0.9.11.
>>
>> * gnu/packages/gnome.scm (python2-pyatspi): New variable.
>> ---
>>  gnu/packages/gnome.scm | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
>> index 088de7dd4c..b28fe6594b 100644
>> --- a/gnu/packages/gnome.scm
>> +++ b/gnu/packages/gnome.scm
>> @@ -8773,6 +8773,14 @@ accessibility infrastructure.")
>>      (license license:lgpl2.0)
>>      (properties '((upstream-name . "pyatspi")))))
>>
>> +(define-public python2-pyatspi
>> +  (package
>> +    (inherit python-pyatspi)
>> +    (name "python2-pyatspi")
>> +    (inputs
>> +     `(("python" ,python-2)
>> +       ("python-pygobject" ,python2-pygobject)))))
>
> Should the latter not be propagated?

Yeah, I've added another commit which makes this propagated.

> I think the #:python argument of python-build-system will still refer
> to python3 in this case.

It would, however python-pyatspi is using the gnu-build-system. I think
this is why I ended up doing it this way.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject.
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
@ 2020-04-15 18:37     ` Marius Bakke
  2020-04-16  8:28       ` Christopher Baines
  0 siblings, 1 reply; 24+ messages in thread
From: Marius Bakke @ 2020-04-15 18:37 UTC (permalink / raw)
  To: Christopher Baines, 40543

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

Christopher Baines <mail@cbaines.net> writes:

> As python-pygobject is required at runtime.
>
> * gnu/packages/gnome.scm (python-pygobject)[inputs]: Move python-pygobject to…
                                   ^^^
Typo: I think this should be 'python-pyatspi'.

> [propagated-inputs]: …here.
> (python2-pygobject)[inputs]: Move python2-pygobject to…
            ^^^ likewise
> [propagated-inputs]: …here.
> ---
>  gnu/packages/gnome.scm | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests.
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests Christopher Baines
@ 2020-04-15 18:46     ` Marius Bakke
  2020-04-16  8:27       ` Christopher Baines
  0 siblings, 1 reply; 24+ messages in thread
From: Marius Bakke @ 2020-04-15 18:46 UTC (permalink / raw)
  To: Christopher Baines, 40543

[-- Attachment #1: Type: text/plain, Size: 2863 bytes --]

Christopher Baines <mail@cbaines.net> writes:

> * gnu/packages/virtualization.scm (virt-manager)[arguments]: Set #:test-target
> to "test_ui", replace the 'check phase.
> [native-inputs]: Add some inputs required for running tests.
> ---
>  gnu/packages/virtualization.scm | 25 +++++++++++++++++++++----
>  1 file changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
> index be17ec15f0..c8840f345a 100644
> --- a/gnu/packages/virtualization.scm
> +++ b/gnu/packages/virtualization.scm
> @@ -602,9 +602,10 @@ virtualization library.")
>      (build-system python-build-system)
>      (arguments
>       `(#:use-setuptools? #f          ; uses custom distutils 'install' command
> -       ;; Some of the tests seem to require network access to install virtual
> -       ;; machines.
> -       #:tests? #f
> +       #:test-target "test_ui"
> +       #:tests? #f                      ; TODO The tests currently fail
> +                                        ; RuntimeError: Loop condition wasn't
> +                                        ; met
>         #:imported-modules ((guix build glib-or-gtk-build-system)
>                             ,@%python-build-system-modules)
>         #:modules ((ice-9 match)
> @@ -651,6 +652,16 @@ virtualization library.")
>                                 ,(filter identity paths))))
>                           bin-files))
>               #t))
> +         (replace 'check
> +           (lambda* (#:key tests? #:allow-other-keys)
> +             (when tests?
> +               (setenv "HOME" "/tmp")
> +               (system "Xvfb :1 &")
> +               (setenv "DISPLAY" ":1")
> +               ;; Dogtail requires that Assistive Technology support be enabled
> +               (setenv "GTK_MODULES" "gail:atk-bridge")
> +               (invoke "dbus-run-session" "--" "python" "setup.py" "test_ui"))
> +             #t))
>           (add-after 'install 'glib-or-gtk-compile-schemas
>             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
>           (add-after 'install 'glib-or-gtk-wrap
> @@ -679,7 +690,13 @@ virtualization library.")
>         ("gobject-introspection" ,gobject-introspection)
>         ("gtk+" ,gtk+ "bin")             ; gtk-update-icon-cache
>         ("perl" ,perl)                   ; pod2man
> -       ("intltool" ,intltool)))
> +       ("intltool" ,intltool)
> +       ;; The following are required for running the tests
> +       ("python-dogtail" ,python-dogtail)
> +       ("xvfb" ,xorg-server)
> +       ("dbus" ,dbus)
> +       ("at-spi2-core" ,at-spi2-core)
> +       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))

Perhaps we should comment these inputs for now so that they won't
needlessly rebuild this package?

Also, this should use 'xorg-server-for-tests'.

Otherwise LGTM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests.
  2020-04-15 18:46     ` Marius Bakke
@ 2020-04-16  8:27       ` Christopher Baines
  0 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-16  8:27 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 40543

[-- Attachment #1: Type: text/plain, Size: 3240 bytes --]


Marius Bakke <mbakke@fastmail.com> writes:

> Christopher Baines <mail@cbaines.net> writes:
>
>> * gnu/packages/virtualization.scm (virt-manager)[arguments]: Set #:test-target
>> to "test_ui", replace the 'check phase.
>> [native-inputs]: Add some inputs required for running tests.
>> ---
>>  gnu/packages/virtualization.scm | 25 +++++++++++++++++++++----
>>  1 file changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
>> index be17ec15f0..c8840f345a 100644
>> --- a/gnu/packages/virtualization.scm
>> +++ b/gnu/packages/virtualization.scm
>> @@ -602,9 +602,10 @@ virtualization library.")
>>      (build-system python-build-system)
>>      (arguments
>>       `(#:use-setuptools? #f          ; uses custom distutils 'install' command
>> -       ;; Some of the tests seem to require network access to install virtual
>> -       ;; machines.
>> -       #:tests? #f
>> +       #:test-target "test_ui"
>> +       #:tests? #f                      ; TODO The tests currently fail
>> +                                        ; RuntimeError: Loop condition wasn't
>> +                                        ; met
>>         #:imported-modules ((guix build glib-or-gtk-build-system)
>>                             ,@%python-build-system-modules)
>>         #:modules ((ice-9 match)
>> @@ -651,6 +652,16 @@ virtualization library.")
>>                                 ,(filter identity paths))))
>>                           bin-files))
>>               #t))
>> +         (replace 'check
>> +           (lambda* (#:key tests? #:allow-other-keys)
>> +             (when tests?
>> +               (setenv "HOME" "/tmp")
>> +               (system "Xvfb :1 &")
>> +               (setenv "DISPLAY" ":1")
>> +               ;; Dogtail requires that Assistive Technology support be enabled
>> +               (setenv "GTK_MODULES" "gail:atk-bridge")
>> +               (invoke "dbus-run-session" "--" "python" "setup.py" "test_ui"))
>> +             #t))
>>           (add-after 'install 'glib-or-gtk-compile-schemas
>>             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
>>           (add-after 'install 'glib-or-gtk-wrap
>> @@ -679,7 +690,13 @@ virtualization library.")
>>         ("gobject-introspection" ,gobject-introspection)
>>         ("gtk+" ,gtk+ "bin")             ; gtk-update-icon-cache
>>         ("perl" ,perl)                   ; pod2man
>> -       ("intltool" ,intltool)))
>> +       ("intltool" ,intltool)
>> +       ;; The following are required for running the tests
>> +       ("python-dogtail" ,python-dogtail)
>> +       ("xvfb" ,xorg-server)
>> +       ("dbus" ,dbus)
>> +       ("at-spi2-core" ,at-spi2-core)
>> +       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
>
> Perhaps we should comment these inputs for now so that they won't
> needlessly rebuild this package?

Sure, I'll comment them out.

> Also, this should use 'xorg-server-for-tests'.

I did see xorg-server-for-tests, but the comment said "This package is
intended to be used when building GTK". I guess the same reasoning
applies though, and it is used for packages other than GTK.

I'll make these changes and send some updated patches.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject.
  2020-04-15 18:37     ` Marius Bakke
@ 2020-04-16  8:28       ` Christopher Baines
  0 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-16  8:28 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 40543

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]


Marius Bakke <mbakke@fastmail.com> writes:

> Christopher Baines <mail@cbaines.net> writes:
>
>> As python-pygobject is required at runtime.
>>
>> * gnu/packages/gnome.scm (python-pygobject)[inputs]: Move python-pygobject to…
>                                    ^^^
> Typo: I think this should be 'python-pyatspi'.
>
>> [propagated-inputs]: …here.
>> (python2-pygobject)[inputs]: Move python2-pygobject to…
>             ^^^ likewise
>> [propagated-inputs]: …here.
>> ---
>>  gnu/packages/gnome.scm | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)

Good spot, I've fixed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v3 1/5] gnu: Add python2-pyatspi.
  2020-04-15 17:49 ` [bug#40543] [PATCH v2 1/5] " Christopher Baines
                     ` (3 preceding siblings ...)
  2020-04-15 17:49   ` [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests Christopher Baines
@ 2020-04-16  8:28   ` Christopher Baines
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
                       ` (3 more replies)
  4 siblings, 4 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-16  8:28 UTC (permalink / raw)
  To: 40543

This will enable updating python2-dogtail to 0.9.11.

* gnu/packages/gnome.scm (python2-pyatspi): New variable.
---
 gnu/packages/gnome.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 33aae4545e..4710bd1349 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8774,6 +8774,14 @@ accessibility infrastructure.")
     (license license:lgpl2.0)
     (properties '((upstream-name . "pyatspi")))))
 
+(define-public python2-pyatspi
+  (package
+    (inherit python-pyatspi)
+    (name "python2-pyatspi")
+    (inputs
+     `(("python" ,python-2)
+       ("python-pygobject" ,python2-pygobject)))))
+
 (define-public orca
   (package
     (name "orca")
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v3 2/5] gnu: python-pyatspi: Propagate python-pygobject.
  2020-04-16  8:28   ` [bug#40543] [PATCH v3 1/5] gnu: Add python2-pyatspi Christopher Baines
@ 2020-04-16  8:28     ` Christopher Baines
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 3/5] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-16  8:28 UTC (permalink / raw)
  To: 40543

As python-pygobject is required at runtime.

* gnu/packages/gnome.scm (python-pyatspi)[inputs]: Move python-pygobject to…
[propagated-inputs]: …here.
(python2-pyatspi)[inputs]: Move python2-pygobject to…
[propagated-inputs]: …here.
---
 gnu/packages/gnome.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4710bd1349..e7b36fff1d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8763,8 +8763,9 @@ from gi.repository import Atspi"))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("python" ,python)
-       ("python-pygobject" ,python-pygobject)))
+     `(("python" ,python)))
+    (propagated-inputs
+     `(("python-pygobject" ,python-pygobject)))
     (synopsis "Python client bindings for D-Bus AT-SPI")
     (home-page "https://wiki.linuxfoundation.org/accessibility\
 /atk/at-spi/at-spi_on_d-bus")
@@ -8779,8 +8780,9 @@ accessibility infrastructure.")
     (inherit python-pyatspi)
     (name "python2-pyatspi")
     (inputs
-     `(("python" ,python-2)
-       ("python-pygobject" ,python2-pygobject)))))
+     `(("python" ,python-2)))
+    (propagated-inputs
+     `(("python-pygobject" ,python2-pygobject)))))
 
 (define-public orca
   (package
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v3 3/5] gnu: python2-dogtail: Update to 0.9.11.
  2020-04-16  8:28   ` [bug#40543] [PATCH v3 1/5] gnu: Add python2-pyatspi Christopher Baines
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
@ 2020-04-16  8:28     ` Christopher Baines
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 5/5] gnu: virt-manager: Work towards enabling some tests Christopher Baines
  3 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-16  8:28 UTC (permalink / raw)
  To: 40543

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/
---
 gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 20b8784c05..3dccedd6df 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1741,18 +1741,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.
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v3 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
  2020-04-16  8:28   ` [bug#40543] [PATCH v3 1/5] gnu: Add python2-pyatspi Christopher Baines
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 3/5] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
@ 2020-04-16  8:28     ` Christopher Baines
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 5/5] gnu: virt-manager: Work towards enabling some tests Christopher Baines
  3 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-16  8:28 UTC (permalink / raw)
  To: 40543

* gnu/packages/python-xyz.scm (python2-dogtail): Rename to python-dogtail.
[name]: Change python2-dogtail to python-dogtail.
[arguments]: Remove #:python.
[propagated-inputs,native-inputs]: Switch Python 2 packages to Python 3
variants.
(python2-dogtail): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3dccedd6df..768f030051 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1736,11 +1736,9 @@ Python 3.3+.")
                (delete-file "test/test_Script.py")
                #t))))))))
 
-(define-public python2-dogtail
-  ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
-  ;; spaces in indentation" with Python 3.
+(define-public python-dogtail
   (package
-    (name "python2-dogtail")
+    (name "python-dogtail")
     (version "0.9.11")
     (source (origin
              (method url-fetch)
@@ -1753,8 +1751,7 @@ Python 3.3+.")
                "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2
-       #:tests? #f                      ; TODO Launching dbus for the tests
+     `(#:tests? #f                      ; TODO Launching dbus for the tests
                                         ; fails
        #:phases
        (modify-phases %standard-phases
@@ -1766,11 +1763,11 @@ Python 3.3+.")
                (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
              #t)))))
     (propagated-inputs
-     `(("python-pygobject" ,python2-pygobject)
-       ("python-pycairo" ,python2-pycairo)
-       ("python-pyatspi" ,python2-pyatspi)))
+     `(("python-pygobject" ,python-pygobject)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pyatspi" ,python-pyatspi)))
     (native-inputs
-     `(("python-nose" ,python2-nose)
+     `(("python-nose" ,python-nose)
        ("gtk+" ,gtk+)
        ("xvfb" ,xorg-server)
        ("dbus" ,dbus)
@@ -1785,6 +1782,9 @@ applications. dogtail scripts are written in Python and executed like any
 other Python program.")
     (license license:gpl2+)))
 
+(define-public python2-dogtail
+  (package-with-python2 python-dogtail))
+
 (define-public python-empy
   (package
     (name "python-empy")
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#40543] [PATCH v3 5/5] gnu: virt-manager: Work towards enabling some tests.
  2020-04-16  8:28   ` [bug#40543] [PATCH v3 1/5] gnu: Add python2-pyatspi Christopher Baines
                       ` (2 preceding siblings ...)
  2020-04-16  8:28     ` [bug#40543] [PATCH v3 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
@ 2020-04-16  8:28     ` Christopher Baines
  3 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-04-16  8:28 UTC (permalink / raw)
  To: 40543

* gnu/packages/virtualization.scm (virt-manager)[arguments]: Set #:test-target
to "test_ui", replace the 'check phase.
[native-inputs]: Add some inputs required for running tests.
---
 gnu/packages/virtualization.scm | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index be17ec15f0..d56202d4b7 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -602,9 +602,10 @@ virtualization library.")
     (build-system python-build-system)
     (arguments
      `(#:use-setuptools? #f          ; uses custom distutils 'install' command
-       ;; Some of the tests seem to require network access to install virtual
-       ;; machines.
-       #:tests? #f
+       #:test-target "test_ui"
+       #:tests? #f                      ; TODO The tests currently fail
+                                        ; RuntimeError: Loop condition wasn't
+                                        ; met
        #:imported-modules ((guix build glib-or-gtk-build-system)
                            ,@%python-build-system-modules)
        #:modules ((ice-9 match)
@@ -651,6 +652,16 @@ virtualization library.")
                                ,(filter identity paths))))
                          bin-files))
              #t))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (setenv "HOME" "/tmp")
+               (system "Xvfb :1 &")
+               (setenv "DISPLAY" ":1")
+               ;; Dogtail requires that Assistive Technology support be enabled
+               (setenv "GTK_MODULES" "gail:atk-bridge")
+               (invoke "dbus-run-session" "--" "python" "setup.py" "test_ui"))
+             #t))
          (add-after 'install 'glib-or-gtk-compile-schemas
            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
          (add-after 'install 'glib-or-gtk-wrap
@@ -679,7 +690,14 @@ virtualization library.")
        ("gobject-introspection" ,gobject-introspection)
        ("gtk+" ,gtk+ "bin")             ; gtk-update-icon-cache
        ("perl" ,perl)                   ; pod2man
-       ("intltool" ,intltool)))
+       ("intltool" ,intltool)
+       ;; The following are required for running the tests
+       ;; ("python-dogtail" ,python-dogtail)
+       ;; ("xvfb" ,xorg-server-for-tests)
+       ;; ("dbus" ,dbus)
+       ;; ("at-spi2-core" ,at-spi2-core)
+       ;; ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ))
     (home-page "https://virt-manager.org/")
     (synopsis "Manage virtual machines")
     (description
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* bug#40543: [PATCH 0/4] Work towards enabling virt-manager tests
  2020-04-10 16:09 [bug#40543] [PATCH 0/4] Work towards enabling virt-manager tests Christopher Baines
  2020-04-10 16:21 ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Christopher Baines
  2020-04-15 17:49 ` [bug#40543] [PATCH v2 1/5] " Christopher Baines
@ 2020-05-26  8:03 ` Christopher Baines
  2 siblings, 0 replies; 24+ messages in thread
From: Christopher Baines @ 2020-05-26  8:03 UTC (permalink / raw)
  To: 40543-done

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]


Christopher Baines <mail@cbaines.net> writes:

> Christopher Baines (4):
>   gnu: Add python2-pyatspi.
>   gnu: python2-dogtail: Update to 0.9.11.
>   gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
>   gnu: virt-manager: Work towards enabling some tests.
>
>  gnu/packages/gnome.scm          |  8 ++++++
>  gnu/packages/python-xyz.scm     | 46 +++++++++++++++++++++++++--------
>  gnu/packages/virtualization.scm | 22 +++++++++++++---
>  3 files changed, 62 insertions(+), 14 deletions(-)

Pushed as 20f524a44b1a9728045be1198ff795697557796c.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-05-26  8:04 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-10 16:09 [bug#40543] [PATCH 0/4] Work towards enabling virt-manager tests Christopher Baines
2020-04-10 16:21 ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Christopher Baines
2020-04-10 16:21   ` [bug#40543] [PATCH 2/4] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
2020-04-10 16:21   ` [bug#40543] [PATCH 3/4] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
2020-04-10 16:21   ` [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests Christopher Baines
2020-04-10 16:54     ` Marius Bakke
2020-04-15 17:57       ` Christopher Baines
2020-04-10 16:41   ` [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi Marius Bakke
2020-04-15 17:58     ` Christopher Baines
2020-04-15 17:49 ` [bug#40543] [PATCH v2 1/5] " Christopher Baines
2020-04-15 17:49   ` [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
2020-04-15 18:37     ` Marius Bakke
2020-04-16  8:28       ` Christopher Baines
2020-04-15 17:49   ` [bug#40543] [PATCH v2 3/5] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
2020-04-15 17:49   ` [bug#40543] [PATCH v2 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
2020-04-15 17:49   ` [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests Christopher Baines
2020-04-15 18:46     ` Marius Bakke
2020-04-16  8:27       ` Christopher Baines
2020-04-16  8:28   ` [bug#40543] [PATCH v3 1/5] gnu: Add python2-pyatspi Christopher Baines
2020-04-16  8:28     ` [bug#40543] [PATCH v3 2/5] gnu: python-pyatspi: Propagate python-pygobject Christopher Baines
2020-04-16  8:28     ` [bug#40543] [PATCH v3 3/5] gnu: python2-dogtail: Update to 0.9.11 Christopher Baines
2020-04-16  8:28     ` [bug#40543] [PATCH v3 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant Christopher Baines
2020-04-16  8:28     ` [bug#40543] [PATCH v3 5/5] gnu: virt-manager: Work towards enabling some tests Christopher Baines
2020-05-26  8:03 ` bug#40543: [PATCH 0/4] Work towards enabling virt-manager tests Christopher Baines

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.