From patchwork Sun Oct 22 13:43:28 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: 55119 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 9662D27BBEA; Sun, 22 Oct 2023 14:45:07 +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=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 AB60A27BBE2 for ; Sun, 22 Oct 2023 14:45:06 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quYl2-0004Gx-Oa; Sun, 22 Oct 2023 09:44:44 -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 1quYl0-0004GI-Ob for guix-patches@gnu.org; Sun, 22 Oct 2023 09:44:42 -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 1quYl0-0003Sv-GY; Sun, 22 Oct 2023 09:44:42 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quYlL-0000aI-Jx; Sun, 22 Oct 2023 09:45:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66525] [PATCH v2 04/10] 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: Sun, 22 Oct 2023 13:45: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.16979822802126 (code B ref 66525); Sun, 22 Oct 2023 13:45:03 +0000 Received: (at 66525) by debbugs.gnu.org; 22 Oct 2023 13:44:40 +0000 Received: from localhost ([127.0.0.1]:45697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quYkx-0000Y8-G6 for submit@debbugs.gnu.org; Sun, 22 Oct 2023 09:44:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quYkp-0000Wq-Tk for 66525@debbugs.gnu.org; Sun, 22 Oct 2023 09:44:32 -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 1quYkI-0003K0-7o; Sun, 22 Oct 2023 09:43:58 -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=YzEebFsXxekEB2V9Q4WMjdNCH0lylHUFV+nxvtg9y8I=; b=VWk7b5O2gF+floMQoceS dgzBbNGGJ5HQ9WRBhEJ00sTEppysr1JcNw0r+FUJ5BLCF1tuiRRlZTSFIPSFO/THxqM74hyITO3F4 QZeMdoiUoUebjPK39sTJcHRJEJ2q3JG/xbHG3EgOfALXLFqLk2SVKm5FQ6aBU/QTsRk6RC8c55OEi 2pn2CIQGWGt2nn5jTyM7CH0Nv/VbA3S3mc8kuJr/VKizEth7YZNKbdBJ/wMpdq6Z9q3j6Q2rmHgq9 6WXrtvI2+QxWQ2nYMA5sHcyWRJt92hsxjXzzWMqCBgXZBqt4FBHWFJk6gIvbR73q1RKMfkloTaLti NHud0/qRdra6vQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sun, 22 Oct 2023 15:43:28 +0200 Message-ID: <48b4d13af78919c35ae4389fb46fd1c124a7bc30.1697982039.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: <87o7gywndy.fsf@gmail.com> 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 782d1fae6f..4929c6dcc7 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -27165,37 +27165,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