Python setuptools.command.build_ext() Examples

The following are 4 code examples of setuptools.command.build_ext(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module setuptools.command , or try the search function .
Example #1
Source File: setup.py    From pykaldi with Apache License 2.0 6 votes vote down vote up
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. 
Example #2
Source File: setup.py    From ABXpy with MIT License 5 votes vote down vote up
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()) 
Example #3
Source File: setup.py    From phyre with Apache License 2.0 5 votes vote down vote up
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') 
Example #4
Source File: setup.py    From ANTsPy with Apache License 2.0 5 votes vote down vote up
def run(self):
        self.run_command("build_ext")
        self.create_version_file()
        setuptools.command.build_py.build_py.run(self)