pyccel.codegen.make_pipeline module#
Contains the execute_pyccel_make function which carries out the main steps required to execute Pyccel on a multi-file project.
- pyccel.codegen.make_pipeline.execute_pyccel_make(files, *, verbose, time_execution, folder, language, compiler_family, build_system, debug=None, accelerators, conda_warnings, build_code)[source]#
Run pyccel make on the provided files.
Translate and compile multiple Python files in a project. For each file: - Parse the Python file (syntactic stage) - Annotate the abstract syntax tree (semantic stage) - Generate the translated file(s) (codegen stage) - Generate the wrapper file (wrapper stage) - Generate the build system file (buildgen stage)
After all Python files have been processed, the “compilation stage” is run to compile the files and link them to generate executable(s) and/or shared library(s). The build system manages dependencies between the different files, and installs the executables and shared libraries in the correct locations.
- Parameters:
files (list[Path]) – The Python files to be translated.
verbose (int) – Indicates the level of verbosity.
time_execution (bool) – Show the time spent in each of Pyccel’s internal stages.
folder (str) – Path to the directory where output files are created. Generated files are created following the same folder structure as found in the folder where the command line tool is called. Default is the folder where the command line tool is called. The __pyccel__ directory is created inside this folder.
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.
build_system (str) – The build-system used to compile the generated files.
debug (bool, optional) – Indicates whether the file 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).
conda_warnings (str) – Specify the level of Conda warnings to display (choices: off, basic, verbose).
build_code (bool) – Indicates if the build commands should be run.