all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: gimp: Fix python plugin.
@ 2016-08-20 16:32 宋文武
  2016-08-21 18:20 ` GNOME Applications menu can cause crashes Kei Kebreau
  2016-08-21 19:11 ` [PATCH] gnu: gimp: Fix python plugin Leo Famulari
  0 siblings, 2 replies; 6+ messages in thread
From: 宋文武 @ 2016-08-20 16:32 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/gimp.scm (gimp)[arguments]: Add phase to
install 'sitecustomize.py'.
---
 gnu/packages/gimp.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index 7e0b54a..6540990 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -141,7 +141,23 @@ buffers.")
     (arguments
      '(#:configure-flags (list (string-append "--with-html-dir="
                                               (assoc-ref %outputs "doc")
-                                              "/share/gtk-doc/html"))))
+                                              "/share/gtk-doc/html"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-sitecustomize.py
+           ;; Install 'sitecustomize.py' into gimp's python directory to
+           ;; add pygobject and pygtk to pygimp's search path.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((pythonpath (getenv "PYTHONPATH"))
+                    (out        (assoc-ref outputs "out"))
+                    (sitecustomize.py
+                     (string-append
+                      out "/lib/gimp/2.0/python/sitecustomize.py")))
+               (call-with-output-file sitecustomize.py
+                 (lambda (port)
+                   (format port "import site~%")
+                   (format port "for dir in '~a'.split(':'):~%" pythonpath)
+                   (format port "    site.addsitedir(dir)~%")))))))))
     (inputs
      `(("babl" ,babl)
        ("glib" ,glib)
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-26 10:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-20 16:32 [PATCH] gnu: gimp: Fix python plugin 宋文武
2016-08-21 18:20 ` GNOME Applications menu can cause crashes Kei Kebreau
2016-08-21 20:28   ` Kei Kebreau
2016-08-26 10:53   ` Andy Wingo
2016-08-21 19:11 ` [PATCH] gnu: gimp: Fix python plugin Leo Famulari
2016-08-22 11:33   ` 宋文武

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.