当前位置: 首页>>代码示例>>Python>>正文


Python ccompiler.CCompiler方法代码示例

本文整理汇总了Python中distutils.ccompiler.CCompiler方法的典型用法代码示例。如果您正苦于以下问题:Python ccompiler.CCompiler方法的具体用法?Python ccompiler.CCompiler怎么用?Python ccompiler.CCompiler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在distutils.ccompiler的用法示例。


在下文中一共展示了ccompiler.CCompiler方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _check_compiler

# 需要导入模块: from distutils import ccompiler [as 别名]
# 或者: from distutils.ccompiler import CCompiler [as 别名]
def _check_compiler(self):
        """Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        """
        # We do this late, and only on-demand, because this is an expensive
        # import.
        from distutils.ccompiler import CCompiler, new_compiler
        if not isinstance(self.compiler, CCompiler):
            self.compiler = new_compiler(compiler=self.compiler,
                                         dry_run=self.dry_run, force=1)
            customize_compiler(self.compiler)
            if self.include_dirs:
                self.compiler.set_include_dirs(self.include_dirs)
            if self.libraries:
                self.compiler.set_libraries(self.libraries)
            if self.library_dirs:
                self.compiler.set_library_dirs(self.library_dirs) 
开发者ID:glmcdona,项目名称:meddle,代码行数:19,代码来源:config.py

示例2: _patch_for_embedding

# 需要导入模块: from distutils import ccompiler [as 别名]
# 或者: from distutils.ccompiler import CCompiler [as 别名]
def _patch_for_embedding(patchlist):
    if sys.platform == 'win32':
        # we must not remove the manifest when building for embedding!
        from distutils.msvc9compiler import MSVCCompiler
        _patch_meth(patchlist, MSVCCompiler, '_remove_visual_c_ref',
                    lambda self, manifest_file: manifest_file)

    if sys.platform == 'darwin':
        # we must not make a '-bundle', but a '-dynamiclib' instead
        from distutils.ccompiler import CCompiler
        def my_link_shared_object(self, *args, **kwds):
            if '-bundle' in self.linker_so:
                self.linker_so = list(self.linker_so)
                i = self.linker_so.index('-bundle')
                self.linker_so[i] = '-dynamiclib'
            return old_link_shared_object(self, *args, **kwds)
        old_link_shared_object = _patch_meth(patchlist, CCompiler,
                                             'link_shared_object',
                                             my_link_shared_object) 
开发者ID:reBiocoder,项目名称:bioforum,代码行数:21,代码来源:recompiler.py

示例3: _check_compiler

# 需要导入模块: from distutils import ccompiler [as 别名]
# 或者: from distutils.ccompiler import CCompiler [as 别名]
def _check_compiler (self):
        """Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        """
        # We do this late, and only on-demand, because this is an expensive
        # import.
        from distutils.ccompiler import CCompiler, new_compiler
        if not isinstance(self.compiler, CCompiler):
            self.compiler = new_compiler(compiler=self.compiler,
                                         dry_run=self.dry_run, force=1)
            customize_compiler(self.compiler)
            if self.include_dirs:
                self.compiler.set_include_dirs(self.include_dirs)
            if self.libraries:
                self.compiler.set_libraries(self.libraries)
            if self.library_dirs:
                self.compiler.set_library_dirs(self.library_dirs) 
开发者ID:ofermend,项目名称:medicare-demo,代码行数:19,代码来源:config.py


注:本文中的distutils.ccompiler.CCompiler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。