我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用Cython.Distutils.build_ext.build_extensions()。
def build_extensions(self): extra_compile_args = ['-w', '-Ofast'] cmd = "echo | %s -E - %s &>/dev/null" % ( self.compiler.compiler[0], " ".join(extra_compile_args)) try: subprocess.check_call(cmd, shell=True) except: extra_compile_args = ['-w', '-O3'] for e in self.extensions: e.extra_compile_args = extra_compile_args build_ext.build_extensions(self)
def build_extensions(self): customize_compiler_for_nvcc(self.compiler) build_ext.build_extensions(self)
def build_extensions(self): self.extensions = my_cythonize(self.extensions) return build_ext.build_extensions(self) # end of the custom commands section ###############################################################################
def build_extensions(self): self.check_cython_extensions(self.extensions) # Include NumPy numpy_incl = pkg_resources.resource_filename('numpy', 'core/include') for ext in self.extensions: if (hasattr(ext, 'include_dirs') and numpy_incl not in ext.include_dirs): ext.include_dirs.append(numpy_incl) _build_ext.build_extensions(self)