本文整理汇总了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.
示例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())
示例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')
示例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)