[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
110/131: gnu: 389-ds-base: Wrap with GUIX_PYTHONPATH.
From: |
guix-commits |
Subject: |
110/131: gnu: 389-ds-base: Wrap with GUIX_PYTHONPATH. |
Date: |
Fri, 29 Jan 2021 09:22:16 -0500 (EST) |
apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.
commit 7a7d58b696c875c8b1be8d1fa09575c44d0477c5
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Jan 27 17:20:30 2021 -0500
gnu: 389-ds-base: Wrap with GUIX_PYTHONPATH.
* gnu/packages/openldap.scm (389-ds-base): Remove trailing #t. Do not alter
PYTHONPATH. Wrap with GUIX_PYTHONPATH.
---
gnu/packages/openldap.scm | 41 ++++++++++++++++-------------------------
1 file changed, 16 insertions(+), 25 deletions(-)
diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm
index ce8fa48..d6a7aa2 100644
--- a/gnu/packages/openldap.scm
+++ b/gnu/packages/openldap.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -228,7 +229,7 @@ servers from Python programs.")
`(#:modules ((srfi srfi-1)
(guix build gnu-build-system)
((guix build python-build-system)
- #:select (python-version))
+ #:select (add-installed-pythonpath))
(guix build utils))
#:imported-modules ((guix build python-build-system)
,@%gnu-build-system-modules)
@@ -259,8 +260,8 @@ servers from Python programs.")
(("'/usr/bin/certutil'")
(string-append "'" (which "certutil") "'"))
(("'/usr/bin/c_rehash'")
- (string-append "'" (which "perl") "', '" (which "c_rehash")
"'")))
- #t))
+ (string-append "'" (which "perl") "', '"
+ (which "c_rehash") "'")))))
(add-after 'unpack 'overwrite-default-locations
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -278,28 +279,21 @@ servers from Python programs.")
(substitute* '("src/lib389/lib389/instance/setup.py"
"src/lib389/lib389/instance/remove.py")
(("etc_dirsrv_path = .*")
- "etc_dirsrv_path = '/etc/dirsrv/'\n"))
- #t)))
+ "etc_dirsrv_path = '/etc/dirsrv/'\n")))))
(add-after 'unpack 'fix-install-location-of-python-tools
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (pythondir (string-append
- out "/lib/python"
- (python-version (assoc-ref inputs "python"))
- "/site-packages/")))
+ (let* ((out (assoc-ref outputs "out")))
;; Install directory must be on PYTHONPATH.
- (setenv "PYTHONPATH"
- (string-append (getenv "PYTHONPATH")
- ":" pythondir))
+ (add-installed-pythonpath inputs outputs)
;; Install directory must exist.
(mkdir-p pythondir)
(substitute* "src/lib389/setup.py"
(("/usr") out))
(substitute* "Makefile.am"
(("setup.py install --skip-build" m)
- (string-append m " --prefix=" out
- " --root=/
--single-version-externally-managed"))))
- #t))
+ (string-append
+ m " --prefix=" out
+ " --root=/ --single-version-externally-managed"))))))
(add-after 'build 'build-python-tools
(lambda* (#:key make-flags #:allow-other-keys)
;; Set DETERMINISTIC_BUILD to override the embedded mtime in pyc
@@ -308,27 +302,24 @@ servers from Python programs.")
;; Use deterministic hashes for strings, bytes, and datetime
;; objects.
(setenv "PYTHONHASHSEED" "0")
- (apply invoke "make" "lib389" make-flags)
- #t))
+ (apply invoke "make" "lib389" make-flags)))
(add-after 'install 'install-python-tools
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "lib389-install" make-flags)
- #t))
+ (apply invoke "make" "lib389-install" make-flags)))
(add-after 'install-python-tools 'wrap-python-tools
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (pythonpath (getenv "GUIX_PYTHONPATH")))
(for-each (lambda (file)
(wrap-program (string-append out file)
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,pythonpath))))
'("/sbin/dsconf"
"/sbin/dscreate"
"/sbin/dsctl"
"/sbin/dsidm"
"/bin/ds-logpipe.py"
"/bin/ds-replcheck"
- "/bin/readnsstate")))
- #t)))))
+ "/bin/readnsstate"))))))))
(inputs
`(("bdb" ,bdb)
("cracklib" ,cracklib)
@@ -343,7 +334,7 @@ servers from Python programs.")
("net-snmp" ,net-snmp)
("nspr" ,nspr)
("nss" ,nss)
- ("nss:bin" ,nss "bin") ; for certutil
+ ("nss:bin" ,nss "bin") ; for certutil
("openldap" ,openldap)
("openssl" ,openssl) ; #included by net-snmp
("pcre" ,pcre)
- 119/131: gnu: python-cloudpickle: Do not alter PYTHONPATH., (continued)
- 119/131: gnu: python-cloudpickle: Do not alter PYTHONPATH., guix-commits, 2021/01/29
- 124/131: gnu: seahorse-adventures: Wrap with GUIX_PYTHONPATH., guix-commits, 2021/01/29
- 118/131: gnu: gnuradio: Use GUIX_PYTHONPATH in search path., guix-commits, 2021/01/29
- 128/131: gnu: ceph: Streamline use of PYTHONPATH., guix-commits, 2021/01/29
- 90/131: gnu: python-natsort: Do not set PYTHONPATH., guix-commits, 2021/01/29
- 97/131: gnu: python-flasgger: Do not set PYTHONPATH., guix-commits, 2021/01/29
- 101/131: gnu: python-aws-xray-sdk: Do not set PYTHONPATH., guix-commits, 2021/01/29
- 107/131: gnu: python-webassets: Do not set PYTHONPATH., guix-commits, 2021/01/29
- 122/131: gnu: avogadro: Wrap with GUIX_PYTHONPATH., guix-commits, 2021/01/29
- 116/131: gnu: pypy3: Do not alter PYTHONPATH., guix-commits, 2021/01/29
- 110/131: gnu: 389-ds-base: Wrap with GUIX_PYTHONPATH.,
guix-commits <=
- 125/131: gnu: ganeti: Remove PYTHONPATH-altering patch., guix-commits, 2021/01/29