[Distutils] Can't build C++11 libraries with distutils.command.build_clib because it lacks extra_compile_args

Matthias Goerner enischte at gmail.com
Mon Feb 22 19:53:14 EST 2016


Hi!

I am trying to use distutils.command's build_clib to compile C++11 code but
had to monkey patch build_clib to support the extra_compile_args
"-std=c++11", see my_build_libraries in
http://sageregina.unhyperbolic.org/setup.py .

As you can see, it was only adding the line

            extra_postargs = build_info.get('extra_compile_args'))

to

objects = self.compiler.compile(
            sources,
            output_dir=self.build_temp,
            macros=macros,
            include_dirs=include_dirs,
            ...)


in build_clib.py. Could you make this change to distutils so that is
available for everyone and I can eventually stop monkey-patching?

Best wishes,

    Matthias Goerner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160222/269213e9/attachment.html>


More information about the Distutils-SIG mailing list