Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python missing gi package?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
johnklug
n00b
n00b


Joined: 17 Jun 2013
Posts: 31

PostPosted: Sun Aug 14, 2016 3:39 am    Post subject: Python missing gi package? Reply with quote

I am trying to use a python script in the package app-misc/lirc-0.9.4a-r2.

This is the failing code:
Code:
''' Simple lirc setup tool - control part. '''
import gi
gi.require_version('Gtk', '3.0')

from gi.repository import Gtk         # pylint: disable=no-name-in-module
from gi.repository import GObject     # pylint: disable=no-name-in-module

The script is called lirc-setup, for configuring lirc. The script specifies python 3.
Code:
# /usr/lib64/python3.3/site-packages/lirc/__pycache__/mvc_control.cpython-33.pyc matches /usr/lib64/python3.3/site-packages/lirc/mvc_control.py
# code object from /usr/lib64/python3.3/site-packages/lirc/__pycache__/mvc_control.cpython-33.pyc
Traceback (most recent call last):
  File "/usr/bin/lirc-setup", line 10, in <module>
    import mvc_control
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1022, in load_module
  File "<frozen importlib._bootstrap>", line 1003, in load_module
  File "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 868, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "/usr/lib64/python3.3/site-packages/lirc/mvc_control.py", line 2, in <module>
    import gi
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1529, in _find_and_load_unlocked
ImportError: No module named 'gi'


So is there an ebuild for python3 gi? What would it be? This seems like a bug in the gentoo lirc package to me, because a dependency is missing.

[Moderator edit: changed [list] tags to [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
johnklug
n00b
n00b


Joined: 17 Jun 2013
Posts: 31

PostPosted: Mon Aug 15, 2016 4:14 am    Post subject: Reply with quote

Looks like this is a difficult script to get working.

I added the USE Flag, python_targets_python3_3 and this allowed the creation of 3.3 python libraries.
package.use:
Code:
dev-python/pygobject python_targets_python3_3
dev-python/pyyaml python_targets_python3_3


The next issue:
Code:
File "/usr/lib64/python3.3/site-packages/lirc/mvc_view.py", line 12, in <module>
    gi.require_version('Vte', '2.91')
  File "/usr/lib64/python3.3/site-packages/gi/__init__.py", line 106, in require_version
    (namespace, version))
ValueError: Namespace Vte not available for version 2.91

So this code wants llibrary, libvte, at 2.91, which is not in portage?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum