[PyQt] Building PyQt using gcc in Mingw and MSys

Theuns Heydenrych theunsheydenrych at gmail.com
Fri Mar 8 18:33:05 GMT 2013


HI
I successfully build Sip with gcc in mingw and Msys.
With the following command.

*python ./configure.py -p win32-g++ --platform=linux-g++-64*

It compiled and installed correctly with mingw32-make. The reason i used "*
--platform=linux-g++-64*" is that the *python ./configure.py **-p win32-g++
*generated Makefiles with windows commands for the install targets.

E.g. *@if not exist c:\Python27\Lib\site-packages\PyQt4 mkdir
c:\Python27\Lib\site-packages\PyQt4 *
*
*
This command fail when running *mingw32-make install* does not matter if
its executed from MSys or Windows cmd.
But when "*--platform=linux-g++-64" *is added the generated Makefiles is
created with bash command in the install target of the Makefiles.

E.g *@test -d $(DESTDIR)c:\Python27 || mkdir -p $(DESTDIR)c:\Python27 *
*
*

I had a look in the mkspecs directory of Qt and in the
mkspecs\win32-g++\qmake.conf is the following script
*!isEmpty(QMAKE_SH) {
**MINGW_IN_SHELL      = 1**
QMAKE_DIR_SEP       = /
QMAKE_QMAKE     ~= s,\\\\,/,
QMAKE_COPY      = cp
QMAKE_COPY_DIR      = cp -r
QMAKE_MOVE      = mv
QMAKE_DEL_FILE      = rm
QMAKE_MKDIR     = mkdir -p
QMAKE_DEL_DIR       = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
**} else {**
**QMAKE_COPY      = copy /y**
QMAKE_COPY_DIR      = xcopy /s /q /y /i
QMAKE_MOVE      = move
QMAKE_DEL_FILE      = del
QMAKE_MKDIR     = mkdir
QMAKE_DEL_DIR       = rmdir
QMAKE_CHK_DIR_EXISTS    = if not exist
**}*
*
*

The Makefiles generated by *python ./configure.py* have the *QMAKE_COPY =
copy* commands, i want the makefiles to contain the bash commands *QMAKE_COPY
= cp*. To have this the *QMAKE_SH*variable must be set.

   1. How do i do set the *QMAKE_SH* variable?
   2. How do i know what mkspec is being used?
   3. How do i make sure it uses *win32-g++*
   4. Or how do i configure PyQt to generate the corrrect Makfiles for
   Mingw and MSys?
   5. Does PyQt's Configure.py use values from the Compiled Sip to figure
   out platform etc?


Regards
Theun Heydenrych
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130308/9261668b/attachment.html>


More information about the PyQt mailing list