pyccel.commands.pyccel_clean module

pyccel.commands.pyccel_clean module#

Module containing scripts to remove pyccel generated objects

pyccel.commands.pyccel_clean.pyccel_clean(path_dir=None, recursive=True, remove_shared_libs=False, remove_programs=False)[source]View on GitHub#

Remove folders generated by Pyccel.

Remove __pyccel__X and __epyccel__X folders as well as any Python shared libraries from the directory path_dir. The folders __pyccel__X are called __pyccel__ unless they were generated using pytest-xdist.

Parameters:
  • path_dir (str | iter[str], default = current working directory) – The path to the folder which should be cleaned.

  • recursive (bool, default = True) – Indicates whether the function should recurse into sub-folders.

  • remove_shared_libs (bool, default = False) – Indicates whether shared libraries generated by Python should also be removed from the directory path_dir.

  • remove_programs (bool, default = False) – Indicates whether programs should also be removed from the directory path_dir.

pyccel.commands.pyccel_clean.setup_pyccel_clean_parser(parser)[source]View on GitHub#

Add the pyccel clean arguments to the parser.

Add the pyccel clean arguments to the parser for command line arguments.

Parameters:

parser (argparse.ArgumentParser) – The parser to be modified.