mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-19 05:07:11 -05:00
python-build-system: Look up the interpreter in 'inputs'.
* guix/build/python-build-system.scm (wrap): Pass the shell interpreter from 'inputs' to 'wrap-program' using 'search-input-file'. Partially-Fixes: <https://issues.guix.gnu.org/47869> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
1dbc3b2b0c
commit
5b24cbee31
1 changed files with 8 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
||||||
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
|
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
|
||||||
|
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -234,12 +235,18 @@ (define bindirs
|
||||||
(string-append dir "/sbin"))))
|
(string-append dir "/sbin"))))
|
||||||
outputs))
|
outputs))
|
||||||
|
|
||||||
|
;; Do not require "bash" to be present in the package inputs
|
||||||
|
;; even when there is nothing to wrap.
|
||||||
|
;; Also, calculate (sh) only once to prevent some I/O.
|
||||||
|
(define %sh (delay (search-input-file inputs "bin/bash")))
|
||||||
|
(define (sh) (force %sh))
|
||||||
|
|
||||||
(let* ((var `("GUIX_PYTHONPATH" prefix
|
(let* ((var `("GUIX_PYTHONPATH" prefix
|
||||||
,(search-path-as-string->list
|
,(search-path-as-string->list
|
||||||
(or (getenv "GUIX_PYTHONPATH") "")))))
|
(or (getenv "GUIX_PYTHONPATH") "")))))
|
||||||
(for-each (lambda (dir)
|
(for-each (lambda (dir)
|
||||||
(let ((files (list-of-files dir)))
|
(let ((files (list-of-files dir)))
|
||||||
(for-each (cut wrap-program <> var)
|
(for-each (cut wrap-program <> #:sh (sh) var)
|
||||||
files)))
|
files)))
|
||||||
bindirs)))
|
bindirs)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue