[PyQt] Build from source seg. faults when using --qtconf-prefix

Sebastian Eckweiler sebastian.eckweiler at twt-gmbh.de
Mon Dec 12 15:01:38 GMT 2016


Hi there,

I'm building PyQt5 from source to work with Python 2.
Things are almost fine I was able to assemble a wheel that works.

The only issue I'm left with is the qt.conf file, i.e. Qt's paths.
If I skip the --qtconf-prefix option I have to add the "plugins" folder 
manually, when importing PyQt5, e.g. by adding to PyQt5/__init__.py:

import QtCore

_libpath = _os.path.join(_os.path.dirname(__file__), 'Qt', 'plugins')
QtCore.QCoreApplication.setLibraryPaths([_libpath])

This seems to do the trick for many (all?) Qt classes so far, but it e.g. 
fails to fix the missing paths for QML components, which I'd like to use.
Since Qt's search path for a manually written qt.conf file is the folder 
of python.exe itself, I unfortunately cannot include a simple qt.conf file 
in a wheel (or can I?)

So I tried including the prefix in the build via

python setup.py --qtconf-prefix=Lib/site-packages/PyQt5/Qt

while leaving the other options unchanged.
Built this way however, attempting to import QtCore results in a seg-fault 
somewhere in QtCore.dll.
Is there anything I'm missing here, like quotes, escape-characters etc?

Cheers 
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161212/4970ac84/attachment.html>


More information about the PyQt mailing list