Xnt has a number of built in tasks to aid you in writing a simple build file.
Return a glob expansion generator of path_pattern
| Parameters: | path_pattern – pattern to expand |
|---|---|
| Return type: | generator of strings |
| Returns: | List of paths and/ or files |
Copy src to dst or copy files to dst
Copy a file or folder to a different file/folder If no src file is specified, will attempt to copy files to dst
Notice, elements of files will not be expanded before copying.
| Parameters: |
|
|---|
Move src to dst
Move (copy and remove) the source file or directory (src) to the destination file or directory (dst)
| Parameters: |
|
|---|
Make a directory with mode
Create a directory specified by dir with default mode (where supported) or with the specified mode
Notice, if the directory already exists, mkdir will log a warning and return
| Parameters: |
|
|---|
Remove a set of files
Attempt to remove all the directories given by the fileset. Before rm tries to delete each element of fileset, it attempts to expand it first using glob expansion (xnt.tasks.expandpath()), thus allowing the passing of glob elements
| Parameters: | fileset – List of files to remove |
|---|
Compress (Zip) folder
Zip the specified directory into the zip file named zipfilename
| Parameters: |
|
|---|
Write a string to file
Write the given msg to a file named tofile
Notice, echo will overwrite the file if it already exists
| Parameters: |
|
|---|
Log msg using tasks global logger
Emit the message (msg) to the xnt.tasks logger using either the default log level (INFO) or any valid specified value of logging module
| Parameters: |
|
|---|
Execute the given command, redirecting stdout and stderr to optionally given files
| Param : | command - list of command and arguments |
|---|---|
| Param : | stdout - file to redirect standard output to, if given |
| Param : | stderr - file to redirect standard error to, if given |
| Returns: | the error code of the subbed out call, $? |
Invoke xnt on another build file in a different directory
| Param : | path - to the build file (including build file) |
|---|---|
| Param : | targets - list of targets to execute |
| Param : | props - dictionary of properties to pass to the build module |
Invoke the setup.py file in the current or specified directory
| Param : | commands - list of commands and options to run/ append |
|---|---|
| Param : | dir - (optional) directory to run from |
| Returns: | the error code of the execution, $? |
Clone a Mercurial Repository
| Parameters: |
|
|---|
Pull and Update an already cloned Mercurial Repository
| Parameters: |
|
|---|
Clone a repository
| Parameters: |
|
|---|
Pull/Update a cloned repository
| Parameters: |
|
|---|
Run CVS Checkout
| Parameters: |
|
|---|
Run CVS Update
| Parameters: | path – Directory path to module to update |
|---|