GNU bug report logs -
#66525
[PATCH 0/7] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls)
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Fri, 13 Oct 2023 15:47:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* 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
--
2.41.0
This bug report was last modified 1 year and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.