me
/
guix
Archived
1
0
Fork 0

gnu: python2-pygtk: Use 'modify-phases'.

* gnu/packages/gtk.scm (python2-pygtk)[arguments]: Use 'modify-phases'.
master
Ludovic Courtès 2015-12-18 10:57:53 +01:00
parent be4fbbe01b
commit ae115bc75a
1 changed files with 22 additions and 23 deletions

View File

@ -1005,20 +1005,20 @@ extensive documentation, including API reference and a tutorial.")
("gtk+" ,gtk+-2))) ("gtk+" ,gtk+-2)))
(arguments (arguments
`(#:tests? #f `(#:tests? #f
#:phases (alist-cons-after #:phases (modify-phases %standard-phases
'configure 'fix-codegen (add-after 'configure 'fix-codegen
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "pygtk-codegen-2.0" (substitute* "pygtk-codegen-2.0"
(("^prefix=.*$") (("^prefix=.*$")
(string-append (string-append
"prefix=" "prefix="
(assoc-ref inputs "python-pygobject") "\n")))) (assoc-ref inputs "python-pygobject") "\n")))))
(alist-cons-after (add-after 'install 'install-pth
'install 'install-pth
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
;; pygtk's modules are stored in a subdirectory of python's ;; pygtk's modules are stored in a subdirectory of
;; site-packages directory. Add a .pth file so that python ;; python's site-packages directory. Add a .pth file so
;; will add that subdirectory to its module search path. ;; that python will add that subdirectory to its module
;; search path.
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(site (string-append out "/lib/python" (site (string-append out "/lib/python"
,(version-major+minor ,(version-major+minor
@ -1026,8 +1026,7 @@ extensive documentation, including API reference and a tutorial.")
"/site-packages"))) "/site-packages")))
(call-with-output-file (string-append site "/pygtk.pth") (call-with-output-file (string-append site "/pygtk.pth")
(lambda (port) (lambda (port)
(format port "gtk-2.0~%"))))) (format port "gtk-2.0~%")))))))))
%standard-phases))))
(home-page "http://www.pygtk.org/") (home-page "http://www.pygtk.org/")
(synopsis "Python bindings for GTK+") (synopsis "Python bindings for GTK+")
(description (description