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


Python command.build_ext方法代码示例

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


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

示例1: run_tests

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import build_ext [as 别名]
def run_tests(self):
        from kaldi.cudamatrix import cuda_available
        if cuda_available():
            from kaldi.cudamatrix import CuDevice
            CuDevice.instantiate().set_debug_stride_mode(True)
            CuDevice.instantiate().select_gpu_id("yes")
            super(test_cuda, self).run_tests()
            CuDevice.instantiate().print_profile()
        else:
            print("CUDA not available. Running tests on CPU.")
            super(test_cuda, self).run_tests()


################################################################################
# Setup pykaldi
################################################################################

# We add a 'dummy' extension so that setuptools runs the build_ext step. 
开发者ID:pykaldi,项目名称:pykaldi,代码行数:20,代码来源:setup.py

示例2: finalize_options

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import build_ext [as 别名]
def finalize_options(self):
        setuptools.command.build_ext.build_ext.finalize_options(self)
        # Prevent numpy from thinking it is still in its setup process:
        __builtins__.__NUMPY_SETUP__ = False
        import numpy
        self.include_dirs.append(numpy.get_include()) 
开发者ID:bootphon,项目名称:ABXpy,代码行数:8,代码来源:setup.py

示例3: run

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import build_ext [as 别名]
def run(self):
        for command in BUILD_COMMANDS:
            subprocess.check_call(command, cwd='../..')
        setuptools.command.build_ext.build_ext.run(self)
        self.run_command('egg_info') 
开发者ID:facebookresearch,项目名称:phyre,代码行数:7,代码来源:setup.py

示例4: run

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


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