* Python package gaupol: Namespace Gdk not available
@ 2018-06-23 18:53 Pierre Neidhardt
2018-06-23 22:15 ` Kei Kebreau
2018-06-23 22:27 ` Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Pierre Neidhardt @ 2018-06-23 18:53 UTC (permalink / raw)
To: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 3253 bytes --]
Hi there,
I'm trying to package gaupol (https://otsaloma.io/gaupol/), a subtitle
editor.
--8<---------------cut here---------------start------------->8---
(define-public gaupol
(package
(name "gaupol")
(version "1.4")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/otsaloma/gaupol/archive/"
version ".tar.gz"))
(sha256
(base32
"12hy5x6s5xk81r75x0z4n6wpq8ygsxc4mbr47qcr0kq55kbvp6jj"))))
(build-system python-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)))
(inputs
`(("python-pygobject" ,python-pygobject)
("python-pycairo" ,python-pycairo)
("python-chardet" ,python-chardet)
("gdk-pixbuf" ,gdk-pixbuf)
("gtk+" ,gtk+)
("gtkspell3" ,gtkspell3)
("gst-libav" ,gst-libav)
("gst-plugins-base" ,gst-plugins-base)
("gst-plugins-good" ,gst-plugins-good)
("gst-plugins-bad" ,gst-plugins-bad)
("gst-plugins-ugly" ,gst-plugins-ugly)))
(arguments
`(#:tests? #f ; Tests seem to require networking.
#:phases
(modify-phases %standard-phases
;; gaupol's setup.py script does not support one of the Python build
;; system's default flags, "--single-version-externally-managed".
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(zero?
(system* "python" "setup.py" "install"
(string-append "--prefix=" (assoc-ref outputs "out"))
"--root=/")))))))
(synopsis "Editor for text-based subtitles")
(description
"Gaupol supports multiple subtitle file formats and provides means of
creating subtitles, editing texts and timing subtitles to match video. The
user interface features a builtin video player and is designed with attention
to convenience of translating and batch processing of multiple documents.")
(home-page "http://otsaloma.io/gaupol/")
(license license:gpl3+)))
--8<---------------cut here---------------end--------------->8---
The build runs fine, or so it seems. But when I try to start it:
--8<---------------cut here---------------start------------->8---
> /gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/bin/gaupol
Traceback (most recent call last):
File "/gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/bin/.gaupol-real", line 17, in <module>
import gaupol
File "/gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/lib/python3.6/site-packages/gaupol/__init__.py", line 34, in <module>
gi.require_version("Gdk", "3.0")
File "/gnu/store/7p24q6jbkzwp7cp44543mi9zzn4czgig-python-pygobject-3.28.2/lib/python3.6/site-packages/gi/__init__.py", line 130, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gdk not available
--8<---------------cut here---------------end--------------->8---
I suppose I'm missing a dependency but I can't find any reference to
python+gdk anywhere beside python-pygobject... Must be something else.
Anyone?
--
Pierre Neidhardt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Python package gaupol: Namespace Gdk not available
2018-06-23 18:53 Python package gaupol: Namespace Gdk not available Pierre Neidhardt
@ 2018-06-23 22:15 ` Kei Kebreau
2018-06-23 22:27 ` Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Kei Kebreau @ 2018-06-23 22:15 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]
Pierre Neidhardt <ambrevar@gmail.com> writes:
> Hi there,
>
> I'm trying to package gaupol (https://otsaloma.io/gaupol/), a subtitle
> editor.
>
> (define-public gaupol
[...]
> (replace 'install
> (lambda* (#:key outputs #:allow-other-keys)
> (zero?
> (system* "python" "setup.py" "install"
> (string-append "--prefix=" (assoc-ref outputs "out"))
> "--root=/")))))))
You can use 'invoke' here instead of 'zero?' with 'system*' for the same
effect.
> (synopsis "Editor for text-based subtitles")
> (description
> "Gaupol supports multiple subtitle file formats and provides means of
> creating subtitles, editing texts and timing subtitles to match video. The
> user interface features a builtin video player and is designed with attention
> to convenience of translating and batch processing of multiple documents.")
> (home-page "http://otsaloma.io/gaupol/")
> (license license:gpl3+)))
>
>
> The build runs fine, or so it seems. But when I try to start it:
>
>> /gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/bin/gaupol
> Traceback (most recent call last):
> File "/gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/bin/.gaupol-real", line 17, in <module>
> import gaupol
> File "/gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/lib/python3.6/site-packages/gaupol/__init__.py", line 34, in <module>
> gi.require_version("Gdk", "3.0")
> File "/gnu/store/7p24q6jbkzwp7cp44543mi9zzn4czgig-python-pygobject-3.28.2/lib/python3.6/site-packages/gi/__init__.py", line 130, in require_version
> raise ValueError('Namespace %s not available' % namespace)
> ValueError: Namespace Gdk not available
>
> I suppose I'm missing a dependency but I can't find any reference to
> python+gdk anywhere beside python-pygobject... Must be something else.
>
> Anyone?
My first guess would be that you need to wrap gaupol with the
environment variable "GI_TYPELIB_PATH". Take a look at the sonata
package in gnu/packages/mpd.scm for an example.
Hope this helps,
Kei
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Python package gaupol: Namespace Gdk not available
2018-06-23 18:53 Python package gaupol: Namespace Gdk not available Pierre Neidhardt
2018-06-23 22:15 ` Kei Kebreau
@ 2018-06-23 22:27 ` Ludovic Courtès
2018-06-26 10:46 ` Pierre Neidhardt
1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2018-06-23 22:27 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: guix-devel@gnu.org
Hi Pierre,
Pierre Neidhardt <ambrevar@gmail.com> skribis:
>> /gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/bin/gaupol
> Traceback (most recent call last):
> File "/gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/bin/.gaupol-real", line 17, in <module>
> import gaupol
> File "/gnu/store/gh44n7nfc7x3w8bbmq5l1glvlvycymdw-gaupol-1.4/lib/python3.6/site-packages/gaupol/__init__.py", line 34, in <module>
> gi.require_version("Gdk", "3.0")
> File "/gnu/store/7p24q6jbkzwp7cp44543mi9zzn4czgig-python-pygobject-3.28.2/lib/python3.6/site-packages/gi/__init__.py", line 130, in require_version
> raise ValueError('Namespace %s not available' % namespace)
> ValueError: Namespace Gdk not available
Could it be that you need to set GI_TYPELIB_PATH? See ‘lightdm’ as an
example.
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-06-26 10:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-23 18:53 Python package gaupol: Namespace Gdk not available Pierre Neidhardt
2018-06-23 22:15 ` Kei Kebreau
2018-06-23 22:27 ` Ludovic Courtès
2018-06-26 10:46 ` Pierre Neidhardt
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).