Re: Extending g-ir bindings



On Tue, Sep 27, 2011 at 12:07:41PM +0200, Tomeu Vizoso wrote:
> > If non-system installs don't work
> 
> Well, non-system installs do work, but overrides do need to be
> installed in the same prefix as pygobject is.

Well, that's what I meant, writing ‘non-system’ as a shorthand for ‘a
prefix possibly different from the prefixes of everything else’.

> > 1) Should I report it as a bug?
> 
> Yup, sounds like something that would be nice to have, but if you want
> to see it done sooner rather than later, I recommend to attach a patch
> to the bug report.

If I knew how to fix it I'd be already writing a patch.  A week ago I
did not know that the overrides mechanism exists.  Now I have some idea
how it works and where it breaks [for me] but fixing it is still beyond
my capabilities.

The core issue seems to be that

   overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])

employs the standard Python package lookup mechanism which means if it
finds gi.overrides somewhere it concludes this is where gi.overrides
resides and subsequently it only looks for the subpackages in this
directory.  It should search sys.path for each subpackage separately.
This might be fixable by adding another module finder/loader, this time
for the overrides.

Regards,

Yeti



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