[PyQt] Build from source seg. faults when using --qtconf-prefix
Phil Thompson
phil at riverbankcomputing.com
Wed Dec 14 16:52:49 GMT 2016
On 12 Dec 2016, at 3:01 pm, Sebastian Eckweiler <sebastian.eckweiler at twt-gmbh.de> wrote:
>
> 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?
Read the --qtconf-prefix docs more carefully. The value you want is 'Qt'.
Phil
More information about the PyQt
mailing list