From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Subject: [PATCH] gnu: gimp: Fix python plugin. Date: Sun, 21 Aug 2016 00:32:17 +0800 Message-ID: <20160820163217.20132-1-iyzsong@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb9CA-0001gP-8M for guix-devel@gnu.org; Sat, 20 Aug 2016 12:32:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bb9C5-0000LN-Ly for guix-devel@gnu.org; Sat, 20 Aug 2016 12:32:28 -0400 Received: from mail.openmailbox.org ([62.4.1.34]:51507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb9C5-0000LD-GI for guix-devel@gnu.org; Sat, 20 Aug 2016 12:32:25 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Cc: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= * 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