Makeprojects
Loading...
Searching...
No Matches
makeprojects.cleanme Namespace Reference

Remove all temporary files in a project's folder. More...

Functions

 create_parser ()
 Create the parser to process the command line for buildme.
 add_clean_rules (projects, working_directory, file_name, args, build_rules=None)
 Add a build_rules.py to the clean list.
 add_project (projects, processed, file_name, args)
 Detect the project type and add it to the list.
 process_projects (results, projects, args)
 Process a list of projects.
 process_files (results, processed, files, args)
 Process a list of files.
 process_directories (results, processed, directories, args)
 Process a list of directories.
 process_dependencies (results, processed, dependencies, args)
 Process a mixed string list of both directories and files.
 main (working_directory=None, args=None)
 Command line shell for cleanme.

Detailed Description

Remove all temporary files in a project's folder.

Scan the current directory for the file build_rules.py and look for the function clean and call it.

Full documentation on the operation of cleanme is here.

See also
main
makeprojects.buildme
makeprojects.rebuildme

Function Documentation

◆ add_clean_rules()

makeprojects.cleanme.add_clean_rules ( projects,
working_directory,
file_name,
args,
build_rules = None )

Add a build_rules.py to the clean list.

Given a build_rules.py to parse, check for the function "clean" and use that for scanning for functions to call.

All valid entries will be appended to the projects list.

Parameters
projectsList of projects to clean.
working_directoryDirectory to perform actions on
file_namePathname to the build_rules.py file.
argsArgs for determining verbosity for output.
build_rulesPreloaded build_rules.py object.
See also
add_project

◆ add_project()

makeprojects.cleanme.add_project ( projects,
processed,
file_name,
args )

Detect the project type and add it to the list.

Parameters
projectsList of projects to build.
processedList of directories already processed.
file_namePathname to the build_rules.py file.
argsArgs for determining verbosity for output.
Returns
True if the file was buildable, False if not.

◆ create_parser()

makeprojects.cleanme.create_parser ( )

Create the parser to process the command line for buildme.

The returned object has these member variables

  • version boolean if version is requested
  • recursive boolean for directory recursion
  • verbose boolean for verbose output
  • preview boolean for previewing the clean process
  • generate_build_rules boolean create build rules and exit
  • rules_file string override build_rules.py
  • fatal boolean abort if error occurs in processing
  • directories string array of directories to process
  • files string array of project files to process
  • configurations string array of configurations to process
  • args string array of unknown parameters
Returns
argparse.ArgumentParser() object

◆ main()

makeprojects.cleanme.main ( working_directory = None,
args = None )

Command line shell for cleanme.

Entry point for the program cleanme, this function will either get the parameters from sys.argv or the paramater args.

  • --version, show version.
  • -r, Perform a recursive clean.
  • -v, Verbose output.
  • -n, Preview clean commands
  • --generate-rules, Create build_rules.py and exit.
  • --rules-file, Override the configruration file.
  • -q, Quit after the first error
  • -f, List of files to build.
  • -d, List of directories to clean.
  • -c, List of configurations to build
  • Additional terms are considered specific files or configurations to clean.
Parameters
working_directoryDirectory to operate on, or None for os.getcwd()
argsCommand line to use instead of sys.argv
Returns
Zero on no error, non-zero on error

◆ process_dependencies()

makeprojects.cleanme.process_dependencies ( results,
processed,
dependencies,
args )

Process a mixed string list of both directories and files.

Iterate over the dependencies list and test each object if it's a directory, and if so, dispatch to the directory handler, otherwise, process as a file.

Parameters
resultslist object to append BuildError objects
processedList of directories already processed.
dependenciesiterable list of files/directories to process
argsparsed argument list for verbosity
Returns
True if processing should abort, False if not.

◆ process_directories()

makeprojects.cleanme.process_directories ( results,
processed,
directories,
args )

Process a list of directories.

Parameters
resultslist object to append BuildError objects
processedList of directories already processed.
directoriesiterable list of directories to process
argsparsed argument list for verbosity
Returns
True if processing should abort, False if not.

◆ process_projects()

makeprojects.cleanme.process_projects ( results,
projects,
args )

Process a list of projects.

Sort the projects by priority and build all of them.