[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#66525] [PATCH v2 04/10] gnu: python-dbusmock: Rewrite phases as a g
From: |
Ludovic Courtès |
Subject: |
[bug#66525] [PATCH v2 04/10] gnu: python-dbusmock: Rewrite phases as a gexp. |
Date: |
Sun, 22 Oct 2023 15:43:28 +0200 |
* 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
--
2.41.0
- [bug#66525] [PATCH 1/7] gnu: mutter: Remove dependency on (guix build syscalls)., (continued)
- [bug#66525] [PATCH 1/7] gnu: mutter: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/14
- [bug#66525] [PATCH 1/7] gnu: mutter: Remove dependency on (guix build syscalls)., Maxim Cournoyer, 2023/10/15
- [bug#66525] [PATCH 1/7] gnu: mutter: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/16
- [bug#66525] [PATCH 1/7] gnu: mutter: Remove dependency on (guix build syscalls)., Maxim Cournoyer, 2023/10/16
- [bug#66525] [PATCH v2 00/10] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls), Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 01/10] gnu: mutter: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 06/10] gnu: polkit: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 07/10] gnu: public-inbox: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 05/10] gnu: python-dbusmock: Use ‘search-input-file’., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 03/10] gnu: python-dbusmock: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 04/10] gnu: python-dbusmock: Rewrite phases as a gexp.,
Ludovic Courtès <=
- [bug#66525] [PATCH v2 02/10] gnu: python-ipykernel: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 09/10] build-system/android-ndk: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 08/10] build-system/ant: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 10/10] build-system/dub: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/22
- [bug#66525] [PATCH v2 00/10] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls), Maxim Cournoyer, 2023/10/22
- [bug#66525] [PATCH v2 00/10] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls), Ludovic Courtès, 2023/10/23
- [bug#66525] [PATCH v2 00/10] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls), Maxim Cournoyer, 2023/10/23
[bug#66525] [PATCH 5/7] gnu: python-dbusmock: Use ‘search-input-file’., Ludovic Courtès, 2023/10/13
[bug#66525] [PATCH 4/7] gnu: python-dbusmock: Rewrite phases as a gexp., Ludovic Courtès, 2023/10/13
[bug#66525] [PATCH 7/7] gnu: public-inbox: Remove dependency on (guix build syscalls)., Ludovic Courtès, 2023/10/13