Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] geis-2.2.17_9: ModuleNotFoundError: No module named 'geis'
@ 2021-11-14 15:36 pudiva
  2021-11-14 19:03 ` ericonr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pudiva @ 2021-11-14 15:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]

New issue by pudiva on void-packages repository

https://github.com/void-linux/void-packages/issues/34080

Description:
### System

* xuname: `Void 5.13.19_1 x86_64 GenuineIntel uptodate rrrrmdFFFFFF`
* package: `geis-2.2.17_9` and `geis-python3-2.2.17_9`

### Description

Hiiiii!!1 :slightly_smiling_face:

I did a `sudo xbps-install -Su` followed by `sudo xbps-install geis` and tried to run `geisview` but got an error like this:

```
$ geisview
Traceback (most recent call last):
  File "/bin/geisview", line 27, in <module>
    import geis
ModuleNotFoundError: No module named 'geis'
```

I noticed that there is a python3 package so I tried to install it as well `sudo xbps-install geis-python3` and now it complains about GTK and segfaults:

```
$ geisview
/usr/lib/python3.10/site-packages/geisview/classview.py:22: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Falha de segmentação
```

(last line means segfault)

Pythonsss :snake::snake::snake:

cc @Gottox


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: geis-2.2.17_9: ModuleNotFoundError: No module named 'geis'
  2021-11-14 15:36 [ISSUE] geis-2.2.17_9: ModuleNotFoundError: No module named 'geis' pudiva
@ 2021-11-14 19:03 ` ericonr
  2021-11-15 15:19 ` sgn
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2021-11-14 19:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/34080#issuecomment-968346014

Comment:
Can you try to capture a backtrace?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: geis-2.2.17_9: ModuleNotFoundError: No module named 'geis'
  2021-11-14 15:36 [ISSUE] geis-2.2.17_9: ModuleNotFoundError: No module named 'geis' pudiva
  2021-11-14 19:03 ` ericonr
@ 2021-11-15 15:19 ` sgn
  2021-11-15 15:35 ` sgn
  2022-06-12  2:16 ` github-actions
  3 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2021-11-15 15:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/issues/34080#issuecomment-969015066

Comment:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955869

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: geis-2.2.17_9: ModuleNotFoundError: No module named 'geis'
  2021-11-14 15:36 [ISSUE] geis-2.2.17_9: ModuleNotFoundError: No module named 'geis' pudiva
  2021-11-14 19:03 ` ericonr
  2021-11-15 15:19 ` sgn
@ 2021-11-15 15:35 ` sgn
  2022-06-12  2:16 ` github-actions
  3 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2021-11-15 15:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 10331 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/issues/34080#issuecomment-969031401

Comment:
Maybe something like this, I don't know how to test.
```diff
 ...er-and-return-type-sizes-for-64-bit-syste.patch | 134 +++++++++++++++++++++
 srcpkgs/geis/patches/gir-import.patch              |  65 ++++++++++
 srcpkgs/geis/template                              |   6 +-
 3 files changed, 204 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/geis/patches/0001-Add-parameter-and-return-type-sizes-for-64-bit-syste.patch b/srcpkgs/geis/patches/0001-Add-parameter-and-return-type-sizes-for-64-bit-syste.patch
