[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: gnu: gimp: Fix python plugin.
From: |
??? |
Subject: |
03/03: gnu: gimp: Fix python plugin. |
Date: |
Sun, 21 Aug 2016 00:37:06 +0000 (UTC) |
iyzsong pushed a commit to branch master
in repository guix.
commit 580dfc332966d9a5b4d432bac82d3dec276efbaf
Author: 宋文武 <address@hidden>
Date: Sun Aug 21 00:29:19 2016 +0800
gnu: gimp: Fix python plugin.
* 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)