Python distutils.command.build_ext.build_ext 模块,build_extensions() 实例源码

我们从Python开源项目中,提取了以下6个代码示例,用于说明如何使用distutils.command.build_ext.build_ext.build_extensions()

项目:py_find_1st    作者:roebel    | 项目源码 | 文件源码
def build_extensions(self):
        #c = self.compiler.compiler_type
        #print "compiler attr", self.compiler.__dict__
        #print "compiler", self.compiler.compiler
        #print "compiler is",c
        try:
            if compiler_is_clang(self.compiler.compiler):
                for e in self.extensions:
                    e.extra_compile_args.append('-stdlib=libstdc++')
                    e.extra_compile_args.append('-Wno-unused-function')
                for e in self.extensions:
                    e.extra_link_args.append('-stdlib=libstdc++')
        except AttributeError:
            pass
        build_ext.build_extensions(self)
项目:deb-python-cassandra-driver    作者:openstack    | 项目源码 | 文件源码
def build_extensions(self):
        if build_concurrency > 1:
            self.check_extensions_list(self.extensions)

            import multiprocessing.pool
            multiprocessing.pool.ThreadPool(processes=build_concurrency).map(self.build_extension, self.extensions)
        else:
            build_ext.build_extensions(self)
项目:yawinpty    作者:PSoWin    | 项目源码 | 文件源码
def build_extensions(self):
        winpty_exts = [ext for ext in self.extensions if isinstance(ext, WinptyExtension)]
        if winpty_exts:
            winpty_commit_hash = check_output([cmd, '/c', r'cd winpty\src\shared && GetCommitHash.bat']).decode()
            winpty_gen_include = check_output([cmd, '/c', r'cd winpty\src\shared && UpdateGenVersion.bat {}'.format(winpty_commit_hash)]).decode()
            if winpty_gen_include[-2:] == '\r\n':
                winpty_gen_include = winpty_gen_include[:-2]

            check_call(['lib', '/nologo', '/def:winpty.def', '/out:winpty.lib'])
        for ext in winpty_exts:
            ext.include_dirs += ['winpty/src/{}'.format(winpty_gen_include)]

        build_ext.build_extensions(self)
项目:numpythia    作者:scikit-hep    | 项目源码 | 文件源码
def build_extensions(self):
        # Remove the "-Wstrict-prototypes" compiler option, which isn't valid
        # for C++.
        customize_compiler(self.compiler)
        try:
            self.compiler.compiler_so.remove('-Wstrict-prototypes')
        except (AttributeError, ValueError):
            pass
        _build_ext.build_extensions(self)
项目:chainercv    作者:chainer    | 项目源码 | 文件源码
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)
项目:python-dse-driver    作者:datastax    | 项目源码 | 文件源码
def build_extensions(self):
        if build_concurrency > 1:
            self.check_extensions_list(self.extensions)

            import multiprocessing.pool
            multiprocessing.pool.ThreadPool(processes=build_concurrency).map(self.build_extension, self.extensions)
        else:
            build_ext.build_extensions(self)