[PyKDE] Building SIP + PyQt [3.2.2] on Mac OS X

Dimitri Papadopoulos papadopo at remove.shfj.decoy.cea.fr
Tue May 14 19:33:00 BST 2002


Hi,

This is a report on building SIP+PyQt on Mac OS X using the following:

Mac OS X 10.1.4
        I understand 10.1 is suggested by Trolltech: 
        http://www.trolltech.com/developer/platforms/osx.html

April 2002 Mac OS X Developer Tools
	I'm still using the GCC 2 compiler for now:
        http://developer.apple.com/tools/compilers.html

SIP 3.2.2
        http://www.riverbankcomputing.co.uk/download/sip/sip-3.2.2.tar.gz

PyQt 3.2.2 for Mac OS X / Qt 3.0.2 or better
        http://www.riverbankcomputing.co.uk/download/PyQt/PyQt-3.2.2-Qt-3.0.2-MacX.tar.gz

Qt/Mac evaluation version
        http://www.trolltech.com/products/qt/evaluate.html

Python for Mac OS X
        http://fink.sourceforge.net/pdb/package.php/python
        There are two versions of Python for Mac OS X:
        * the above Python for Mac OS X which can be run
          from the command line
        * the traditional MacPython that knows nothing of
          command lines and UNIX
        Because MacPython cannot be called from the command
        line and I couldn't even identify a Python executable,
        and because PyQt requires the Python executable to be
        indetified using the --with-python=FILE option, we
        were not able to configure PyQt with MacPython.
        See also paragraph "MacOS X command-line interpreter"
        on this page:
        http://www.cwi.nl/~jack/macpython.html
        I suggest you use Python for Mac OS X from Fink.


Here's how to build SIP 3.2.2:

Just follow the instructions in INSTALL.MacX:

1) First "configure", depending on how Python and Qt are set up:
        ./configure
        ./configure --with-python=/sw/bin/python
        ./configure --with-qtdir=/usr/local/qt --with-python=/sw/bin/python
2) The resulting libtool script in the top-level directory is broken,
   probably because of a bug in autoconf. Please find the line beginning
   with:
        archive_cmds="\$nonopt \$(test \\"x\$module\\" = xyes
   and change it to:
        archive_cmds="\$nonopt \$(test \"x\$module\" = xyes
   If you forget this, the build system will build *.dylib
   shared libraries instead of *.so modules or bundles.
3) Then "make".
4) Then "make install". You should probably be root for that. In any
   case that's how I work here.


Here's how to attempt to build PyQt 3.2.2:

Follow the instructions in INSTALL.MacX:

1) First "configure", depending on how Python and Qt are set up:
        ./configure
        ./configure --with-python=/sw/bin/python
        ./configure --with-qtdir=/usr/local/qt --with-python=/sw/bin/python
2) The resulting libtool script in the top-level directory is broken,
   probably because of a bug in autoconf. Please find the line beginning
   with:
        archive_cmds="\$nonopt \$(test \\"x\$module\\" = xyes
   and change it to:
        archive_cmds="\$nonopt \$(test \"x\$module\" = xyes
   If you forget this, the build system will build *.dylib
   shared libraries instead of *.so modules or bundles.
3) Then "make".
   You'll see warnings of the kind described in 
        http://mats.gmd.de/pipermail/pykde/2002-April/002540.html
        http://mats.gmd.de/pipermail/pykde/2002-April/002555.html
   and end with:
        cpp-precomp: warning: errors during smart preprocessing,
        retrying in basic mode
   These warnings can be safely ignored. They're the result of
   a harmless compiler bug:
        http://www.wxwindows.org/faqmac.htm#smarterrors
4) The build will break. It seems the build process creates
   static libraries instead of modules (bundles) or at least
   dynamic libraries as was the case before.




More information about the PyQt mailing list