guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

84/163: gnu: glimpse: Use the new Guix PYTHONPATH.


From: guix-commits
Subject: 84/163: gnu: glimpse: Use the new Guix PYTHONPATH.
Date: Mon, 25 Jan 2021 02:01:38 -0500 (EST)

apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.

commit 5cd406c4e938a22fa2bf164fd49ca20fd596d50f
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 22:50:43 2021 -0500

    gnu: glimpse: Use the new Guix PYTHONPATH.
    
    * gnu/packages/gimp.scm (glimpse)
    [phases]{install-sitecustomize.py}: Use the new Guix PYTHONPATH.
---
 gnu/packages/gimp.scm | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index ad19284..368e85e 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -563,7 +563,12 @@ transferring the style of an image.")
     (outputs '("out"
                "doc"))                            ; 9 MiB of gtk-doc HTML
     (arguments
-     '(#:configure-flags
+     '(#:imported-modules ,(cons '(guix build python-build-system)
+                                 %gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
+                  (guix build utils))
+       #:configure-flags
        (list (string-append "--with-html-dir="
                             (assoc-ref %outputs "doc")
                             "/share/gtk-doc/html")
@@ -585,8 +590,8 @@ transferring the style of an image.")
          (add-after 'install 'install-sitecustomize.py
            ;; Install 'sitecustomize.py' into glimpse's python directory to
            ;; add pygobject and pygtk to pygimp's search path.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((pythonpath (getenv "PYTHONPATH"))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((pythonpath (guix-pythonpath inputs))
                     (out        (assoc-ref outputs "out"))
                     (sitecustomize.py
                      (string-append
@@ -594,7 +599,8 @@ transferring the style of an image.")
                (call-with-output-file sitecustomize.py
                  (lambda (port)
                    (format port "import site~%")
-                   (format port "for dir in '~a'.split(':'):~%" pythonpath)
+                   (format port "for dir in '~a'.split(':'):~%"
+                           (getenv pythonpath))
                    (format port "    site.addsitedir(dir)~%")))))))))
     (native-inputs
      `(("autoconf" ,autoconf-wrapper)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]