From: phodina via <help-guix@gnu.org>
To: help-guix <help-guix@gnu.org>
Subject: Python gi module not found
Date: Tue, 05 Oct 2021 20:52:04 +0000 [thread overview]
Message-ID: <uVgbZt7PXtOq66PvLdTe-1gBeSWPtSbtleYHZRfEOy6xMgzCyo1CrU3n3-ds2YTtaUk3-JHyzh6J38SQpCn0PQlPCzmd03lNclO7wrh3xu8=@protonmail.com> (raw)
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 other threads:[~2021-10-05 20:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='uVgbZt7PXtOq66PvLdTe-1gBeSWPtSbtleYHZRfEOy6xMgzCyo1CrU3n3-ds2YTtaUk3-JHyzh6J38SQpCn0PQlPCzmd03lNclO7wrh3xu8=@protonmail.com' \
--to=help-guix@gnu.org \
--cc=phodina@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).