GNU bug report logs -
#54876
[PATCH] gnu: sbcl-py4cl: Fix path to python3.
Previous Next
Reported by: "Paul A. Patience" <paul <at> apatience.com>
Date: Tue, 12 Apr 2022 02:56:02 UTC
Severity: normal
Tags: patch
Done: Guillaume Le Vaillant <glv <at> posteo.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54876 in the body.
You can then email your comments to 54876 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#54876
; Package
guix-patches
.
(Tue, 12 Apr 2022 02:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Paul A. Patience" <paul <at> apatience.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 12 Apr 2022 02:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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(+)
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
--
2.35.1
Reply sent
to
Guillaume Le Vaillant <glv <at> posteo.net>
:
You have taken responsibility.
(Tue, 12 Apr 2022 12:09:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Paul A. Patience" <paul <at> apatience.com>
:
bug acknowledged by developer.
(Tue, 12 Apr 2022 12:09:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 54876-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Patch pushed as 917c25b3ba0575c6c6e44f8af0d1365bb2378220.
Thanks.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54876
; Package
guix-patches
.
(Tue, 12 Apr 2022 12:47:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 54876 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54876
; Package
guix-patches
.
(Tue, 12 Apr 2022 13:24:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 54876 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Maxime Devos <maximedevos <at> 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.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54876
; Package
guix-patches
.
(Tue, 12 Apr 2022 13:38:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 54876 <at> debbugs.gnu.org (full text, mbox):
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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 11 May 2022 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.