From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0. Date: Mon, 02 Mar 2015 20:39:47 +0100 Message-ID: <8761aj9ojg.fsf@mango.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSWC6-0006zy-2i for guix-devel@gnu.org; Mon, 02 Mar 2015 14:39:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSWC2-0001iz-TO for guix-devel@gnu.org; Mon, 02 Mar 2015 14:39:58 -0500 Received: from sender1.zohomail.com ([74.201.84.155]:30988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSWC2-0001ie-Lr for guix-devel@gnu.org; Mon, 02 Mar 2015 14:39:54 -0500 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel --=-=-= Content-Type: text/plain PyGtk comes with the deprecated pygtk-codegen-2.0 which only wraps pygobject-codegen-2.0. The attached patch fixes the prefix to this executable from the pygtk prefix to the pygobject package output. ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-python2-pygtk-fix-path-to-pygobject-codegen-2.0.patch >From 01012ecefda0842d59d1031991ddf5ea6bb75080 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 2 Mar 2015 20:35:14 +0100 Subject: [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0 * gnu/packages/gtk.scm (python2-pygtk)[arguments]: Add phase to patch the path to the pygobject-codegen-2.0 executable. --- gnu/packages/gtk.scm | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 81f912e..17235f4 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -749,20 +749,28 @@ extensive documentation, including API reference and a tutorial.") (arguments `(#:tests? #f #:phases (alist-cons-after - 'install 'install-pth - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; pygtk's modules are stored in a subdirectory of python's - ;; site-packages directory. Add a .pth file so that python - ;; will add that subdirectory to its module search path. - (let* ((out (assoc-ref outputs "out")) - (site (string-append out "/lib/python" - ,(version-major+minor - (package-version python-2)) - "/site-packages"))) - (call-with-output-file (string-append site "/pygtk.pth") - (lambda (port) - (format port "gtk-2.0~%"))))) - %standard-phases))) + 'configure 'fix-codegen + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "pygtk-codegen-2.0" + (("^prefix=.*$") + (string-append + "prefix=" + (assoc-ref inputs "python-pygobject") "\n")))) + (alist-cons-after + 'install 'install-pth + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; pygtk's modules are stored in a subdirectory of python's + ;; site-packages directory. Add a .pth file so that python + ;; will add that subdirectory to its module search path. + (let* ((out (assoc-ref outputs "out")) + (site (string-append out "/lib/python" + ,(version-major+minor + (package-version python-2)) + "/site-packages"))) + (call-with-output-file (string-append site "/pygtk.pth") + (lambda (port) + (format port "gtk-2.0~%"))))) + %standard-phases)))) (home-page "http://www.pygtk.org/") (synopsis "Python bindings for GTK+") (description -- 2.1.0 --=-=-=--