From patchwork Fri Jan 14 20:40:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 36342 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3778A27BBEA; Fri, 14 Jan 2022 20:45:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A9F7927BBE9 for ; Fri, 14 Jan 2022 20:45:08 +0000 (GMT) Received: from localhost ([::1]:41616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8TRb-0007vZ-O9 for patchwork@mira.cbaines.net; Fri, 14 Jan 2022 15:45:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8TNi-0007u3-MN for guix-patches@gnu.org; Fri, 14 Jan 2022 15:41:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8TNe-0005ZN-Eh for guix-patches@gnu.org; Fri, 14 Jan 2022 15:41:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8TNe-0004kN-CH for guix-patches@gnu.org; Fri, 14 Jan 2022 15:41:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53222] [PATCH] gnu: autokey fix paths. References: In-Reply-To: Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 14 Jan 2022 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53222 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 53222@debbugs.gnu.org, Nicolas Goaziou Received: via spool by 53222-submit@debbugs.gnu.org id=B53222.164219282318169 (code B ref 53222); Fri, 14 Jan 2022 20:41:02 +0000 Received: (at 53222) by debbugs.gnu.org; 14 Jan 2022 20:40:23 +0000 Received: from localhost ([127.0.0.1]:38323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8TN0-0004iy-TS for submit@debbugs.gnu.org; Fri, 14 Jan 2022 15:40:23 -0500 Received: from mail-4316.protonmail.ch ([185.70.43.16]:18089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8TMz-0004ij-IF for 53222@debbugs.gnu.org; Fri, 14 Jan 2022 15:40:22 -0500 Date: Fri, 14 Jan 2022 20:40:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1642192814; bh=enogcmI6Q8hZNnPGOAnII5CypLjIfdZuhrM94TrTqE8=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:From:To:Cc; b=Zz+/09AUw9zWaz5CdCpJCbGWSjF2KUJKYTy4UMG+Xwyq87CCTTG3XiOmmjhdiO0p7 f8ZtXw3KCxdooi51VkCeacy0HW9jDXPNKqYI0y+QtCa1skEDIXQTMYy5MM/im6hcWy 7ica+Q2tcFv/ge3bkpA/NfBZpuJGQE6q7Eo2ZprFlGtfdv7q546t/eRasYLz03TbS/ e9AoPqOf0etX8rfhc/nkMELKsf9363JyYkbYMDvHxqIiGzwrCroIrhdak5x31Xvpvn ZlFi8KvGxdsqpSx9UGWxk7kZB90xwEciRQ26jSW7de+zYFkHPN3vkVQUTLOfzO7Y0c UutbGGviiS7Vg== Message-ID: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias X-getmail-retrieved-from-mailbox: Patches Hi Maxime, ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, January 13th, 2022 at 2:34 AM, Maxime Devos wrote: >> I can submit a patch to change the wrap and inputs if that would be cleaner. > > * Maybe you make the GUIX_PYTHONPATH wrapping explicit (e.g. by > removing the wrap phase, or moving the 'wrap-autokey' phase before > the 'wrap', or letting it replace the 'wrap' phase), adding a comment > > ;; Use 'prefix' instead of '=' to allow the user to use additional > ;; Python libraries from their autokey scripts. > * or maybe don't do that, but still add a similar comment to the 'wrap' > phase. > * Could you make the comment next to #:tests? a bit more explicit? > Okay, I hope I understood correctly, attached is a patch with these updates (on top of the already applied originally package addition). I noticed that autokey-shell had calls to ipython3 (or python3) that should have been substituted, so I did that with the added input for ipython3. Added the comment about the tests and GI_TYPELIB_PATH. Note that this is there because otherwise the gtk pieces won't run as it needs the girepository (I think this is also the reason this is done in most cases?). I did add the comment you suggested so it is clear this is prefix in case there are other GI paths a user wants, and that the GUIX_PYTHONPATH wrapping is done by python-build-system already. Thanks again! John From aec4732cac7e239590c7bb85649fd99f6be2d475 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Fri, 14 Jan 2022 15:26:36 -0500 Subject: [PATCH] gnu: autokey: Fix paths. * gnu/packages/python-xyz.scm (autokey): Add comments on the disabled tests and GI_TYPELIB_PATH wrapping. [inputs]: Add ipython. [phases]{fix-paths}: Use paths to ipython3 and python3 in autokey-shell script. {wrap-autokey}: Change name to... {wrap-autokey-gi}: ...this and move to before wrap for clarity. --- gnu/packages/python-xyz.scm | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b85232f2b7..7ec671a476 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -4197,7 +4197,9 @@ (define-public autokey (build-system python-build-system) (arguments (list - #:tests? #f ; Tests are deprecated/broken until next version. + ;; 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 @@ -4206,8 +4208,16 @@ (define-public autokey (("\"wmctrl\"") (string-append "\"" (search-input-file inputs "bin/wmctrl") "\"")) (("\"zenity\"") - (string-append "\"" (search-input-file inputs "bin/zenity") "\""))))) - (add-after 'install 'wrap-autokey + (string-append "\"" (search-input-file inputs "bin/zenity") "\""))) + (substitute* "autokey-shell" + (("'ipython3'") + (string-append "'" (which "ipython3") "'")) + (("'python3'") + (string-append "'" (which "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"))) (for-each @@ -4223,14 +4233,14 @@ (define-public autokey gtksourceview-3 libappindicator libnotify - wmctrl - zenity)) - (propagated-inputs - (list python-dbus + python-dbus + python-ipython python-pygobject python-pyinotify python-pyqt+qscintilla - python-xlib)) + python-xlib + wmctrl + zenity)) (home-page "https://github.com/autokey/autokey") (synopsis "Keyboard and GUI automation utility") -- 2.34.0