[Nix-dev] Re: python search path and PyQt4&dbus
Yury G. Kudryashov
urkud+nix at ya.ru
Thu Aug 26 11:34:41 CEST 2010
Peter Simons wrote:
> Hi Yury,
>
> > PyQt4 installs file
> > $pyqt/lib/python2.6/site-packages/dbus/mainloop/qt.so but if someone
> > writes
> >
> > import dbus.mainloop.qt
> >
> > then Python finds dbus.mainloop in $pythonDBus/lib/python2.6/site-
> > packages/dbus/mainloop/__init__.py, then looks for dbus.mainloop.qt
> > *only* in $pythonDBus, not in full PYTHONPATH.
> >
> > Any ideas how to fix it?
>
> I am uncertain whether I understand the problem. Python always uses the
> entire $PYTHONPATH to locate imports. Are you sure that the path you've
> configured is correct?
1) Apply my patch.
2) Build pyqt4.
3) use PYTHONPATH from $pyqt/bin/* wrappers
4) strace python -c "import dbus.mainloop.qt". It finds dbus.mainloop in
$pythonDBus, then looks for dbus.mainloop.qt ONLY in $pythonDBus.
More information about the nix-dev
mailing list