<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">
<div>Hi there,</div><div><br></div><div>thanks, I'll give it a try.</div>
<div>I guess I wouldn't have expected a seg fault when using a wrong/invalid path, though.</div>
<div>Using a qt.conf file is comparatively easy to check whether paths are correct via QLibraryInfo...</div>
<div><br></div><div>Cheers</div><div>Sebastian</div><div><br></div><font color="#990099">
-----Phil Thompson <phil@riverbankcomputing.com> schrieb: -----</font>
<div style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">
An: Sebastian Eckweiler <sebastian.eckweiler@twt-gmbh.de><br>Von: Phil Thompson <phil@riverbankcomputing.com><br>
Datum: 14.12.2016 17:53<br>Kopie: pyqt <pyqt@riverbankcomputing.com><br>
Betreff: Re: [PyQt] Build from source seg. faults when using --qtconf-prefix<br>
<br><div><font face="Courier New,Courier,monospace" size="3">On 12 Dec 2016, at 3:01 pm, Sebastian Eckweiler <sebastian.eckweiler@twt-gmbh.de> wrote:<br>
> <br>> Hi there, <br>> <br>> I'm building PyQt5 from source to work with Python 2. <br>
> Things are almost fine I was able to assemble a wheel that works. <br>
> <br>> The only issue I'm left with is the qt.conf file, i.e. Qt's paths. <br>
> 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: <br>
> <br>> import QtCore <br>> <br>> _libpath = _os.path.join(_os.path.dirname(__file__), 'Qt', 'plugins') <br>
> QtCore.QCoreApplication.setLibraryPaths([_libpath]) <br>> <br>> 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. <br>
> 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?) <br>
> <br>> So I tried including the prefix in the build via <br>> <br>
> python setup.py --qtconf-prefix=Lib/site-packages/PyQt5/Qt <br>> <br>
> while leaving the other options unchanged. <br>> Built this way however, attempting to import QtCore results in a seg-fault somewhere in QtCore.dll. <br>
> Is there anything I'm missing here, like quotes, escape-characters etc? <br>
<br>Read the --qtconf-prefix docs more carefully. The value you want is 'Qt'.<br>
<br>Phil</font></div></div></div></font>