skip to navigation
skip to content

Not Logged In

pyant 0.0.7

ant by python

Tool Ant by python

Usage of pyant

Usage: parser.py [options] [target1, target2]

ANT by Python

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -f BUILDFILE, --file=BUILDFILE, --buildfile=BUILDFILE
                        use given buildfile
  -q, --quiet           be extra quiet
  -S, --silent          print nothing but task outputs and build failures
  -v, --verbose         be extra verbose
  -d, --debug           print debugging information
  -l LOGFILE, --log-file=LOGFILE
                        use given file for log
  -t LOGTYPE, --log-type=LOGTYPE
                        type of log classic, simple default simple
  -n, --no_action       only print targets and tasks
  -L, --list            print list of target
  -?, --doc             print help of element

Reference element

antcall

Call another target within the same buildfile

name of element : antcall

Attribute Information Required
target the target to execute Yes
inheritAll pass all properties .Default true  

apidoc

execute of sphinx-apidoc compilation name of element : apidoc

Attribute Information Required
destdir default doc/source  
module module path Yes
options members (add undoc-members,show-inheritance)  
dir working dir default(.)  
stdout print stdout default false  
stderr print stderr default true  

You can use element arg for add parameter of compilation

arg

a add argument

name of element : arg

Attribute Information Required
value value of argument Yes

attachments

use with element mail

name of element : attachments

Attribute Information Required
value or cdata  

available

Sets a property if a resource is available at runtime

name of element : available

Attribute Information Required
property the name of property Yes
value the value set the property to. Default true  
notvalue the value not set the property. Default false  
file the file to look for Yes
type type of file (dir,file or all). Default all  

cc

use with element mail

name of element : cc

Attribute Information Required
address email address  

ccc

use with element mail

name of element : bcc

Attribute Information Required
address email address  

chdir

Change the current directory

name of element : chdir

Attribute Information Required
dir the directory for current directory Yes

checksum

set property with checksum of file

name of element : checksum

Attribute Information Required
file the file for checksum Yes
property property with value checksum Yes
failonerror stop if failure to move default false  

chmod

changes permissions of a file or all files inside specified directories

name of element : chmod

Attribute Information Required
dir directory which files or directory changed Yes(1)
file the file or single directory changed Yes(1)
glob pattern Yes(1)
perm new permission Yes
failonerror stop if failure to changed default false  

(1): At least one of the three

List of permission:

  • S_IRWXU Mask for file owner permissions.
  • S_IRUSR Owner has read permission.
  • S_IWUSR Owner has write permission.
  • S_IXUSR Owner has execute permission.
  • S_IRWXG Mask for group permissions.
  • S_IRGRP Group has read permission.
  • S_IWGRP Group has write permission.
  • S_IXGRP Group has execute permission.
  • S_IRWXO Mask for permissions for others (not in group).
  • S_IROTH Others have read permission.
  • S_IWOTH Others have write permission.
  • S_IXOTH Others have execute permission.
  • S_ENFMT System V file locking enforcement.
  • S_IREAD Unix V7 synonym for S_IRUSR.
  • S_IWRITE Unix V7 synonym for S_IWUSR.
  • S_IEXEC Unix V7 synonym for S_IXUSR.
  • UF_NODUMP Do not dump the file.
  • UF_IMMUTABLE The file may not be changed.
  • UF_APPEND The file may only be appended to.
  • UF_OPAQUE The directory is opaque when viewed through a union stack.
  • UF_NOUNLINK The file may not be renamed or deleted.
  • SF_ARCHIVED The file may be archived.
  • SF_IMMUTABLE The file may not be changed.
  • SF_APPEND The file may only be appended to.
  • SF_NOUNLINK The file may not be renamed or deleted.
  • SF_SNAPSHOT The file is a snapshot file.

chown

changes the owner of a file or all files inside specified directories

name of element : chown

