This rule executes Python scripts to create various file outputs.
pythonRule(
target,
script,
depends = NULL,
args = NULL,
python = "python",
task = "all"
)Instance of S3 class rmake.rule
Name of output files to be created
Name of the Python script to be executed
A vector of file names that the Python script depends on, or
NULL.
A string with command line arguments for the Python script.
This string may contain variables $[DEP1], $[DEP2], ..., $[TARGET1],
$[TARGET2], ... that are replaced with the corresponding file names from
depends and target. If args is NULL, the arguments are created
from the depends and target parameters, in that order.
The command to execute Python. By default, it is python, but
it can be set to a specific path or to python3 if needed.
A character vector of parent task names. The mechanism of tasks allows
grouping rules. Anything different from 'all' will cause the creation of a
new task depending on the given rule. Executing make taskname will then
force building this rule.
Michal Burda
In detail, this rule executes the following command in a shell:
python script arguments
where arguments are script arguments created from the args parameter. If
args is NULL, the arguments are created from the depends and target
parameters, in that order. If args is not NULL, it must be a string
with command line arguments that may contain variables $[DEP1], $[DEP2],
..., $[TARGET1], $[TARGET2], ... that are replaced with the corresponding
file names from depends and target.
Issuing make clean from the shell causes removal of all files specified in
the target parameter.
rule(), makefile()