[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/163: build/python: Add a new guix-pythonpath procedure.
From: |
guix-commits |
Subject: |
03/163: build/python: Add a new guix-pythonpath procedure. |
Date: |
Mon, 25 Jan 2021 02:01:13 -0500 (EST) |
apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.
commit c3c5bdd2b0ea4588ecba424fdbf6df101d967d3d
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 09:34:33 2021 -0500
build/python: Add a new guix-pythonpath procedure.
This procedure will be used in place where the static "PYTHONPATH" string
used
to be.
* guix/build/python-build-system.scm (guix-pythonpath): New procedure.
---
guix/build/python-build-system.scm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/guix/build/python-build-system.scm
b/guix/build/python-build-system.scm
index aad8625..77bd621 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -31,10 +31,12 @@
#:use-module (ice-9 match)
#:use-module (ice-9 ftw)
#:use-module (ice-9 format)
+ #:use-module (ice-9 string-fun)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%standard-phases
add-installed-pythonpath
+ guix-pythonpath
site-packages
python-version
python-build))
@@ -158,6 +160,13 @@
(major+minor (take components 2)))
(string-join major+minor ".")))
+(define (guix-pythonpath inputs)
+ "Derive the GUIX_PYTHONPATH_X_Y string , with the major and minor version
+numbers substituted for X and Y, respectively."
+ (let ((python (assoc-ref inputs "python")))
+ (string-append "GUIX_PYTHONPATH_"
+ (string-replace-substring (python-version python) "."
"_"))))
+
(define (python-output outputs)
"Return the path of the python output, if there is one, or fall-back to out."
(or (assoc-ref outputs "python")
- 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, 2021/01/25
- 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 <=
- 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
- 54/163: gnu: ibus-anty: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 58/163: gnu: python-django-contact-form: Do not alter PYTHONPATH., guix-commits, 2021/01/25
- 65/163: gnu: kicad: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 62/163: gnu: python-django-statici18n: Do not read PYTHONPATH., guix-commits, 2021/01/25
- 35/163: gnu: gitless: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 41/163: gnu: blanket: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25