Attribute Information Required
dir directory which files or directory changed Yes(1)
file the file or single directory changed Yes(1)
glob pattern Yes(1)
owner new owner (uid,gid) Yes
failonerror stop if failure to changed default false  

(1): At least one of the three

copy

copy file or directory in other directory

name of element : copy

Attribute Information Required
file the file or single directory to copy Yes(1)
glob pattern Yes(1)
todir the directory to copy to Yes
failonerror stop if failure to move default false  

(1): At least one of the two

delete

Deletes a single file, a specified directory and all its files and subdirectories

name of element : delete

Attribute Information Required
dir the directory to delete Yes(1)
file the file to delete Yes(1)
glob pattern to delete Yes(1)
failonerror stop if failure to delete default false  
recursive from basedir default false  

(1): At least one of the three

echo

Echoes a message to the current loggers

name of element : echo

Attribute Information Required
message message print (or cdata)  
level default note (note, error, warning, info,  
verbose, debug)    
msgbox view message in msgbox (default: false)  
file output message in file  
append append to an existing file (default: false)  

environ

append path to environ

name of element : environ

Attribute Information Required
directory directory to modified Yes
path path to append in directory default .  

exec

a task executes a system command

name of element : exec

Attribute Information Required
executable the command without arguments Yes
dir working dir default(.)  
timeout only python3  
stdout print stdout default true  
stderr print stderr default true  

You can add line arguments by elements arg

fail

fail stop ant

name of element : fail

Attribute Information Required
message message of exception  

from

use with element mail

name of element : from

Attribute Information Required
address email address  

get

get file from url

name of element : get

Attribute Information Required
src the url Yes
dest file store the retrieved file Yes
server server for basic authentification  
username user for basic authentification  
password password for basic authentification  
failonerror stop if failure default true  

You can use element param for add parameter of url

gunzip

extract archive gzip

name of element : gunzip

Attribute Information Required
src the zip-file Yes
dest the directory for extract  

gzip

Create a gzip archive

name of element : gzip

Attribute Information Required
destfile the zip-file to create Yes
src the file to gzip Yes

if

test condition and load tasks son

name of element : if

Attribute Information Required
condition default true  

it’s not authorized that use if in if

import

a task for import module python

name of element : import

Attribute Information Required
module name of module for import Yes
path add path to pythonpath  
failonerror stop if failure to sleep default false  

input

a task for create property with value by input

name of element : input

Attribute Information Required
property name of property Yes
message the message which gets displayed to the user  
default value default  
global add a property a project level default false  

laps

set property deltatime between property start and now

name of element : laps

Attribute Information Required
property the property to receive now default laps  
start value true for init property default false  
message default ${laps.laps}  
level default note (note, error, warning, info,  
verbose, debug)    
file output message in file  
append append to an existing file (default false)  

loadproperties

load a file’s content properties

name of element : loadproperties

Attribute Information Required
srcFile source file Yes
prefix prefix to apply to loaded properties  

mail

to send SMTP email

name of element : mail

Attribute Information Required
from Email address of sender Yes
replyto reply to email address  
tolist list of recipient Yes
cclist list of recipient to carbon copy  
bcclist list of recipient to blind carbon copy  
message body of email  
messagefile file to send as the body of the mail  
messagemimetype default plain (possible html)  
files files to send as attachments to the email  
failonerror stop if failure default true  
mailhost host name of SMTP server default localhost  
mailport TCP port of the SMTP server default 25  
user user name for SMTP auth  
password password for SMTP auth  
ssl default false  
subject email subject fline default “pyant email”  

You can use element to, cc, bcc, replyto, message, attachments instead of attributes

message

use with element mail

name of element : message

Attribute Information Required
value or cdata  

mkdir

Create a directory and parent when necessary

name of element : mkdir

Attribute Information Required
dir the directory to create Yes
ifexist test if exist before create, default true  

move

move file or directory in other directory

name of element : move

