From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 71884@debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#71884] [PATCH v2 3/4] gnu: python-dolfin-adjoint: Swap to pyproject-build-system.
Date: Thu, 11 Jul 2024 00:21:49 +0100 [thread overview]
Message-ID: <bd719ecd51297f3bab716c6127f93d2406309c1f.1720653590.git.sharlatanus@gmail.com> (raw)
In-Reply-To: <6ebbf954f399ca8347144b087fae787c2b071354.1720653590.git.sharlatanus@gmail.com>
* 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 | 61 ++++++++++++++++---------------------
1 file changed, 27 insertions(+), 34 deletions(-)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 5341c0ae55..ad9f0080cc 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -1187,8 +1187,7 @@ (define-public python-dolfin-adjoint
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32
- "0xhy76a5f33hz94wc9g2mc5qmwkxfccbbc6yxl7psm130afp8lhn"))
+ (base32 "0xhy76a5f33hz94wc9g2mc5qmwkxfccbbc6yxl7psm130afp8lhn"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -1201,39 +1200,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/fenics_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
next prev parent reply other threads:[~2024-07-10 23:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 20:44 [bug#71884] [PATCH 0/3] python-dolfin-adjoint: Refresh package style Sharlatan Hellseher
2024-07-01 20:46 ` [bug#71884] [PATCH 1/3] gnu: python-dolfin-adjoint: Fix indentation Sharlatan Hellseher
2024-07-01 20:46 ` [bug#71884] [PATCH 2/3] gnu: python-dolfin-adjoint: Adjust package style Sharlatan Hellseher
2024-07-10 4:11 ` [bug#71884] [PATCH 0/3] python-dolfin-adjoint: Refresh " jgart via Guix-patches via
2024-07-01 20:46 ` [bug#71884] [PATCH 3/3] gnu: python-dolfin-adjoint: Swap to pyproject-build-system Sharlatan Hellseher
2024-07-10 23:21 ` [bug#71884] [PATCH v2 1/4] gnu: python-dolfin-adjoint: Fix indentation Sharlatan Hellseher
2024-07-10 23:21 ` [bug#71884] [PATCH v2 2/4] gnu: python-dolfin-adjoint: Adjust package style Sharlatan Hellseher
2024-07-10 23:21 ` Sharlatan Hellseher [this message]
2024-07-10 23:21 ` [bug#71884] [PATCH v2 4/4] gnu: python-dolfin-adjoint:; Disable failing tests, fix build Sharlatan Hellseher
2024-07-11 18:17 ` bug#71884: [PATCH 0/3] python-dolfin-adjoint: Refresh package style Sharlatan Hellseher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bd719ecd51297f3bab716c6127f93d2406309c1f.1720653590.git.sharlatanus@gmail.com \
--to=sharlatanus@gmail.com \
--cc=71884@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).