From patchwork Tue Jun 20 21:31:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 51111 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1A3AD27BBEA; Tue, 20 Jun 2023 22:33:00 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 846D427BBE2 for ; Tue, 20 Jun 2023 22:32:59 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBixg-0003mn-Pk; Tue, 20 Jun 2023 17:32:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBixH-0003kA-Nx for guix-patches@gnu.org; Tue, 20 Jun 2023 17:32:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBixH-0006uc-5q for guix-patches@gnu.org; Tue, 20 Jun 2023 17:32:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qBixH-0008B2-0u for guix-patches@gnu.org; Tue, 20 Jun 2023 17:32:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64081] [PATCH v2 1/2] gnu: fenics: Make sure 'jit.py' can find 'dolfin.pc'. References: <9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org> In-Reply-To: <9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org> Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Jun 2023 21:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64081 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64081@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 64081-submit@debbugs.gnu.org id=B64081.168729671031360 (code B ref 64081); Tue, 20 Jun 2023 21:32:02 +0000 Received: (at 64081) by debbugs.gnu.org; 20 Jun 2023 21:31:50 +0000 Received: from localhost ([127.0.0.1]:59985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBix3-00089h-F7 for submit@debbugs.gnu.org; Tue, 20 Jun 2023 17:31:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBix1-00089T-Pp for 64081@debbugs.gnu.org; Tue, 20 Jun 2023 17:31:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBiwv-0006rj-Nu; Tue, 20 Jun 2023 17:31:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=FuCZUEKzjrY15jZ+8bGM9s6VoN7VL9A+ioL/TUKGHu0=; b=BOMFo7nfvp5Okg WrIdMbXNpCaKkkYGOInyodaMJIi0uvj3XWFuowXLSQxvRAJ41UcmBUI0+WQAlH+Bxme6hSBPdXrld Zml+b1WkDFJx17XdoXnXIXkMlu0NVC4djxDN6heo5Y9UaqTxSvfhX4B+LEUUCvfB/iSdeJpTIpgr1 uk6JNsETYRHq2y1yTCSIOPw8CguD7zNzBxSBEJx6z0jJnPc/IG3Yjj1hcVu+QE8H327E4Re71AYHL yElnjOCsSejifQcQIIYb2/fpFIgZ17WvNJ/cbqLSMJ4eWEQARb/D+/BlyWeGlE6ZoDCzskqnxoysl WYb3aif1oMniTJgEixBw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBiwu-0004wE-UU; Tue, 20 Jun 2023 17:31:41 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 20 Jun 2023 23:31:21 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Ludovic Courtès * 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(-) base-commit: bb09f3ac002a4f34177d42fd3ea0332f4b7fe7a6 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.