pyccel.utilities.introspect module

pyccel.utilities.introspect module#

Module for introspecting information on Pyccel, in the codebase and the tests.

pyccel.utilities.introspect.get_compiler_info(language, conda_warnings='basic')[source]#

Extract the path to the compiler and its version, based on the language.

Extract the path to the compiler and its version, based on the language.

Parameters:
  • language (str) – The backend language for Pyccel. Accepted values are ‘C’, ‘Fortran’, and ‘Python’ (not case-sensitive).

  • conda_warnings ({'off', 'basic', 'verbose'}) – Specify the level of Conda warnings to display (default: ‘basic’).

Returns:

  • executable (str) – The path to the compiler (e.g. ‘gcc’ or ‘gfortran’). If language is Python, the executable is the current Python executable.

  • version (packaging.version.Version) – The compiler version obtained by running <executable> –version.