|
Makeprojects
|
Class to build with python scripts. More...


Public Member Functions | |
| __init__ (self, file_name, priority=None, verbose=False, function_ref=None, parms=None) | |
| Class to execute python code in a script. | |
| has_python_function (self) | |
| Return True if there's a callable python function. | |
| create_parm_string (self) | |
| Merge the command parameters into a single string. | |
| build (self) | |
| Execute a python script. | |
| clean (self) | |
| Delete temporary files. | |
| __repr__ (self) | |
| Convert the object into a string. | |
| __str__ (self) | |
| Convert the object into a string. | |
| Public Member Functions inherited from makeprojects.build_objects.BuildObject | |
| __init__ (self, file_name, priority=None, configuration=None) | |
| Initializers for an BuildObject. | |
| run_command (self, cmd, verbose) | |
| Issue a command and return the generated BuildError. | |
| __repr__ (self) | |
| Convert the object into a string. | |
| __str__ (self) | |
| Convert the object into a string. | |
Public Attributes | |
| verbose = verbose | |
| the verbose flag | |
| function_ref = function_ref | |
| Function pointer or name of function. | |
| parms = parms | |
| Parameters for function. | |
| Public Attributes inherited from makeprojects.build_objects.BuildObject | |
| file_name = os.path.abspath(file_name) | |
| Name of file to build. | |
| priority = int(priority) | |
| Numeric priorty in ascending order. | |
| configuration = configuration | |
| Configuration if applicable. | |
Class to build with python scripts.
When this object is created, it can either open a python script and invoke a specific function by name with a single parameter of the working directory, or it can be given a callable python object and a {} object that is passed to the function using the double asterisk parameter list.
If function_ref is a string, it's the entry point to the file, if it is a callable python object, it's invoked directly.
| makeprojects.python.BuildPythonFile.__init__ | ( | self, | |
| file_name, | |||
| priority = None, | |||
| verbose = False, | |||
| function_ref = None, | |||
| parms = None ) |
Class to execute python code in a script.
The file_name parameter must have the pathname to the python script so it can be tracked for debugging. If function_ref is a string, it will be used as the entry point to the python script, otherwise it has to be a callable object that accepts the parms value for the parameter list.
| file_name | Pathname to the *.py to build |
| priority | Priority to build this object |
| verbose | True if verbose output |
| function_ref | Python function pointer or name |
| parms | Parameter list to issue to the function |
| ValueError |
| makeprojects.python.BuildPythonFile.__repr__ | ( | self | ) |
Convert the object into a string.
| makeprojects.python.BuildPythonFile.__str__ | ( | self | ) |
Convert the object into a string.
| makeprojects.python.BuildPythonFile.build | ( | self | ) |
Execute a python script.
Execute either a python function, or load a python script and invoke a specific entry point. The function must return an integer error code, with zero being no error.
Reimplemented from makeprojects.build_objects.BuildObject.
| makeprojects.python.BuildPythonFile.clean | ( | self | ) |
Delete temporary files.
This function is called by ``cleanme`` to remove temporary files. On exit, return 0 for no error, or a non zero error code if there was an error to report. None if not implemented or not applicable.
Reimplemented from makeprojects.build_objects.BuildObject.
| makeprojects.python.BuildPythonFile.create_parm_string | ( | self | ) |
Merge the command parameters into a single string.
| makeprojects.python.BuildPythonFile.has_python_function | ( | self | ) |
Return True if there's a callable python function.