Downloads and VCS checkouts¶
Downloading files¶
batou supports downloading files via HTTP(S) or FTP, for example:
self += Download(
'http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2',
checksum='md5:7dffe775f3bea68a44f762a3490e5e28')
-
class
batou.lib.download.
Download
(url)¶ Download from the given URL (uses
urllib
orrequests
internally).
-
requests_kwargs
¶ Keyword arguments to pass to
requests
get method, e.g. to support authentication.
-
checksum
¶ Checksum of the file to be verified (required). Must be given in the format
algorithm:value
, wherealgorithm
must be a function of the hashlib stdlib module.
-
target
¶ Filename to save the download as. [Default: last component of the URL]
Mercurial¶
self += Clone('https://bitbucket.org/gocept/batou', revision='tip')
-
class
batou.lib.mercurial.
Clone
(url)¶ Clone a Mercurial repository from the given URL.
-
revision
¶ Which revision to clone. At least one of
revision
orbranch
is required. If both are given,revision
will be used.
-
branch
¶ The name of a branch to clone. At least one of
revision
orbranch
is required. If both are given,branch
will be overridden byrevision
. A clone of a named branch will be updated to the most recent upstream revision of the branch whenever batou is run.
-
target
Path to clone into (Default: workdir of parent component)
-
vcs_update
¶ Whether to update the clone with incoming changesets (Default: True). Leaving clones of source code unchanged is often desirable during development.
Git¶
self += Clone('https://github.com/Pylons/pyramid', revision='HEAD')
-
class
batou.lib.git.
Clone
(url)¶ Clone a Git repository from the given URL.
-
target
Path to clone into (Default: workdir of parent component)
-
update_unpinned
¶ Update the clone on each batou run. If False, the repository is cloned once and then never updated again. [Default: False]
Note
git.Clone
does not support specifying a revision yet.
Subversion¶
self += Checkout('https://svn.zope.org/repos/main/zopetoolkit/trunk', revision='130345')
-
class
batou.lib.svn.
Checkout
(url)¶ Check out a Subversion repository from the given URL.
-
revision
Which revision to check out (required)
-
target
Path to clone into (Default: workdir of parent component)