GNU bug report logs - #61820
[PATCH] gnu: autokey: Update to 0.96.0.

Previous Next

Package: guix-patches;

Reported by: Bruno Victal <mirai <at> makinata.eu>

Date: Sun, 26 Feb 2023 18:01:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61820 in the body.
You can then email your comments to 61820 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#61820; Package guix-patches. (Sun, 26 Feb 2023 18:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Victal <mirai <at> makinata.eu>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 26 Feb 2023 18:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH] gnu: autokey: Update to 0.96.0.
Date: Sun, 26 Feb 2023 17:59:45 +0000
* gnu/packages/python-xyz.scm (autokey): Update to 0.96.0.
[source]: Patch tests.
[arguments]: Enable tests. Prefer PATH over substitute* in phase 'fix-paths.
Add phase 'setup-env-vars. Rename 'wrap-autokey-gi to 'wrap-autokey and set PATH.
[build-system]: Switch to pyproject-build-system.
[native-inputs]: Add python-pytest, python-pytest-cov and python-pyhamcrest.
---
 gnu/packages/python-xyz.scm | 49 ++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f1b137f867..61ccf5ae78 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -132,6 +132,7 @@
 ;;; Copyright © 2022 Garek Dyszel <garekdyszel <at> disroot.org>
 ;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull <at> hotmail.fr>
 ;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
+;;; Copyright © 2023 Bruno Victal <mirai <at> makinata.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4707,7 +4708,7 @@ (define-public python-anytree
 (define-public autokey
   (package
     (name "autokey")
-    (version "0.95.10")
+    (version "0.96.0")
     (source (origin
              (method git-fetch)
              (uri (git-reference
@@ -4716,41 +4717,45 @@ (define-public autokey
              (file-name (git-file-name name version))
              (sha256
               (base32
-               "0f0cqfnb49wwdy7zl2f2ypcnd5pc8r8n7z7ssxkq20d4xfxlgamr"))))
-    (build-system python-build-system)
+               "1v19196swihc12bcg0d9s07gfc3a44b9y7g6rqhb82qxm4p8jmbp"))
+             (modules '((guix build utils)))
+             (snippet
+              #~(begin
+                  ;; XXX: skip test depending on .git/
+                  (delete-file "tests/test_common.py")))))
+    (build-system pyproject-build-system)
     (arguments
      (list
-      ;; Tests are deprecated and broken until next version, see
-      ;; https://github.com/autokey/autokey/issues/327
-      #:tests? #f
       #:phases
       #~(modify-phases %standard-phases
-          (add-after 'unpack 'fix-paths
-            (lambda* (#:key inputs #:allow-other-keys)
-              (substitute* "lib/autokey/scripting.py"
-                (("\"wmctrl\"")
-                 (string-append "\"" (search-input-file inputs "bin/wmctrl") "\""))
-                (("\"zenity\"")
-                 (string-append "\"" (search-input-file inputs "bin/zenity") "\"")))
-              (substitute* "autokey-shell"
-                (("'ipython3'")
-                 (string-append "'" (search-input-file inputs "bin/ipython3") "'"))
-                (("'python3'")
-                 (string-append "'" (search-input-file inputs "bin/python3") "'")))))
           ;; Use 'prefix' instead of '=' to allow the user to use additional
           ;; GI paths from their autokey scripts.  GUIX_PYTHONPATH is already
           ;; wrapped with prefix in python-build-system's wrap.
-          (add-before 'wrap 'wrap-autokey-gi
-            (lambda _
-              (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+          (add-before 'wrap 'wrap-autokey
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH"))
+                    (path (map dirname
+                               ;; see lib/autokey/UI_common_functions.py
+                               (list (search-input-file inputs "/bin/wmctrl")
+                                     (search-input-file inputs "/bin/zenity")
+                                     (search-input-file inputs "/bin/ipython3")
+                                     (search-input-file inputs "/bin/python3")))))
                 (for-each
                  (lambda (program)
                    (wrap-program program
+                     `("PATH" ":" prefix ,path)
                      `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
                  (map (lambda (name)
                         (string-append #$output "/bin/" name))
                       '("autokey-gtk"
-                        "autokey-shell")))))))))
+                        "autokey-shell"))))))
+          (add-before 'check 'setup-env-vars
+            (lambda _
+              ;; tests/test_macro.py wants LANG set
+              (setenv "LANG" "")
+              ;; required for tests/test_configmanager.py
+              (setenv "HOME" "/tmp"))))))
+    (native-inputs (list python-pytest python-pytest-cov python-pyhamcrest))
     (inputs
      (list bash-minimal ; for wrap-program
            gtksourceview-3
-- 
2.39.1





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Tue, 14 Mar 2023 10:44:02 GMT) Full text and rfc822 format available.

Notification sent to Bruno Victal <mirai <at> makinata.eu>:
bug acknowledged by developer. (Tue, 14 Mar 2023 10:44:02 GMT) Full text and rfc822 format available.

Message #10 received at 61820-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 61820-done <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#61820] [PATCH] gnu: autokey: Update to 0.96.0.
Date: Tue, 14 Mar 2023 10:43:28 +0000
[Message part 1 (text/plain, inline)]
Bruno Victal <mirai <at> makinata.eu> writes:

> * gnu/packages/python-xyz.scm (autokey): Update to 0.96.0.
> [source]: Patch tests.
> [arguments]: Enable tests. Prefer PATH over substitute* in phase 'fix-paths.
> Add phase 'setup-env-vars. Rename 'wrap-autokey-gi to 'wrap-autokey and set PATH.
> [build-system]: Switch to pyproject-build-system.
> [native-inputs]: Add python-pytest, python-pytest-cov and python-pyhamcrest.
> ---
>  gnu/packages/python-xyz.scm | 49 ++++++++++++++++++++-----------------
>  1 file changed, 27 insertions(+), 22 deletions(-)

Thanks, pushed to master as 056f743718370e182379260ac0774fa41fca77ad.

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61820; Package guix-patches. (Tue, 14 Mar 2023 10:44:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Apr 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.