From: "Ludovic Courtès" <ludo@gnu.org>
To: 64081@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludovic.courtes@inria.fr>,
"Yann Dupont" <yann.dupont@univ-nantes.fr>
Subject: [bug#64081] [PATCH 1/2] gnu: fenics: Make sure 'jit.py' can find 'dolfin.pc'.
Date: Thu, 15 Jun 2023 17:35:30 +0200 [thread overview]
Message-ID: <9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org> (raw)
From: Ludovic Courtès <ludovic.courtes@inria.fr>
* gnu/packages/simulation.scm (fenics)[inputs]: Move PYTHON-PKGCONFIG
to...
[propagated-inputs]: ... here.
[arguments]: Add 'set-dolfin-pc-file-name' phase.
---
gnu/packages/simulation.scm | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 059be5a2be..9eeb57babe 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -716,12 +716,14 @@ (define-public fenics
("ply" ,python-ply)
("pytest" ,python-pytest)
("python-decorator" ,python-decorator)
- ("python-pkgconfig" ,python-pkgconfig)
,@(package-native-inputs fenics-dolfin)))
(propagated-inputs
`(("dolfin" ,fenics-dolfin)
("petsc4py" ,python-petsc4py)
- ("slepc4py" ,python-slepc4py)))
+ ("slepc4py" ,python-slepc4py)
+
+ ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at run time.
+ ("python-pkgconfig" ,python-pkgconfig)))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -729,6 +731,15 @@ (define-public fenics
(lambda _
(substitute* "python/setup.py"
(("pybind11==") "pybind11>="))))
+ (add-after 'unpack 'set-dolfin-pc-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Instead of cluttering the user's 'PKG_CONFIG_PATH' environment
+ ;; variable, hard-code the 'dolfin.pc' absolute file name.
+ (let ((pc-file (search-input-file inputs
+ "/lib/pkgconfig/dolfin.pc")))
+ (substitute* "python/dolfin/jit/jit.py"
+ (("pkgconfig\\.parse\\(\"dolfin\"\\)")
+ (string-append "pkgconfig.parse(\"" pc-file "\")"))))))
(add-after 'patch-source-shebangs 'set-paths
(lambda _
;; Define paths to store locations.
base-commit: 26602f4063a6e0c626e8deb3423166bcd0abeb90
--
2.40.1
next reply other threads:[~2023-06-15 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 15:35 Ludovic Courtès [this message]
2023-06-15 15:41 ` [bug#64081] [PATCH 2/2] gnu: fenics-dolfin, fenics: Remove input labels Ludovic Courtès
2023-06-20 21:31 ` [bug#64081] [PATCH v2 1/2] gnu: fenics: Make sure 'jit.py' can find 'dolfin.pc' Ludovic Courtès
2023-06-20 21:31 ` [bug#64081] [PATCH v2 2/2] gnu: fenics-dolfin, fenics: Remove input labels Ludovic Courtès
2023-06-24 14:24 ` [bug#64081] [PATCH 1/2] gnu: fenics: Make sure 'jit.py' can find 'dolfin.pc' Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org \
--to=ludo@gnu.org \
--cc=64081@debbugs.gnu.org \
--cc=ludovic.courtes@inria.fr \
--cc=yann.dupont@univ-nantes.fr \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.