Attribute Information Required
file the file or single directory to copy Yes(1)
glob pattern Yes(1)
todir the directory to copy to Yes(2)
tofile rename a file Yes(2)
failonerror stop if failure to move default false  

(1): At least one of the two

(2): At least one of the two

param

Add parameter for other element

name of element : param

Attribute Information Required
name name of property Yes
value default ”  
type str, int, bool, float, eval default str  

pip

execute of pip command name of element : pip

Attribute Information Required
buildername default install  
dir working dir default(.)  
stdout print stdout default false  
stderr print stderr default true  

You can use element arg for add parameter of compilation

project

A project is a container of target

name of element : project

Attribute Information Required
default target default Yes
basedir getcwd default ‘.’  
name name of project  

property

Sets a property (by name and value). Properties are case sensitive. Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variables.

name of element : property

Attribute Information Required
name name of property Yes
value default ”  
eval eval value, default false  
global add a property a project level default false  

py2exe

execute of py2exe compilation

name of element : py2exe

Attribute Information Required
action default py2exe (separated by ;)  
silent default false  
failonerror stop if failure default true  

You can use element param for add parameter of compilation or add import module (param with name import)

raise

Raise generate exception

name of element : raise

Attribute Information Required
message message of exception  

replyto

use with element mail

name of element : replyto

Attribute Information Required
address email address  

setup

execute of disutil compilation

name of element : setup

Attribute Information Required
action default install (separated by ;)  
silent default false  
failonerror stop if failure default true  

You can use element param for add parameter of compilation or add import module (param with name import)

sleep

a task for sleeping a shot period

name of element : sleep

Attribute Information Required
hours hours to add to the sleep time  
minutes minutes to add to the sleep time  
seconds seconds to add to the sleep time  
failonerror stop if failure to sleep default false  

sphinx

execute of sphinx compilation name of element : sphinx

Attribute Information Required
srcdir default doc/source  
outdir default doc/build  
buildername default html  
dir working dir default(.)  
stdout print stdout default false  
stderr print stderr default true  

You can use element arg for add parameter of compilation

sql

execute of SQL statements via module to a database

name of element : sql

Attribute Information Required
module module use for connexion Yes
query query for connexion  
property insert into property vlue of return query  
path add path to pythonpath  
failonerror stop if failure default true  

You can use element param for add parameter of connexion

sync

synchronise src and dest

name of element : sync

Attribute Information Required
src directory source Yes
dest directory destination Yes
ignore files separated by ;  
strict del file in dest if no in src default true  
failonerror stop if failure to delete default false  

tar

Create a tar archive

name of element : tar

Attribute Information Required
destfile the zip-file to create Yes
basedir the directory from which to zip the files Yes
update update a zip file if it exists default false  

target

A target is a container of tasks that cooperate to reach a desired state during the build process.

name of element : target

Attribute Information Required
name name of target Yes
depends list of target load before  
if load target if true, default true  
unless load target if false default false  
description    
error target to load if error (default ”)  

All tasks with an error management with attribute error (call target when error)

You can use the property ant.error to know the value

to

use with element mail

name of element : to

Attribute Information Required
address email address  

tstamp

set DSTAMP, TSTAMP and TODAY properties

name of element : tstamp

Attribute Information Required
property the property to receive the date/time  
pattern default %Y/%m/%d %H:%M:%S  
prefix    

untar

extract archive tar

name of element : untar

Attribute Information Required
src the zip-file Yes
dest the directory for extract Yes

unzip

unzip file zip in directory

name of element : unzip

Attribute Information Required
src the zip-file Yes
dest the directory for extract Yes

zip

Create a zipfile

name of element : zip

Attribute Information Required
destfile the zip-file to create Yes
basedir the directory from which to zip the files Yes
update update a zip file if it exists default false  
 
File Type Py Version Uploaded on Size
pyant-0.0.7.zip (md5) Source 2014-05-03 52KB
  • Downloads (All Versions):
  • 13 downloads in the last day
  • 118 downloads in the last week
  • 403 downloads in the last month