new file mode 100644
index 0000000000..f8cbd74e7a
--- /dev/null
+++ b/srcpkgs/geis/patches/0001-Add-parameter-and-return-type-sizes-for-64-bit-syste.patch
@@ -0,0 +1,134 @@
+From fb93de8120eafbe47e37038fbcdfb1232e8daee0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernhardu@mailbox.org>
+Date: Wed, 8 May 2019 05:19:11 +0200
+Subject: [PATCH] Add parameter and return type sizes for 64 bit systems.
+
+https://bugs.debian.org/855124
+---
+ python/geis/geis_v2.py | 39 ++++++++++++++++++++++++++++++++-------
+ 1 file changed, 32 insertions(+), 7 deletions(-)
+
+diff --git a/python/geis/geis_v2.py b/python/geis/geis_v2.py
+index edd8063..793355f 100644
+--- a/python/geis/geis_v2.py
++++ b/python/geis/geis_v2.py
+@@ -62,24 +62,40 @@ try:
+     _geis_new.errcheck = _check_null
+     _geis_delete = _geis_lib.geis_delete
+     _geis_get_configuration = _geis_lib.geis_get_configuration
++    _geis_get_configuration.argtypes = [ ctypes.c_void_p, ctypes.c_char_p ]
+     _geis_dispatch_events = _geis_lib.geis_dispatch_events
++    _geis_dispatch_events.argtypes = [ ctypes.c_void_p ]
+     _geis_register_class_callback = _geis_lib.geis_register_class_callback
+     _geis_register_device_callback = _geis_lib.geis_register_device_callback
+     _geis_register_event_callback = _geis_lib.geis_register_event_callback
+     _geis_next_event = _geis_lib.geis_next_event
++    _geis_next_event.argtypes = [ ctypes.c_void_p, ctypes.c_void_p ]
+ 
+     _geis_subscription_new = _geis_lib.geis_subscription_new
+     _geis_subscription_new.restype = ctypes.c_void_p
++    _geis_subscription_new.argtypes = [ ctypes.c_void_p, ctypes.c_char_p, ctypes.c_int ]
+     _geis_subscription_new.errcheck = _check_null
+     _geis_subscription_delete = _geis_lib.geis_subscription_delete
+     _geis_subscription_activate = _geis_lib.geis_subscription_activate
++    _geis_subscription_activate.argtypes = [ ctypes.c_void_p ]
+     _geis_subscription_deactivate = _geis_lib.geis_subscription_deactivate
+     _geis_subscription_name = _geis_lib.geis_subscription_name
++    _geis_subscription_add_filter = _geis_lib.geis_subscription_add_filter
++    _geis_subscription_add_filter.argtypes = [ ctypes.c_void_p, ctypes.c_void_p ]
+ 
+     _geis_attr_name = _geis_lib.geis_attr_name
+     _geis_attr_name.restype = ctypes.c_char_p
++    _geis_attr_name.argtypes = [ ctypes.c_void_p ]
+     _geis_attr_type = _geis_lib.geis_attr_type
++    _geis_attr_type.argtypes = [ ctypes.c_void_p ]
+     _geis_attr_value_to_pointer = _geis_lib.geis_attr_value_to_pointer
++    _geis_attr_value_to_pointer.restype = ctypes.c_void_p
++    _geis_attr_value_to_pointer.argtypes = [ ctypes.c_void_p ]
++    _geis_attr_value_to_string = _geis_lib.geis_attr_value_to_string
++    _geis_attr_value_to_string.restype = ctypes.c_char_p
++    _geis_attr_value_to_string.argtypes = [ ctypes.c_void_p ]
++    _geis_attr_value_to_integer = _geis_lib.geis_attr_value_to_integer
++    _geis_attr_value_to_integer.argtypes = [ ctypes.c_void_p ]
+ 
+     _geis_event_type = _geis_lib.geis_event_type
+     _geis_event_attr_count = _geis_lib.geis_event_attr_count
+@@ -89,10 +105,14 @@ try:
+     _geis_gesture_class_unref = _geis_lib.geis_gesture_class_unref
+     _geis_gesture_class_name = _geis_lib.geis_gesture_class_name
+     _geis_gesture_class_name.restype = ctypes.c_char_p
++    _geis_gesture_class_name.argtypes = [ ctypes.c_void_p ]
+     _geis_gesture_class_id = _geis_lib.geis_gesture_class_id
++    _geis_gesture_class_id.argtypes = [ ctypes.c_void_p ]
+     _geis_gesture_class_attr_count = _geis_lib.geis_gesture_class_attr_count
++    _geis_gesture_class_attr_count.argtypes = [ ctypes.c_void_p ]
+     _geis_gesture_class_attr = _geis_lib.geis_gesture_class_attr
+     _geis_gesture_class_attr.restype = ctypes.c_void_p
++    _geis_gesture_class_attr.argtypes = [ ctypes.c_void_p ]
+ 
+     _geis_device_ref = _geis_lib.geis_device_ref
+     _geis_device_unref = _geis_lib.geis_device_unref
+@@ -125,6 +145,13 @@ try:
+     _geis_frame_is_class = _geis_lib.geis_frame_is_class
+     _geis_frame_touchid_count = _geis_lib.geis_frame_touchid_count
+     _geis_frame_touchid = _geis_lib.geis_frame_touchid
++    
++    _geis_filter_new = _geis_lib.geis_filter_new
++    _geis_filter_new.restype = ctypes.c_void_p
++    _geis_filter_new.argtypes = [ ctypes.c_void_p, ctypes.c_char_p ]
++    _geis_filter_add_term = _geis_lib.geis_filter_add_term
++    _geis_filter_add_term.argtypes = [ ctypes.c_void_p, ctypes.c_int ]
++    
+ 
+ except AttributeError as ex:
+     print(ex)
+@@ -399,7 +426,7 @@ def _attr_type_float(attr):
+ def _attr_type_integer(attr):
+     """ Extracts an attribute value as a integer.
+     """
+-    return _geis_lib.geis_attr_value_to_integer(attr)
++    return _geis_attr_value_to_integer(attr)
+ 
+ 
+ def _attr_type_pointer(attr):
+@@ -412,9 +439,7 @@ def _attr_type_pointer(attr):
+ def _attr_type_string(attr):
+     """ Extracts an attribute value as a string.
+     """
+-    geis_attr_value_to_string = _geis_lib.geis_attr_value_to_string
+-    geis_attr_value_to_string.restype = ctypes.c_char_p
+-    return geis_attr_value_to_string(attr)
++    return _geis_attr_value_to_string(attr)
+ 
+ 
+ def _attr_type_unknown(attr):
+@@ -568,7 +593,7 @@ class Filter(object):
+     """
+ 
+     def __init__(self, geis, name):
+-        self._filter  = _geis_lib.geis_filter_new(geis, name.encode('utf-8'))
++        self._filter  = _geis_filter_new(geis, name.encode('utf-8'))
+ 
+     def __del__(self):
+         _geis_lib.geis_filter_delete(self._filter)
+@@ -592,7 +617,7 @@ class Filter(object):
+             if len(term) != 3:
+                 raise ValueError('invalid filter term')
+             name, op, value = term
+-            _geis_lib.geis_filter_add_term(self._filter, facility,
++            _geis_filter_add_term(self._filter, facility,
+                                            name.encode('utf-8'), op, value, 0)
+ 
+ 
+@@ -643,7 +668,7 @@ class Subscription(object):
+         # keep a reference to the filter for Python doesn't garbage collect it
+         if filt not in self._filters:
+             self._filters.append(filt)
+-        _geis_lib.geis_subscription_add_filter(self._sub, filt)
++        _geis_subscription_add_filter(self._sub, filt)
+ 
+     def remove_filter(self, filt):
+         """ Removes a filter from the subscription.
+-- 
+2.11.0
+
diff --git a/srcpkgs/geis/patches/gir-import.patch b/srcpkgs/geis/patches/gir-import.patch
new file mode 100644
index 0000000000..049cf2a927
--- /dev/null
+++ b/srcpkgs/geis/patches/gir-import.patch
@@ -0,0 +1,65 @@
+Index: geis-2.2.17/python/pygeis
+===================================================================
+--- geis-2.2.17.orig/python/pygeis
++++ geis-2.2.17/python/pygeis
+@@ -21,6 +21,8 @@
+ 
+ import argparse
+ import geis
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import GLib
+ import sys
+ 
+Index: geis-2.2.17/tools/geisview/classview.py
+===================================================================
+--- geis-2.2.17.orig/tools/geisview/classview.py
++++ geis-2.2.17/tools/geisview/classview.py
+@@ -19,6 +19,8 @@
+ 
+ 
+ 
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+ 
+ class GestureClassView(Gtk.Window):
+Index: geis-2.2.17/tools/geisview/deviceview.py
+===================================================================
+--- geis-2.2.17.orig/tools/geisview/deviceview.py
++++ geis-2.2.17/tools/geisview/deviceview.py
+@@ -19,6 +19,8 @@
+ 
+ 
+ 
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+ 
+ class DeviceView(Gtk.Window):
+Index: geis-2.2.17/tools/geisview/filter_definition.py
+===================================================================
+--- geis-2.2.17.orig/tools/geisview/filter_definition.py
++++ geis-2.2.17/tools/geisview/filter_definition.py
+@@ -22,6 +22,8 @@
+ import geis
+ import geisview.defaults
+ import os
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+ 
+ # A list of filter facilities to choose from
+Index: geis-2.2.17/tools/geisview/filter_list.py
+===================================================================
+--- geis-2.2.17.orig/tools/geisview/filter_list.py
++++ geis-2.2.17/tools/geisview/filter_list.py
+@@ -22,6 +22,8 @@
+ import geisview.defaults
+ import geisview.filter_definition
+ import os
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+ 
+ class FilterList(object):
diff --git a/srcpkgs/geis/template b/srcpkgs/geis/template
index 9f4fdba8dd..329d27b7dd 100644
--- a/srcpkgs/geis/template
+++ b/srcpkgs/geis/template
@@ -5,7 +5,8 @@ revision=9
 build_style="gnu-configure"
 configure_args="--disable-static"
 hostmakedepends="pkg-config python3-devel"
