diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-10-13 16:31:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-10-23 11:56:53 +0200 |
commit | 4ac6999be70948d188314d0f89806be7f936cfa1 (patch) | |
tree | a4382e6f74de2d541674f404fe7a287538c530bd | |
parent | 9a23dd54ee413f9faa887db3e84ec127a4c083b6 (diff) |
gnu: python-dbusmock: Rewrite phases as a gexp.
* gnu/packages/python-xyz.scm (python-dbusmock)[arguments]: Use gexps.
-rw-r--r-- | gnu/packages/python-xyz.scm | 62 |
1 files 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 |