This module is pending deprecation. Please see Deprecation of the numba.pycc module for more information.
- class numba.pycc.CC(extension_name, source_module=None)
An object used to generate compiled extensions from Numba-compiled Python functions. extension_name is the name of the extension to be generated. source_module is the Python module containing the functions; if
None, it is inferred by examining the call stack.
CCinstances have the following attributes and methods:
(read-only attribute) The name of the extension module to be generated.
(read-write attribute) The directory the extension module will be written into. By default it is the directory the source_module is located in.
(read-write attribute) The name of the file the extension module will be written to. By default this follows the Python naming convention for the current platform.
(read-write attribute) The name of the CPU model to generate code for. This will select the appropriate instruction set extensions. By default, a generic CPU is selected in order to produce portable code.
Recognized names for this attribute depend on the current architecture and LLVM version. If you have LLVM installed,
llc -mcpu=helpwill give you a list. Examples on x86-64 are
"broadwell". You can also give the value
"host"which will select the current host CPU.
(read-write attribute) If true, print out information while compiling the extension. False by default.
- @export(exported_name, sig)
Mark the decorated function for compilation with the signature sig. The compiled function will be exposed as exported_name in the generated extension module.
All exported names within a given
CCinstance must be distinct, otherwise an exception is raised.
Compile all exported functions and generate the extension module as specified by
distutils.core.Extensioninstance allowing to integrate generation of the extension module in a conventional
setup.py-driven build process. The optional kwargs let you pass optional parameters to the
In this mode of operation, it is not necessary to call
output_filewill be ignored.