Message ID | 20220412025518.5253-1-paul@apatience.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DF34527BBEA; Tue, 12 Apr 2022 03:56:21 +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=unavailable 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 AACA627BBE9 for <patchwork@mira.cbaines.net>; Tue, 12 Apr 2022 03:56:21 +0100 (BST) Received: from localhost ([::1]:35502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1ne6hY-0003cJ-TS for patchwork@mira.cbaines.net; Mon, 11 Apr 2022 22:56:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ne6hI-0003cA-9c for guix-patches@gnu.org; Mon, 11 Apr 2022 22:56:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ne6hG-0000f7-KO for guix-patches@gnu.org; Mon, 11 Apr 2022 22:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ne6hG-0005yc-K0 for guix-patches@gnu.org; Mon, 11 Apr 2022 22:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54876] [PATCH] gnu: sbcl-py4cl: Fix path to python3. Resent-From: "Paul A. Patience" <paul@apatience.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Apr 2022 02:56:02 +0000 Resent-Message-ID: <handler.54876.B.164973215222956@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54876 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54876@debbugs.gnu.org Cc: "Paul A. Patience" <paul@apatience.com> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164973215222956 (code B ref -1); Tue, 12 Apr 2022 02:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Apr 2022 02:55:52 +0000 Received: from localhost ([127.0.0.1]:46826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1ne6h6-0005yC-9u for submit@debbugs.gnu.org; Mon, 11 Apr 2022 22:55:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:51234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <paul@apatience.com>) id 1ne6h4-0005y4-GM for submit@debbugs.gnu.org; Mon, 11 Apr 2022 22:55:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <paul@apatience.com>) id 1ne6h4-0003WK-6u for guix-patches@gnu.org; Mon, 11 Apr 2022 22:55:50 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]:37638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <paul@apatience.com>) id 1ne6h1-0000eE-HT for guix-patches@gnu.org; Mon, 11 Apr 2022 22:55:49 -0400 Date: Tue, 12 Apr 2022 02:55:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1649732143; bh=PLGE52dQV4jlmL0OtHpMiRCjSkm/0OiBwy4K/lERZ5I=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID; b=Mlrf82GvOYUoGck5S0PfpR4QVwccWj9+kM5/hgBiomQYOUpCycsVNCuWiMRHqmu2J Qq1xI9FExmq1ai4bTbiCROB9zMLEEvu9A5CIhKvSEzatYoTcCCqk+GfXEeu4pyNKuZ rr1Z+KoC8Ku/AQEukxpvVDZqi09zOrFf5Fccgfl0YXcvniXUCfZtqBejuEJ6JNVit8 v8vjR4Y+pdaeC2s7+YRxHC6wqNycDHDtvkFoW/7dDvcCSJFsK8yhJEH0QnfGKz3Blp vMVlRzvruXYCD+w9J9Pm84YOp3zQoPUtFiizP22uqs/ss8zrB85nCtzKzVoMLzX+PV ofRNvnTOi/xGQ== From: "Paul A. Patience" <paul@apatience.com> Message-ID: <20220412025518.5253-1-paul@apatience.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.23; envelope-from=paul@apatience.com; helo=mail-4323.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-To: "Paul A. Patience" <paul@apatience.com> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#54876] gnu: sbcl-py4cl: Fix path to python3.
|
|
Commit Message
Paul A. Patience
April 12, 2022, 2:55 a.m. UTC
* gnu/packages/lisp-xyz.scm (sbcl-py4cl)[arguments]: Add the 'fix-python3-path phase which sets py4cl:*python-command* to the absolute path to python3. --- gnu/packages/lisp-xyz.scm | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.35.1
Comments
Patch pushed as 917c25b3ba0575c6c6e44f8af0d1365bb2378220. Thanks.
Paul A. Patience schreef op di 12-04-2022 om 02:55 [+0000]: + (substitute* "src/callpython.lisp" + (("\\*python-command\\* \"python\"") + (string-append "*python-command* " + "\"" (which "python3") "\""))))) This is most likely incorrect when cross-compiling. Do (lambda* (#:key inputs #:allow-other-keys) [...] (string-append [...] (search-input-file inputs "bin/python3") [...]) [...]) instead, such that it looks in 'inputs' instead of 'native-inputs'. Also, now that 'python3' is patched in, is the following still relevant: (propagated-inputs ;; This package doesn't do anything without python available (list python (I mean, does it still need to be propagated?) Greetings, Maxime.
Maxime Devos <maximedevos@telenet.be> skribis: > Paul A. Patience schreef op di 12-04-2022 om 02:55 [+0000]: > + (substitute* "src/callpython.lisp" > + (("\\*python-command\\* \"python\"") > + (string-append "*python-command* " > + "\"" (which "python3") "\""))))) > > This is most likely incorrect when cross-compiling. Do > > (lambda* (#:key inputs #:allow-other-keys) > [...] > (string-append [...] (search-input-file inputs "bin/python3") [...]) [...]) > > instead, such that it looks in 'inputs' instead of 'native-inputs'. The two are equivalent because so far asdf-build-system doesn't support cross builds using "--target=TRIPLET". But using 'search-input-file' looks better. > Also, now that 'python3' is patched in, is the following still relevant: > > (propagated-inputs > ;; This package doesn't do anything without python available > (list python > > (I mean, does it still need to be propagated?) Indeed, having python3 in 'inputs' should be enough now. Pushed in 59377f88ed1e31d38b34279f393949bf17e505ad. Thanks.
Hello, On 2022-04-12 08:46:23-04:00, Maxime Devos wrote: > This is most likely incorrect when cross-compiling. Do > > (lambda* (#:key inputs #:allow-other-keys) > [...] > (string-append [...] (search-input-file inputs "bin/python3") [...]) [...]) > > instead, such that it looks in 'inputs' instead of 'native-inputs'. > > > Also, now that 'python3' is patched in, is the following still relevant: > > (propagated-inputs > ;; This package doesn't do anything without python available > (list python > > (I mean, does it still need to be propagated?) So you're suggesting we call search-input-file and move the python dependency to inputs rather than propagated-inputs? Right, since the correct path to python3 is now hardcoded, it doesn't need to be propagated. One other thing we could do is move python-numpy to native-inputs. It's required only for the tests and multidimensional array support, but py4cl.py looks up python-numpy at runtime for the latter, and gracefully handles the situation when it is not found. A user could opt-in to the multidimensional array support by explicitly installing python-numpy. However, I'm not familiar with how Guix deals with Python module paths. Would the python3 in sbcl-py4cl's inputs be able to find python-numpy if only sbcl-py4cl and python-numpy are explicitly installed by the user? Best regards, Paul
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 358bba4e89..10a46d4b9a 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -5180,6 +5180,12 @@ (define-public sbcl-py4cl (arguments '(#:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-python3-path + (lambda _ + (substitute* "src/callpython.lisp" + (("\\*python-command\\* \"python\"") + (string-append "*python-command* " + "\"" (which "python3") "\""))))) (add-after 'unpack 'replace-*base-directory*-var (lambda* (#:key outputs #:allow-other-keys) ;; In the ASD, the author makes an attempt to