[PyKDE] SIP and distutils

Phil Thompson phil at riverbankcomputing.co.uk
Tue Oct 11 21:27:32 BST 2005


On Tuesday 11 October 2005 4:14 pm, Giovanni Bajo wrote:
> Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> > The main requirement for PyQt is that it must be built with exactly the
> > same flags as was used to build Qt. Hence the build system must parse the
> > qmake configuration, so any integration would involve distutils
> > extracting that information from sipconfig.py/pyqtconfig.py.
>
> I don't think this is a problem per-se. What I want is a binding which
> allows simple SIP modules to compile "out-of-the-box" with distutils. A
> simple script such this one should be sufficient to portably build,
> install, distribute simple packages:
>
> =========================================
> from distutils.core import setup
> from distutils.extension import Extension
> from sip import build_ext    # magic to bind to distutils
>
> setup(
>   name = 'foo',
>   ext_modules=[
>     Extension("foo",        ["foo.sip"]),
>     ],
>   cmdclass = {'build_ext': build_ext}
> )
> =========================================
>
> Notice that this is exactly how Pyrex works, for instance. setuptools
> (which is scheduled to be integrated into distutils for Python 2.5) already
> has transparent support for SWIG, for instance.
>
> > Note that the build system has changed with current SIP and PyQt
> > snapshots in that SIP doesn't know anything about the Qt installation
> > anymore. It would now be possible (I think) to throw away the current
> > build system an use distutils for SIP and qmake for PyQt.
>
> As a first step, I'd be happy to provide enough integration that packages
> using SIP will be able to build with distutils. Later, we can switch SIP
> itself to use distutils, if we feel it's the right thing to do. For that,
> you'll have to release at least a development snapshot with this new build
> system, so that people can work on it.

Snapshots of everything should now be up to date.

Phil




More information about the PyQt mailing list