[Buildroot] python-gobject: wrong module folder

Yegor Yefremov yegorslists at googlemail.com
Wed Oct 27 12:47:58 UTC 2021


On Tue, Oct 26, 2021 at 4:50 PM Yegor Yefremov
<yegorslists at googlemail.com> wrote:
>
> While trying to build the master brunch, I have encountered the
> following runtime error:
>
> # python sample_python_gobject.py
> Traceback (most recent call last):
>   File "/root/sample_python_gobject.py", line 3, in <module>
>     from gi.repository import GLib
> ModuleNotFoundError: No module named 'gi'
>
> This output comes from the runtime-test:
>
> support/testing/run-tests -d dl -o ci_tests -k
> tests.package.test_python_gobject.TestPythonPy3Gobject
>
> During the configuration stage there is the following meson warning:
>
> Program python3 found: YES (/home/user/br/output/host/bin/python3)
> WARNING: Broken python installation detected. Python files installed
> by Meson might not be found by python interpreter.
> Found pkg-config: /home/user/br/output/host/bin/pkgconf (1.6.3)
> Dependency python found: YES (pkgconfig-fallback)
>
> The problem is that the gobject modules will be installed to
> /usr/lib/python3/dist-packages instead of
> /usr/lib/python3.9/site-package and hence cannot be found by the
> python during the runtime.
>
> Any idea what's going wrong?

I've applied the meson bump patch [1] and this puts the files into
/usr/lib/python3.9/site-packages folder.

[1] https://patchwork.ozlabs.org/project/buildroot/patch/20211025064938.2279526-1-james.hilliard1@gmail.com/

Best regards,
Yegor


More information about the buildroot mailing list