numpy / 1.22.0 / reference / generated / numpy.distutils.ccompiler.ccompiler_customize.html /

numpy.distutils.ccompiler.CCompiler_customize

distutils.ccompiler. CCompiler_customize ( self, dist, need_cxx=0 ) [source]

Do any platform-specific customization of a compiler instance.

This method calls distutils.sysconfig.customize_compiler for platform-specific customization, as well as optionally remove a flag to suppress spurious warnings in case C++ code is being compiled.

Parameters
dist object

This parameter is not used for anything.

need_cxx bool, optional

Whether or not C++ has to be compiled. If so (True), the "-Wstrict-prototypes" option is removed to prevent spurious warnings. Default is False.

Returns
None

Notes

All the default options used by distutils can be extracted with:

from distutils import sysconfig
sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS',
                          'CCSHARED', 'LDSHARED', 'SO')

© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.22/reference/generated/numpy.distutils.ccompiler.CCompiler_customize.html