Search code examples
makefilepyqtpython-sip

Building the SIP (PyQt) on Windows


In attempt to build sip from source packages, I have the infinite loop on a building step. I run make.exe and it takes the following steps unitl I press Ctrl+Brake:

cd sipgen
make
make[1]: Entering directory `C:/sip'
cd sipgen
make
make[2]: Entering directory `C:/sip'
cd sipgen
make
make[3]: Entering directory `C:/sip'
cd sipgen
make
make[4]: Entering directory `C:/sip'
...........................................
cd sipgen
make
make[n]: Entering directory `C:/sip'
^C

Makefile in root directory contains code below:

all:
    cd sipgen
    $(MAKE)
    @cd ..
    cd siplib
    $(MAKE)
    @cd ..

install:
    cd sipgen
    $(MAKE) install
    @cd ..
    cd siplib
    $(MAKE) install
    @cd ..
    @if not exist C:\Python34\Lib\site-packages mkdir C:\Python34\Lib\site-packages
    copy /y sipconfig.py C:\Python34\Lib\site-packages\sipconfig.py
    copy /y C:\sip\sipdistutils.py C:\Python34\Lib\site-packages\sipdistutils.py

clean:
    cd sipgen
    $(MAKE) clean
    @cd ..
    cd siplib
    $(MAKE) clean
    @cd ..

Do you know the reasons? Can I solve this issue, or it impossible on Windows?

PS. Sorry for my awful English


Solution

  • I just copy the answer of another question

    If you use python configure.py, the generated Makefiles are actually nmake makefiles. nmake is Microsoft's equivalent to make. You can run it by invoking nmake in a Visual Studio command prompt, if you have that installed.

    For building with mingw, you have to indicate that you want to use that particular platform when creating the makefiles, as follows:

    python configure.py --platform win32-g++
    

    After that, invoking make works fine.

    https://stackoverflow.com/a/16051239