gnu: gimp: Fix python plugin.

* gnu/packages/gimp.scm (gimp)[arguments]: Add phase to
install 'sitecustomize.py'.
This commit is contained in:
宋文武 2016-08-21 00:29:19 +08:00
parent a7f05b4192
commit 580dfc3329
No known key found for this signature in database
GPG key ID: 26525665AE727D37

View file

@ -141,7 +141,23 @@ (define-public gimp
(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)