[PyQt] PyQt5 Snapshot, build problems and their solutions, Windows, mingw
Mathias.Born at gmx.de
Mathias.Born at gmx.de
Sun May 12 21:42:23 BST 2013
Hi,
I've compiled the latest PyQt5 snaphot, on 32bit python 3.3.1 (compiled with mingw, using a self-made
build script based on scons), Windows7, Qt 5.1alpha.
I've used this configuration step:
D:\_cpp_projects_\Python\Python-3.3.1\.build_release\python.exe configure.py --no-docstrings --confirm-license -u --spec=win32-g++ --verbose --trace --sip="D:\_cpp_projects_\Python\Python-3.3.1\sip.exe" LFLAGS+="-LD:\_cpp_projects_\Python\Python-3.3.1\.build_debug -LD:\_cpp_projects_\Python\Python-3.3.1\.build_release" DEFINES+=_DEBUG
(It's necessary to include the release version of the python lib even in debug build for the designer
plugins.)
I've run into a number of problems:
(1)
PyQt's configure.py autoamtically assumes certain MS-compilers on the win32 platform, in
TargetConfiguration.__init__():262 and following:
# The default qmake spec.
if sys.platform == 'win32':
if self.py_version >= 0x030300:
#self.qmake_spec = 'win32-msvc2010'
---- self.qmake_spec = 'win32-g++'
elif self.py_version >= 0x020600:
self.qmake_spec = 'win32-msvc2008'
elif self.py_version >= 0x020400:
self.qmake_spec = 'win32-msvc.net'
else:
self.qmake_spec = 'win32-msvc'
else:
# Use the Qt default. (We may update it for MacOS/X later.)
self.qmake_spec = ''
I had to make the marked change to get around that for my mingw-based python. It would be nice
if there was an option to influence that.
[Motivation: I must embedd the python interpreter, and I want to get away from MS Visual Studio,
because it is becoming slower with each version. Hence I'll have to compile python myself using
mingw, which is non-standard.]
(2)
All makefiles attempt to build all DLLs without referring to the python DLL. Adding
"-lpython33_d" to each Makefile.Debug and "-lpython33" to Makefile.Release solves this.
I tried adding LFLAGS_DEBUG+="-lpython33_d" as parameter to the configure script, but it had
no effect on the makefiles.
(3)
The final debugging versions of the DLLs get the wrong names. They all miss the trailing "_d".
This way they can't be imported, unless manually renamed arcordingly.
Best Regards,
Mathias Born
More information about the PyQt
mailing list