help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python gi module not found


From: phodina
Subject: Python gi module not found
Date: Tue, 05 Oct 2021 20:52:04 +0000

Hi Guix,

I've put together package definition for postmarketos-tweaks. This issue comes 
up when I attempt to run the pmos-tweaks. I get this message reagrding missing 
Python module gi:

$ guix environment --pure bash
[env]$ 
/gnu/store/zsybq9wphfckhph4f6fizzs31kjsd04x-postmarketos-tweaks-0.7.3/bin/pmos-tweaks
Traceback (most recent call last):
File 
"/gnu/store/zsybq9wphfckhph4f6fizzs31kjsd04x-postmarketos-tweaks-0.7.3/bin/pmos-tweaks",
 line 17, in <module>
import gi
ModuleNotFoundError: No module named 'gi'

If I check for the module I do see it in the PYTHON_PATH:

$ environment --pure bash --ad-hoc python-pygobject python-pyyaml python

$ printenv
...
PYTHONPATH=/gnu/store/qhg0djz37c2c884v64m6287d62xsqbz2-profile/lib/python3.8/site-packages
...
$ ls 
/gnu/store/qhg0djz37c2c884v64m6287d62xsqbz2-profile/lib/python3.8/site-packages/
PyGObject-3.34.0.egg-info pip
PyYAML-5.4.1-py3.8.egg-info pip-19.2.3.dist-info
README.txt pkg_resources
__pycache__ pygtkcompat
_yaml setuptools
easy_install.py setuptools-41.2.0.dist-info
gi yaml

Any tips what to change so that the modules are imported correctly?

Petr

--8<---------------cut here---------------start------------->8---

Subject: [PATCH] gnu: Add postmarketos-tweaks.

* gnu/packages/gnome.scm (postmarketos-tweaks): New variable.

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4a311a379c..afd185480c 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -11345,6 +11345,47 @@ integrate seamlessly with the GNOME desktop.")
(home-page "https://wiki.gnome.org/Apps/Polari";)
(license license:gpl2+)))

+(define-public postmarketos-tweaks
+ (package
+ (name "postmarketos-tweaks")
+ (version "0.7.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/postmarketOS/postmarketos-tweaks";)
+ (commit version)))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "05110x0y1pvzdgzmz66fhq9bnlyym1nd7zgn61knihzp4dx3acf5"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-install-dir
+ (lambda* _
+ (substitute* "data/meson.build"
+ (("/etc/init.d") (string-append %output "/etc/init.d"))))))))
+ (native-inputs `(("pkg-config" ,pkg-config)
+ ("gtk+:bin"
+ ,gtk+ "bin") ; for gtk-update-icon-cache
+ ("glib:bin"
+ ,glib "bin") ; glib-compile-schemas, etc.
+ ("desktop-file-utils"
+ ,desktop-file-utils) ; for update-desktop-database
+ ("cmake" ,cmake)))
+ (inputs `(("libhandy" ,libhandy)
+ ("gtk+" ,gtk+)
+ ("python" ,python)
+ ("python-pygobject" ,python-pygobject)
+ ("python-pyyaml" ,python-pyyaml)))
+ (home-page "https://gitlab.com/postmarketOS/postmarketos-tweaks";)
+ (synopsis "Extra settings on mobile platforms")
+ (description "Postmarket tweaks is an application for tweaking settings
+on desktop environments supported by postmarketOS.")
+ (license license:lgpl3)))
+
(define-public gnome-boxes
(package
(name "gnome-boxes")
--
2.32.0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]