Cangjians / ibus-cangjie

An IBus engine for users of the Cangjie and Quick input methods
30 stars 14 forks source link

src/setup.py requires incorrect versions of its dependencies #94

Closed max-hk closed 4 years ago

max-hk commented 5 years ago

https://github.com/Cangjians/ibus-cangjie/blob/c96a3ac187e90b735c85e8cbc0ef57e2ae0435b9/src/setup.py#L23-L24

There are errors in setup.py which prevent setup window from loading Reinstalling ibus-cangjie doesn't fix it, but deleting line 23 and 24 of setup.py


Running setup the first time

maxloh@max:~$ /usr/bin/ibus-setup-cangjie cangjie
Traceback (most recent call last):
  File "/usr/bin/ibus-setup-cangjie", line 42, in <module>
    from ibus_cangjie.setup import Setup
  File "/usr/lib/python3/dist-packages/ibus_cangjie/setup.py", line 23, in <module>
    gi.require_version('Gio','3.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 121, in require_version
    (namespace, loaded_version))
ValueError: Namespace Gio is already loaded with version 2.0

After delete line 23,

maxloh@max:~$ /usr/bin/ibus-setup-cangjie cangjie
Traceback (most recent call last):
  File "/usr/bin/ibus-setup-cangjie", line 42, in <module>
    from ibus_cangjie.setup import Setup
  File "/usr/lib/python3/dist-packages/ibus_cangjie/setup.py", line 24, in <module>
    gi.require_version('GLib','3.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 121, in require_version
    (namespace, loaded_version))
ValueError: Namespace GLib is already loaded with version 2.0

After delete both line 23 and 24, setup runs normally.

bochecha commented 5 years ago

Woah!

So this was introduced by #90.

And it says we require GLib/Gio 3.0, which… don't exist yet? (and probably never will)

The code should require GLib/Gio 2.0, but somehow we fail to detect the problem during the review. Unfortunately we don't have any test covering the src/setup.py file so this was missed. :slightly_frowning_face:

This is pretty much a blocker, we can't release without fixing this first.

Thanks a lot for reporting this!