pyccel.codegen.wrap_pipeline module#
Contains the execute_pyccel_wrap function which carries out the main steps required to execute the pyccel-wrap command.
- pyccel.codegen.wrap_pipeline.execute_pyccel_wrap(fname, *, convert_only, verbose, time_execution, folder, language, compiler_family, debug, accelerators, output_name, conda_warnings)[source]#
Run Pyccel on the provided code.
Carry out the main steps required to execute Pyccel: - Parses the python file (syntactic stage) - Annotates the abstract syntax tree (semantic stage) - Generates the translated file(s) (codegen stage) - Compiles the files to generate an executable and/or a shared library.
- Parameters:
fname (Path) – Name of the stub file describing the mapping between Python and low-level code.
convert_only (bool) – Indicates whether the pipeline should stop after generating the wrapper files.
verbose (int) – Indicates the level of verbosity.
time_execution (bool) – Show the time spent in each of Pyccel’s internal stages.
folder (Path) – Path to the working directory. Default is the folder containing the file to be translated.
language (str) – The target language Pyccel is translating to.
compiler_family (str) – The compiler used to compile the generated files. This can also contain the name of a json file describing a compiler.
debug (bool) – Indicates whether the wrapper files should be compiled in debug mode. The default value is taken from the environment variable PYCCEL_DEBUG_MODE. If no such environment variable exists then the default is False.
accelerators (iterable) – Tool used to accelerate the code (e.g., OpenMP, OpenACC).
output_name (str) – Name of the generated module. Default is the same name as the translated file.
conda_warnings (str) – Specify the level of Conda warnings to display (choices: off, basic, verbose), Default is ‘basic’.