On Mon, Mar 31, 2025, 21:01 James Addison <j...@jp-hosting.net> wrote:

> ...
> I think a path forward could be to patch the matplotlib package in
> Debian so that the presence of a dist-packages/gi directory -- perhaps
> only created implicitly for the overrides -- is insufficient for the
> Python import of gi to be successful.
>
> If we can write such a patch in a way that would be suitable for other
> distributions (I do not know how they ship override files), then
> perhaps it could also be sent upstream for their consideration.
>

Thinking about this more: your code to distinguish between
gi-imported-but-empty and gi-imported successfully could be reusable to do
exactly this.

We could patch that logic into the backend_gtk* import blocks, and raise an
ImportError if we find that the module has no file.

>

Reply via email to