[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0.
From: |
Ricardo Wurmus |
Subject: |
[PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0. |
Date: |
Mon, 02 Mar 2015 20:39:47 +0100 |
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 <address@hidden>
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
- [PATCH] gnu: python2-pygtk: fix path to pygobject-codegen-2.0.,
Ricardo Wurmus <=