all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0.
Date: Mon, 02 Mar 2015 20:39:47 +0100	[thread overview]
Message-ID: <8761aj9ojg.fsf@mango.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-python2-pygtk-fix-path-to-pygobject-codegen-2.0.patch --]
[-- Type: text/x-patch, Size: 3087 bytes --]

From 01012ecefda0842d59d1031991ddf5ea6bb75080 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
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


             reply	other threads:[~2015-03-02 19:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 19:39 Ricardo Wurmus [this message]
2015-03-04 12:20 ` [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0 Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761aj9ojg.fsf@mango.localdomain \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.