[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/163: build/python: Adjust wrap phase to use the new GUIX_PYTHONPATH.
From: |
guix-commits |
Subject: |
07/163: build/python: Adjust wrap phase to use the new GUIX_PYTHONPATH. |
Date: |
Mon, 25 Jan 2021 02:01:15 -0500 (EST) |
apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.
commit b46f35785bb03b8da7983fb8ced0f4f46c9a524c
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 11:08:57 2021 -0500
build/python: Adjust wrap phase to use the new GUIX_PYTHONPATH.
* guix/build/python-build-system.scm (wrap): Adjust to use the new computed
Guix-specific PYTHONPATH. Remove trailing #t.
---
guix/build/python-build-system.scm | 40 +++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/guix/build/python-build-system.scm
b/guix/build/python-build-system.scm
index 19bd3c9..7fef0b2 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -229,28 +229,28 @@ useful when running checks after installing the package."
#t))
(define* (wrap #:key inputs outputs #:allow-other-keys)
- (define (list-of-files dir)
- (find-files dir (lambda (file stat)
- (and (eq? 'regular (stat:type stat))
- (not (wrapper? file))))))
+ (let ((pythonpath (guix-pythonpath inputs)))
+ (define (list-of-files dir)
+ (find-files dir (lambda (file stat)
+ (and (eq? 'regular (stat:type stat))
+ (not (wrapper? file))))))
- (define bindirs
- (append-map (match-lambda
- ((_ . dir)
- (list (string-append dir "/bin")
- (string-append dir "/sbin"))))
- outputs))
+ (define bindirs
+ (append-map (match-lambda
+ ((_ . dir)
+ (list (string-append dir "/bin")
+ (string-append dir "/sbin"))))
+ outputs))
- (let* ((var `("PYTHONPATH" prefix
- ,(cons (site-packages inputs outputs)
- (search-path-as-string->list
- (or (getenv "PYTHONPATH") ""))))))
- (for-each (lambda (dir)
- (let ((files (list-of-files dir)))
- (for-each (cut wrap-program <> var)
- files)))
- bindirs)
- #t))
+ (let* ((var (list pythonpath 'prefix
+ (cons (site-packages inputs outputs)
+ (search-path-as-string->list
+ (or (getenv pythonpath) ""))))))
+ (for-each (lambda (dir)
+ (let ((files (list-of-files dir)))
+ (for-each (cut wrap-program <> var)
+ files)))
+ bindirs))))
(define* (rename-pth-file #:key name inputs outputs #:allow-other-keys)
"Rename easy-install.pth to NAME.pth to avoid conflicts between packages
- branch cu/farewell-to-pythonpath created (now c8e1f2c), guix-commits, 2021/01/25
- 01/163: utils: Add a version-minor procedure., guix-commits, 2021/01/25
- 07/163: build/python: Adjust wrap phase to use the new GUIX_PYTHONPATH.,
guix-commits <=
- 09/163: gnu: dstat: Adjust wrap phase., guix-commits, 2021/01/25
- 10/163: gnu: solaar: Do not read PYTHONPATH from environment., guix-commits, 2021/01/25
- 04/163: build/python: Replace PYTHONPATH by GUIX_PYTHONPATH_X_Y in add-installed-pythonpath., guix-commits, 2021/01/25
- 18/163: gnu: couger: Adjust wrap phase., guix-commits, 2021/01/25
- 11/163: gnu: intel-xed: Adjust build phase., guix-commits, 2021/01/25
- 03/163: build/python: Add a new guix-pythonpath procedure., guix-commits, 2021/01/25
- 22/163: gnu: python-scanpy: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 21/163: gnu: filtlong: Adjust wrap phase., guix-commits, 2021/01/25
- 24/163: gnu: cdemu-client: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 25/163: gnu: python-loompy: Do not set PYTHONPATH., guix-commits, 2021/01/25