[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/10: gnu: python-dbusmock: Rewrite phases as a gexp.
From: |
guix-commits |
Subject: |
04/10: gnu: python-dbusmock: Rewrite phases as a gexp. |
Date: |
Sun, 22 Oct 2023 09:38:20 -0400 (EDT) |
civodul pushed a commit to branch wip-syscall-update
in repository guix.
commit 48b4d13af78919c35ae4389fb46fd1c124a7bc30
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Oct 13 16:31:49 2023 +0200
gnu: python-dbusmock: Rewrite phases as a gexp.
* 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 @@ for YAML and JSON.")
"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
- branch wip-syscall-update created (now 1f926dea6d), guix-commits, 2023/10/22
- 03/10: gnu: python-dbusmock: Remove dependency on (guix build syscalls)., guix-commits, 2023/10/22
- 04/10: gnu: python-dbusmock: Rewrite phases as a gexp.,
guix-commits <=
- 05/10: gnu: python-dbusmock: Use ‘search-input-file’., guix-commits, 2023/10/22
- 06/10: gnu: polkit: Remove dependency on (guix build syscalls)., guix-commits, 2023/10/22
- 01/10: gnu: mutter: Remove dependency on (guix build syscalls)., guix-commits, 2023/10/22
- 02/10: gnu: python-ipykernel: Remove dependency on (guix build syscalls)., guix-commits, 2023/10/22
- 10/10: build-system/dub: Remove dependency on (guix build syscalls)., guix-commits, 2023/10/22
- 07/10: gnu: public-inbox: Remove dependency on (guix build syscalls)., guix-commits, 2023/10/22
- 09/10: build-system/android-ndk: Remove dependency on (guix build syscalls)., guix-commits, 2023/10/22
- 08/10: build-system/ant: Remove dependency on (guix build syscalls)., guix-commits, 2023/10/22