From patchwork Sun Feb 26 17:59:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47398 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 03FD516BF0; Sun, 26 Feb 2023 18:01:26 +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.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 A5D4516BBA for ; Sun, 26 Feb 2023 18:01:24 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWLKi-0005XD-MC; Sun, 26 Feb 2023 13:01:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWLKZ-0005T5-MC for guix-patches@gnu.org; Sun, 26 Feb 2023 13:01:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWLKY-0004ll-S6 for guix-patches@gnu.org; Sun, 26 Feb 2023 13:01:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWLKY-0007G8-83 for guix-patches@gnu.org; Sun, 26 Feb 2023 13:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61820] [PATCH] gnu: autokey: Update to 0.96.0. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Feb 2023 18:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61820 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61820@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167743440327737 (code B ref -1); Sun, 26 Feb 2023 18:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Feb 2023 18:00:03 +0000 Received: from localhost ([127.0.0.1]:45050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWLJZ-0007Cx-WC for submit@debbugs.gnu.org; Sun, 26 Feb 2023 13:00:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:33732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWLJV-0007CS-3v for submit@debbugs.gnu.org; Sun, 26 Feb 2023 13:00:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWLJU-0005FD-Rq for guix-patches@gnu.org; Sun, 26 Feb 2023 12:59:56 -0500 Received: from smtpmciv6.myservices.hosting ([185.26.106.201]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWLJS-0004JP-NQ for guix-patches@gnu.org; Sun, 26 Feb 2023 12:59:56 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv6.myservices.hosting (Postfix) with ESMTP id 7CB3020E08 for ; Sun, 26 Feb 2023 18:59:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 2F3178009B; Sun, 26 Feb 2023 18:59:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 35W3L718Z6Du; Sun, 26 Feb 2023 18:59:48 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 2468480097; Sun, 26 Feb 2023 18:59:48 +0100 (CET) From: Bruno Victal Date: Sun, 26 Feb 2023 17:59:45 +0000 Message-Id: <8ab8f21e7b62105a8754a196b04c304b1b3b4361.1677434347.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Received-SPF: pass client-ip=185.26.106.201; envelope-from=mirai@makinata.eu; helo=smtpmciv6.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 ;;; Copyright © 2022 Baptiste Strazzulla ;;; Copyright © 2022 Nicolas Graves +;;; Copyright © 2023 Bruno Victal ;;; ;;; 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