From patchwork Mon Jul 1 20:46:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 65823 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 949CD27BBE2; Mon, 1 Jul 2024 21:48:47 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS 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 5FB5527BBE9 for ; Mon, 1 Jul 2024 21:48:46 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sONwX-0006iX-EL; Mon, 01 Jul 2024 16:48:09 -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 1sONwR-0006gf-QY for guix-patches@gnu.org; Mon, 01 Jul 2024 16:48:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sONwQ-0007p4-7h for guix-patches@gnu.org; Mon, 01 Jul 2024 16:48:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sONwQ-0002Nu-Sl for guix-patches@gnu.org; Mon, 01 Jul 2024 16:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71884] [PATCH 3/3] gnu: python-dolfin-adjoint: Swap to pyproject-build-system. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Jul 2024 20:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71884 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71884@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 71884-submit@debbugs.gnu.org id=B71884.17198668559100 (code B ref 71884); Mon, 01 Jul 2024 20:48:02 +0000 Received: (at 71884) by debbugs.gnu.org; 1 Jul 2024 20:47:35 +0000 Received: from localhost ([127.0.0.1]:34825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sONvy-0002Mc-NK for submit@debbugs.gnu.org; Mon, 01 Jul 2024 16:47:35 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:44377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sONvw-0002M7-Ey for 71884@debbugs.gnu.org; Mon, 01 Jul 2024 16:47:33 -0400 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42562e4b5d1so24819865e9.1 for <71884@debbugs.gnu.org>; Mon, 01 Jul 2024 13:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719866786; x=1720471586; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0p7dLEltXMtXa4m3Od3cTzEoC7WIJB4LVmQQHY5FP7I=; b=Vf5mgbvYinGEz0YRGXnEkkpei/5zv1g91REJm8MC52V9mwRIHB92yy8HYdP572CG1u vIwpDgjADKPzoBw6faKs6O0cYiugJga5xGWcUUosOPwxh4fTSo+7DRhL5GFHSnInr5fE KxpPKshbuPT8Td9TTPlrDHxuEDqtWdyNIjcRtjP0ITDtap9ux9Boj37LqFcIFFPzIaG/ a1EMekRuTJjL7xp6MU2GJiX2XqNzGDqcsZvG3wbbak48VnPfqk/ikw+xZlGU16VIUpie maBUD01H0LJl/yl0xFbzFK1G4mu/C0e0c54iHfPANIAPpoq/uHAqgQI4YXwHD//hWSCV etZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719866786; x=1720471586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0p7dLEltXMtXa4m3Od3cTzEoC7WIJB4LVmQQHY5FP7I=; b=WHw94WNtCHorN92mSVeTrxxjolWPtP/+1rpDPww0gZMZL3pTlMmg0eN50xwFfV6Gsf h9H3+XoOWrF5Xr1BteDZ7TDyv2p+Qyojz4B05GAEHqoV8noWVPk5bjl5z27Cj1ktEyXW o+ZBFhT5AMOsBr/2W7b+ECVS5WYU28wA5KabN/oD7/WB1/balHMHm5JbUoLUkVIif4c4 VhhCRtgWfG/AKqfuunnh3Zpn987kkusn0qLFa3BavDfvaE+DYE8+aX/pq9MvLoGXXJF1 BRhqnHW7a+kKJc2V4rEdkr+csnDVxMyvcm+WiXBFKjcjAYyz89apYsHMbpDAO0e4Iqk3 D91w== X-Gm-Message-State: AOJu0YxjXyrHKS3VSnfLKmLnjnRbGVBCMj/01K14yrnk6D72ijZgHTya QVTexcrpDm+x/c1Td1/aaLrXg8OXtZVpQ+Runy5nQojRkIGiG0gf236VkL47 X-Google-Smtp-Source: AGHT+IFXkC6PUKsLQHjsWIjoD5/b7WW2b7slcRoShhCecD7ydwdQ7m237sB7Wuiw9FtSb9OSG1MA+g== X-Received: by 2002:a05:600c:ac6:b0:425:28a7:a147 with SMTP id 5b1f17b1804b1-4257a011a58mr45628045e9.22.1719866785988; Mon, 01 Jul 2024 13:46:25 -0700 (PDT) Received: from guxtil.incerto.xyz (bagu-15-b2-v4wan-170076-cust245.vm21.cable.virginm.net. [77.98.0.246]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0e1688sm11076402f8f.60.2024.07.01.13.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 13:46:25 -0700 (PDT) From: Sharlatan Hellseher Date: Mon, 1 Jul 2024 21:46:21 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 * 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