[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/163: build/python: Always add the install prefix to the Guix PYTHONPA
From: |
guix-commits |
Subject: |
05/163: build/python: Always add the install prefix to the Guix PYTHONPATH. |
Date: |
Mon, 25 Jan 2021 02:01:14 -0500 (EST) |
apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.
commit 2400fc4b4c61ed863bfff017ef40be919d16355f
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 09:15:46 2021 -0500
build/python: Always add the install prefix to the Guix PYTHONPATH.
This is to remove the need for common boilerplate code in check phase
overrides.
* guix/build/python-build-system.scm (add-install-to-pythonpath): New phase.
(%standard-phases): Order it before the check phase.
---
guix/build/python-build-system.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/guix/build/python-build-system.scm
b/guix/build/python-build-system.scm
index 566000f..ca2e08f 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;;
@@ -190,6 +190,11 @@ useful when running checks after installing the package."
(string-append add-path
(if old-path (string-append ":" old-path) "")))))
+(define* (add-install-to-pythonpath #:key inputs outputs
+ #:allow-other-keys)
+ "This adds the installed site-packages directory to the Guix PYTHONPATH."
+ (add-installed-pythonpath inputs outputs))
+
(define* (install #:key inputs outputs (configure-flags '()) use-setuptools?
#:allow-other-keys)
"Install a given Python package."
@@ -306,6 +311,7 @@ by Cython."
(replace 'install install)
(add-after 'install 'check check)
(add-after 'install 'wrap wrap)
+ (add-before 'check 'add-install-to-pythonpath add-install-to-pythonpath)
(add-before 'strip 'rename-pth-file rename-pth-file)))
(define* (python-build #:key inputs (phases %standard-phases)
- 27/163: gnu: catfish: Wrap with the new Guix PYTHONPATH., (continued)
- 27/163: gnu: catfish: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 37/163: gnu: git-when-merged: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 44/163: gnu: kaldi-gstreamer-server: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 64/163: gnu: cozy: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 59/163: gnu: python-django-pipeline: Do not alter PYTHONPATH., guix-commits, 2021/01/25
- 48/163: gnu: python-rpy2: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 66/163: gnu: volk: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 69/163: gnu: renpy: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 88/163: gnu: python-fenics-ufl: Do not alter PYTHONPATH., guix-commits, 2021/01/25
- 08/163: gnu: python2-virtualenv: Fix build., guix-commits, 2021/01/25
- 05/163: build/python: Always add the install prefix to the Guix PYTHONPATH.,
guix-commits <=
- 14/163: gnu: fio: Adjust for the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 12/163: gnu: jack2: Adjust build phase., guix-commits, 2021/01/25
- 15/163: gnu: python-pybedtools: Streamline following Python build system changes., guix-commits, 2021/01/25
- 30/163: gnu: linkchecker: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 34/163: gnu: pitivi: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 56/163: gnu: python-django: Do not alter PYTHONPATH., guix-commits, 2021/01/25
- 31/163: gnu: ganeti: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 51/163: gnu: scanmem: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 39/163: gnu: python-libtmux: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 60/163: gnu: python-django-sortedm2m: Do not alter PYTHONPATH., guix-commits, 2021/01/25