-makedepends="dbus-devel grail-devel frame-devel libXi-devel python3-devel xorg-server-devel"
+makedepends="dbus-devel grail-devel frame-devel libXi-devel python3-devel
+ xorg-server-devel"
 short_desc="Gesture Engine Interface and Support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-only"
@@ -28,8 +29,11 @@ geis-devel_package() {
 }
 geis-python3_package() {
 	short_desc+=" - Python3 bindings"
+	depends="python3-gobject geis"
 	pkg_install() {
+		vmove usr/bin/geisview
 		vmove usr/bin/pygeis
+		vmove usr/share/man/man1/geisview.1
 		vmove usr/share/man/man1/pygeis.1
 		vmove usr/lib/python3*
 	}
```

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: geis-2.2.17_9: ModuleNotFoundError: No module named 'geis'
  2021-11-14 15:36 [ISSUE] geis-2.2.17_9: ModuleNotFoundError: No module named 'geis' pudiva
                   ` (2 preceding siblings ...)
  2021-11-15 15:35 ` sgn
@ 2022-06-12  2:16 ` github-actions
  3 siblings, 0 replies; 5+ messages in thread
From: github-actions @ 2022-06-12  2:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/issues/34080#issuecomment-1153048623

Comment:
Issues become stale 90 days after last activity and are closed 14 days after that.  If this issue is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-12  2:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14 15:36 [ISSUE] geis-2.2.17_9: ModuleNotFoundError: No module named 'geis' pudiva
2021-11-14 19:03 ` ericonr
2021-11-15 15:19 ` sgn
2021-11-15 15:35 ` sgn
2022-06-12  2:16 ` github-actions

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 NNTP newsgroup(s).