From bc0085b79dd42e586cc5fcffa6f4972db9f42563 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 1 Jun 2021 21:48:44 +0200 Subject: [PATCH 04/18] 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: --- guix/build/python-build-system.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 5b1339d14c..08871f60cd 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2021 Lars-Dominik Braun +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -234,12 +235,18 @@ running checks after installing the package." (string-append dir "/sbin")))) 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 ,(search-path-as-string->list (or (getenv "GUIX_PYTHONPATH") ""))))) (for-each (lambda (dir) (let ((files (list-of-files dir))) - (for-each (cut wrap-program <> var) + (for-each (cut wrap-program <> #:sh (sh) var) files))) bindirs))) -- 2.31.1