[PyQt] sipdistutils.py - adding custom options to the sip build command

Stefano Brilli cyber at develer.com
Fri Apr 24 19:28:14 BST 2009


Hi,

While using sipdistutils.py I noticed that it is not possible to add the
"-e" flag to the sip build command. So I did a little change in
sipdistutils.py

I would like to contribute with this patch.

(And this is a small using example)

--------------------- setup.py -----------------------
from distutils.core import setup
from distutils.extension import Extension
import sipdistutils
import os
import sys

sipdistutils.additional_sip_options.append('-e')

undef_macros = [NDEBUG]

macros = [("USE_PYMALLOC", "0")]

libs = []
    
setup(
  name = 'foobar',
  ext_modules=[
    Extension("foobar",
              [
                "sip/_foobar.sip",
                "foobar.cpp",
              ],

              depends =
              [
                "sip/_foobar.sip",
                "foobar.cpp",
              ],

              include_dirs=["."],
              define_macros=macros,

              library_dirs=[],
              libraries=libs,

              undef_macros=undef_macros,
        ),
    ],
  cmdclass = {'build_ext': sipdistutils.build_ext}
)
-----------------------------------------------------


Thanks,
Stefano Brilli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sipdistutils.diff
Type: text/x-patch
Size: 655 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090424/545e964a/sipdistutils.bin


More information about the PyQt mailing list