Python distutils.ccompiler.get_default_compiler() Examples
The following are 2
code examples of distutils.ccompiler.get_default_compiler().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
distutils.ccompiler
, or try the search function
.
Example #1
Source File: support.py From hpy with MIT License | 6 votes |
def _build_universal(tmpdir, ext, cpython_include_dirs): from distutils.ccompiler import new_compiler, get_default_compiler from distutils.sysconfig import customize_compiler compiler = new_compiler(get_default_compiler()) customize_compiler(compiler) include_dirs = ext.include_dirs + cpython_include_dirs objects = compiler.compile(ext.sources, output_dir=tmpdir, macros=[('HPY_UNIVERSAL_ABI', None)], include_dirs=include_dirs, extra_preargs=ext.extra_compile_args) filename = ext.name + '.hpy.so' compiler.link(compiler.SHARED_LIBRARY, objects, filename, tmpdir, extra_preargs=ext.extra_link_args, # export_symbols=... ) return os.path.join(tmpdir, filename)
Example #2
Source File: setup.py From slack-sql with MIT License | 5 votes |
def get_compiler(self): """Return the C compiler used for building the extension.""" return self.compiler or get_default_compiler()