From patchwork Fri Oct 13 15:47:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 54809 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 6405E27BBE9; Fri, 13 Oct 2023 16:49:30 +0100 (BST) 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,MAILING_LIST_MULTI,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 C9E9427BBE2 for ; Fri, 13 Oct 2023 16:49:28 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrKPg-0000Dp-3L; Fri, 13 Oct 2023 11:49:20 -0400 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 1qrKP8-0008Hw-Dk for guix-patches@gnu.org; Fri, 13 Oct 2023 11:48:47 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrKP6-0005ry-6e; Fri, 13 Oct 2023 11:48:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrKPP-0007Nf-K8; Fri, 13 Oct 2023 11:49:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66525] [PATCH 4/7] gnu: python-dbusmock: Rewrite phases as a gexp. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Fri, 13 Oct 2023 15:49:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66525 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66525@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , jgart Received: via spool by 66525-submit@debbugs.gnu.org id=B66525.169721212728211 (code B ref 66525); Fri, 13 Oct 2023 15:49:03 +0000 Received: (at 66525) by debbugs.gnu.org; 13 Oct 2023 15:48:47 +0000 Received: from localhost ([127.0.0.1]:47171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrKP8-0007Kt-Rv for submit@debbugs.gnu.org; Fri, 13 Oct 2023 11:48:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrKP3-0007Iz-07 for 66525@debbugs.gnu.org; Fri, 13 Oct 2023 11:48:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrKOa-0005ng-LF; Fri, 13 Oct 2023 11:48:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=KJih++ayGGNr+emLLHKUp9WJfIYdN3xbhqvmH8z8KyM=; b=FkJEa1dTuyntlzBAuRJd wk1PQrT1g1jweq5/ZpcPNjnX/2H+qAUDBm/K0nkC8sweUL4F9LI0rIxrnUKtIoD3OTklYPermI5fb UmivJvbGQRBUpFHz6voGi0y9XGdLd8ogfW6LEiRhC64uPrHC2nzltYUnd2UqoLR0xtg2vJWtjsBNE /j49HvY2YUJLyCypGj68bt+33WV7KPdYpCL8ROogtSel/vln0/xDQJMGlfrIx/fn+yoQVKObItx8r d/RkhlW1CSDOcCqgaPNBnFWcX6FagR1EGvqbP3lgdu9qL51iVcwWB+jw0NY16vzdI40qcFka9tJIz r4H2PL1aXVZAGg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 13 Oct 2023 17:47:47 +0200 Message-ID: <0ee0f58bdbe25eeed5bcf4ce52c56e6d6b180bb9.1697211312.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-dbusmock)[arguments]: Use gexps. --- gnu/packages/python-xyz.scm | 62 +++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e871951def..d6747a55c0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -27156,37 +27156,39 @@ (define-public python-dbusmock "1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g")))) (build-system python-build-system) (arguments - `(#:modules ((guix build python-build-system) - (guix build utils) - (ice-9 match)) + (list #:modules `((guix build python-build-system) + (guix build utils) + (ice-9 match)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "tests/test_code.py" - (("/bin/bash") (which "bash"))) - (substitute* "dbusmock/testcase.py" - (("'dbus-daemon'") - (string-append "'" (assoc-ref inputs "dbus") - "/bin/dbus-daemon'"))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (match (primitive-fork) - (0 ;child process - (execlp "pytest" "pytest" "-vv")) - (pytest-pid - (let loop () - ;; Reap child processes; otherwise, python-dbusmock would - ;; waste time polling for the dbus processes it spawns to - ;; be reaped, in vain. - (match (waitpid WAIT_ANY) - ((pid . status) - (if (= pid pytest-pid) - (unless (zero? status) - (error "`pytest' exited with status" status)) - (loop))))))))))))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "tests/test_code.py" + (("/bin/bash") + (which "bash"))) + (substitute* "dbusmock/testcase.py" + (("'dbus-daemon'") + (string-append "'" (assoc-ref inputs "dbus") + "/bin/dbus-daemon'"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (match (primitive-fork) + (0 ;child process + (execlp "pytest" "pytest" "-vv")) + (pytest-pid + (let loop () + ;; Reap child processes; otherwise, python-dbusmock + ;; would waste time polling for the dbus processes + ;; it spawns to be reaped, in vain. + (match (waitpid WAIT_ANY) + ((pid . status) + (if (= pid pytest-pid) + (unless (zero? status) + (error "`pytest' exited with status" + status)) + (loop))))))))))))) (native-inputs (list dbus python-pytest which)) (inputs