* [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0.
@ 2015-03-02 19:39 Ricardo Wurmus
2015-03-04 12:20 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2015-03-02 19:39 UTC (permalink / raw)
To: Guix-devel
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0.
2015-03-02 19:39 [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0 Ricardo Wurmus
@ 2015-03-04 12:20 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-03-04 12:20 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Ricardo Wurmus <rekado@elephly.net> skribis:
> 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
>
> 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.
OK!
Ludo'.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-04 12:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 19:39 [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0 Ricardo Wurmus
2015-03-04 12:20 ` Ludovic Courtès
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.