[QScintilla] Invalid pyqt_mod_dir, python bindings installed incorreclty

Hans-Peter Jansen hpj at urpla.net
Wed Aug 24 22:56:20 BST 2011


On Wednesday 24 August 2011, 22:07:43 Andrei Kopats wrote:
> This bug is predictable. If some variable (PyQt installation path) is
> hardcoded in more than one place - there always are bugs. I think,
> there are the same bug in other distributions.

Obviously, your distributions packagers opted for (insanely) relocating 
these packages (after the build) for no good reason. 

And even, if they do such silly things, they should do it right, or 
patch the result to make it fit. 

> Are you sure it is impossible to use os.path.dirname(PyQt4.__file__)
> instead of pyqtconfig?

Well, I can (openSUSE):

Python 2.6.2 (r262:71600, May 25 2011, 11:48:28) 
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
--> import os.path
--> import PyQt4.pyqtconfig
--> 
--> print os.path.dirname(PyQt4.__file__)
/usr/lib/python2.6/site-packages/PyQt4
--> print PyQt4.pyqtconfig.Configuration().pyqt_mod_dir
/usr/lib/python2.6/site-packages/PyQt4

Andrei, you're barking at the wrong tree, actually.

Pete

> Andrei Kopats
> 24.08.2011 20:31 пользователь "Phil Thompson"
> <phil at riverbankcomputing.com>
>
> написал:
> > On Wed, 24 Aug 2011 20:13:10 +0300, Andrei Kopats <hlamer at tut.by> 
wrote:
> >> Hi
> >>
> >> I tried to install the last QScintilla snapshot on up to date
> >> Ubuntu
> >
> > 11.04
> >
> >> Python bindings installed to incorrect directory for me, so, it is
> >> impossible to import it. PyQt4 installed to
> >> /usr/lib/pymodules/python2.7/PyQt4, but bindings to
> >> /usr/lib/python2.7/dist-packages/PyQt4
> >>
> >> Here is simple test:
> >> import os.path
> >> import PyQt4.pyqtconfig
> >>
> >> print os.path.dirname(PyQt4.__file__)
> >> print PyQt4.pyqtconfig.Configuration().pyqt_mod_dir
> >>
> >>
> >> Output:
> >> /usr/lib/pymodules/python2.7/PyQt4
> >> /usr/lib/python2.7/dist-packages/PyQt4
> >>
> >> I don't know, if it is bug of Ubuntu or of QScintilla, but, maybe
> >> you
> >
> > could
> >
> >> use os.path.dirname(PyQt4.__file__) as installation path?
> >>
> >> Andrei Kopats
> >
> > If pyqtconfig says that PyQt4 is installed in one directory but it
> > is actually installed in another then that would suggest a bug in
> > Ubuntu's PyQt package.
> >
> > Phil




More information about the QScintilla mailing list