guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: python2-pygtk: fix path to pygobject-codegen-2.0


From: Ricardo Wurmus
Subject: 01/01: gnu: python2-pygtk: fix path to pygobject-codegen-2.0
Date: Wed, 04 Mar 2015 12:30:54 +0000

rekado pushed a commit to branch master
in repository guix.

commit cb4d3d863b3fb44d97b3b568ff9e6cfe38f1f630
Author: Ricardo Wurmus <address@hidden>
Date:   Mon Mar 2 20:35:14 2015 +0100

    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 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index c79a7cd..5fc486d 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -752,20 +752,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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]