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

Bug#1059341: gir1.2-cscreensaver-1.0: contains 900K of GIR XML which shouldn't usually be necessary on end user systems



On Sat, 27 Jul 2024 at 18:13:32 +0200, Fabio Fantoni wrote:
> I tested it and found that fails on:
> 
> gi.require_version('CScreensaver', '1.0')
> 
> I did a fast search and tried GIRepository.Repository.prepend_library_path
> (after saw https://stackoverflow.com/questions/42631816/modify-gobject-load-library-path-for-python)
> but didn't work and even if work I used the fixed path that is different for
> any arch.
> 
> could you tell me the correct method to load private libraries into gi
> please? I didn't find any packages that use private gir libraries to take
> example from

I'm sorry, but I cannot provide detailed technical support for every
user of GObject-Introspection. I don't use Cinnamon myself, and I'm
responsible for too many things, so the amount of time I have available
for Cinnamon is very, very limited.

Instead of "that fails" and "didn't work", it would be more useful if you
described at a reasonable level of detail what you did, what you expected
to happen, and what actually happened.

Without really knowing what you did or what happened, and guessing that
you are writing in Python, I suspect that you need something like this
pseudocode:

    gi.require_version('GIRepository', '2.0')
    from gi.repository import GIRepository

    pkglibdir = ... directory where libcscreensaver.so is ...
    pkgtypelibdir = ... directory where CScreensaver-1.0.typelib is ...

    GIRepository.Repository.prepend_library_path(pkglibdir)
    GIRepository.Repository.prepend_search_path(pkgtypelibdir)

    gi.require_version('CScreensaver', '1.0')
    from gi.repository import CScreensaver

similar to the way it's done in
https://sources.debian.org/src/totem/43.0-3/subprojects/libgd/meson_readme.md/
or in
https://sources.debian.org/src/gnome-bluetooth3/46.0-1/tests/integration-test.py/?hl=38#L38
for example.

(Of course, to import GIRepository-2.0, you should add a dependency on
the gir1.2-girepository-2.0 package.)

    smcv


Reply to: