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


Python build_ext.run方法代码示例

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


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

示例1: construct_build_ext

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def construct_build_ext(build_ext):
    class WrappedBuildExt(build_ext):
        def run(self):
            try:
                build_ext.run(self)
            except BaseException as e:
                raise CompilingFailed(e)

        def build_extension(self, ext):
            try:
                build_ext.build_extension(self, ext)
            except BaseException as e:
                raise CompilingFailed(e)

    return WrappedBuildExt


# ============================================================
# SETUP
# ============================================================ 
开发者ID:msu-coinlab,项目名称:pymoo,代码行数:22,代码来源:setup.py

示例2: _build_libgraphqlparser

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def _build_libgraphqlparser():
    os.chdir("./libgraphqlparser/.")
    subprocess.run(["cmake", "."], stdout=subprocess.PIPE)
    subprocess.run(["make"], stdout=subprocess.PIPE)
    os.chdir("..")

    artifact_path = _find_libgraphqlparser_artifact()

    if not artifact_path:
        print("Libgraphqlparser compilation has failed")
        sys.exit(-1)

    os.rename(
        artifact_path,
        "tartiflette/language/parsers/libgraphqlparser/cffi/%s"
        % os.path.basename(artifact_path),
    ) 
开发者ID:tartiflette,项目名称:tartiflette,代码行数:19,代码来源:setup.py

示例3: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        monkey.patch_all()
        cmake_build_dir = None
        for ext in self.extensions:
            if isinstance(ext, UAMQPExtension):
                self.build_cmake(ext)
                # Now I have built in ext.cmake_build_dir
                cmake_build_dir = self.cmake_build_dir
            else:
                ext.library_dirs += [
                    cmake_build_dir,
                    cmake_build_dir + "/deps/azure-c-shared-utility/",
                    cmake_build_dir + "/Debug/",
                    cmake_build_dir + "/Release/",
                    cmake_build_dir + "/deps/azure-c-shared-utility/Debug/",
                    cmake_build_dir + "/deps/azure-c-shared-utility/Release/"
                ]

        if is_win and is_27:
            ext.library_dirs.extend([lib for lib in get_msvc_env(9.0)['LIB'].split(';') if lib])
            ext.library_dirs.extend(get_latest_windows_sdk())

        build_ext_orig.run(self) 
开发者ID:Azure,项目名称:azure-uamqp-python,代码行数:25,代码来源:setup.py

示例4: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        if CUDA is not None:
            def wrap_new_compiler(func):
                def _wrap_new_compiler(*args, **kwargs):
                    try:
                        return func(*args, **kwargs)
                    except errors.DistutilsPlatformError:
                        if not sys.platform == 'win32':
                            CCompiler = _UnixCCompiler
                        else:
                            CCompiler = _MSVCCompiler
                        return CCompiler(
                            None, kwargs['dry_run'], kwargs['force'])
                return _wrap_new_compiler
            ccompiler.new_compiler = wrap_new_compiler(ccompiler.new_compiler)
            # Intentionally causes DistutilsPlatformError in
            # ccompiler.new_compiler() function to hook.
            self.compiler = 'nvidia'

        setuptools_build_ext.run(self) 
开发者ID:benfred,项目名称:implicit,代码行数:22,代码来源:cuda_setup.py

示例5: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        from renku.core.commands.init import fetch_template, \
            read_template_manifest

        with TemporaryDirectory() as tempdir:
            # download and extract template data
            temppath = Path(tempdir)
            print('downloading Renku templates...')
            fetch_template(URL, REFERENCE, temppath)
            read_template_manifest(temppath, checkout=True)

            # copy templates
            current_path = Path.cwd()
            template_path = current_path / 'renku' / 'templates'
            if template_path.exists():
                shutil.rmtree(str(template_path))
            shutil.copytree(
                str(temppath),
                str(template_path),
                ignore=shutil.ignore_patterns('.git')
            ) 
开发者ID:SwissDataScienceCenter,项目名称:renku-python,代码行数:23,代码来源:setup.py

示例6: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        if not(download_and_install_wheel()):
            custom_compile(THIRD_PARTY, INTERNAL)
            install_req_wheels()
            open(BUILT_LOCAL, 'w+').close()
        print("Running install...")
        p = Process(target=install.run, args=(self,))
        p.start()
        p.join()
        print("Done running install")
        if not(download_and_install_wheel()):
            print("Running egg_install...")
            p = Process(target=install.do_egg_install, args=(self,))
            p.start()
            p.join()
            install_requirements()
            print("Done running egg_install")
        else:
            print("Skipping egg_install")
        copy_custom_compile() 
开发者ID:plasticityai,项目名称:supersqlite,代码行数:22,代码来源:setup.py

示例7: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        import pkg_resources

        # At this point we can be sure pip has already installed 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.run(self)


# Add swig-generated files to the list of things to clean, so they
# get regenerated each time. 
开发者ID:gwastro,项目名称:pycbc,代码行数:18,代码来源:setup.py

示例8: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        develop.run(self)
        if sys.platform == 'win32':
            for f in glob.glob(os.path.join('simnibs', 'lib', 'win', '*')):
                shutil.copy(
                    f,
                    os.path.join('simnibs', 'cython_code', os.path.basename(f)))
        if sys.platform == 'darwin':
            for f in glob.glob(os.path.join('simnibs', 'lib', 'osx', '*')):
                shutil.copy(
                    f,
                    os.path.join('simnibs', 'cython_code', os.path.basename(f))) 
开发者ID:simnibs,项目名称:simnibs,代码行数:14,代码来源:setup.py

示例9: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        _build_libgraphqlparser()
        build_ext.run(self) 
开发者ID:tartiflette,项目名称:tartiflette,代码行数:5,代码来源:setup.py

示例10: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        # Import numpy here, only when headers are needed
        import numpy

        # Add numpy headers to include_dirs
        self.include_dirs.append(numpy.get_include())

        # Call original build_ext command
        build_ext.run(self) 
开发者ID:dexplo,项目名称:dexplo,代码行数:11,代码来源:setup.py

示例11: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        try:
            build_ext.run(self)
        except DistutilsPlatformError as e:
            self._unavailable(e)
            self.extensions = []  # avoid copying missing files (it would fail). 
开发者ID:fossasia,项目名称:knitlib,代码行数:8,代码来源:setup.py

示例12: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        """Run build_rust sub command """
        if self.has_rust_extensions():
            log.info("running build_rust")
            build_rust = self.get_finalized_command("build_rust")
            build_rust.inplace = self.inplace
            build_rust.run()

        _build_ext.run(self) 
开发者ID:PyO3,项目名称:setuptools-rust,代码行数:11,代码来源:build_ext.py

示例13: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        return_code = subprocess.call(['make', '-C', libpg_query, 'build'])
        if return_code:
            sys.stderr.write('''
An error occurred during extension building.
Make sure you have bison and flex installed on your system.
''')
            sys.exit(return_code)
        build_ext.run(self) 
开发者ID:alculquicondor,项目名称:psqlparse,代码行数:11,代码来源:setup.py

示例14: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
            import numpy
            self.include_dirs.append(numpy.get_include())
            build_ext.run(self) 
开发者ID:hlin117,项目名称:mdlp-discretization,代码行数:6,代码来源:setup.py

示例15: run

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import run [as 别名]
def run(self):
        try:
            build_ext.run(self)
        except Exception as e:
            self._unavailable(e)
            self.extensions = []  # avoid copying missing files (it would fail). 
开发者ID:ionelmc,项目名称:python-nameless,代码行数:8,代码来源:setup.py


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