GNU bug report logs - #71884
[PATCH 0/3] python-dolfin-adjoint: Refresh package style.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Mon, 1 Jul 2024 20:45:02 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 71884 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [bug#71884] [PATCH 3/3] gnu: python-dolfin-adjoint: Swap to pyproject-build-system.
Date: Mon,  1 Jul 2024 21:46:21 +0100
* gnu/packages/simulation.scm (python-dolfin-adjoint) [source]: Remove
trailing #t from snippet.
[build-system]: Swap to pyproject-build-system.
[arguments]: Apply G-expressions. <#:phases>: Swap back to defaul 'check
phase.

python-dolfin-adjoint

Change-Id: Idf100b718b44d9d6695e598c434fbbac55a38845
---
 gnu/packages/simulation.scm | 58 +++++++++++++++++--------------------
 1 file changed, 26 insertions(+), 32 deletions(-)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 5341c0ae55..182e00cec4 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -1201,39 +1201,33 @@ (define-public python-dolfin-adjoint
                (("\\\"mpirun\\\", \\\"-n\\\", \\\"2\\\", ") "")))
            ;; Result files are regenerated in the check phase.
            (delete-file-recursively
-            "tests/migration/viscoelasticity/test-results")
-           #t))))
-    (build-system python-build-system)
+            "tests/migration/viscoelasticity/test-results")))))
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'build 'mpi-setup
-           ,%openmpi-setup)
-         (add-after 'install 'install-doc
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((doc (string-append (assoc-ref outputs "out")
-                                        "/share/doc/" ,name "-"
-                                        ,version))
-                    (examples (string-append doc "/examples")))
-               (mkdir-p examples)
-               (copy-recursively "examples" examples))
-             #t))
-         (replace 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
-             (when tests?
-               (add-installed-pythonpath inputs outputs)
-               (setenv "HOME" (getcwd))
-               (and (invoke "py.test" "-v" "tests/fenics_adjoint"
-                            "-k" "not test_read_checkpoint")
-                    (invoke "py.test" "-v" "tests/migration")
-                    (invoke "py.test" "-v" "tests/pyadjoint")))
-             #t))
-         ;; Remove 'sanity-check, because it tries to import
-         ;; firedrake_adjoint after importing fenics_adjoint.
-         ;; Both load a module named 'backend' and firedrake_adjoint
-         ;; fails with an ImportError if it sees that the backend module
-         ;; has already been loaded.
-         (delete 'sanity-check))))
+     (list
+      #:test-flags
+      #~(list "tests/firedrake_adjoint/"
+              "tests/migration"
+              "tests/pyadjoint/"
+              "-k" "not test_read_checkpoint")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'build 'mpi-setup ,%openmpi-setup)
+          (add-before 'check 'set-environment-variables
+            (lambda _
+              (setenv "HOME" "/tmp")))
+          (add-after 'install 'install-doc
+            (lambda _
+              (let* ((doc (string-append #$output "/share/doc/" name "-" version))
+                     (examples (string-append doc "/examples")))
+                (mkdir-p examples)
+                (copy-recursively "examples" examples))))
+          ;; Remove 'sanity-check, because it tries to import
+          ;; firedrake_adjoint after importing fenics_adjoint.
+          ;; Both load a module named 'backend' and firedrake_adjoint
+          ;; fails with an ImportError if it sees that the backend module
+          ;; has already been loaded.
+          (delete 'sanity-check))))
     (inputs
      (list fenics openmpi pybind11))
     (native-inputs
-- 
2.41.0





This bug report was last modified 1 year and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.