Skip to main content

zc.buildout recipes to compile and install software or python packages and generate scripts or configuration files.

Project description

Introduction

The egg has those entry point:

  • fetch: recipe for fetching something, somewhere, with git, http, frp, static, hg, svn or bzr.

You can browse the code on minitage’s following resources:

You can migrate your buldouts without any effort with buildout.minitagificator:

minitage.recipe.fetch

Abstract

  • This recipe can be used to fetch something from somewhere to some location of your local fileystem This something can be either an url or a set of urls.

  • Thus by:

    • git

    • svn

    • ftp, http, file:// (urllib)

    • bazaar

    • mercurial

Specific options

Please look for options at : http://pypi.python.org/pypi/minitage.recipe.common#options-shared-by-all-the-recipes

  • urls See the shared options for more information on how to set them.

  • For the static fetcher, you can precise md5sum in the ‘revision’ field.

  • set unpack to automaticly unpack a downloaded archive, like:

    [foo]
    unpack=True

Detailled documentation

The divide url function test:

- If you dont precise the directory, its the basename of the url::

    >>> divide_url ('http://foo/bar|svn|666||--ignore-externals')
    ('http://foo/bar', 'svn', '666', 'http.foo.bar', '--ignore-externals')

- Static as a default::

    >>> divide_url ('')
    ('', 'static', '', '', '')

- arguements can be optionnal::

    >>> divide_url ('http://foo/bar')
    ('http://foo/bar', 'static', '', 'http.foo.bar', '')

Let’s create a buildout configuration file:

>>> rmdir(tempdir)
>>> mkdir(tempdir)
>>> cd(tempdir)
>>> a = [mkdir(d) for d in ('eggs', 'develop-eggs', 'bin', 'src')]
>>> install_develop_eggs(['minitage.recipe.fetch'])
>>> install_eggs_from_pathes(['zc.buildout'], sys.path)
>>> touch('buildout.cfg')
>>> sh('buildout -o bootstrap')
buildout -o bootstrap...

Initializing test env.

>>> if not os.path.exists('foo'):
...     mkdir('foo')
... else:
...     rmdir(foo)
...     mkdir('foo')
>>> touch('foo/configure', data ="""echo configure $@\n""")
>>> sh('chmod +x foo/configure')
c...
>>> touch('foo/Makefile',
... data = """
... all:
... \t@echo all
...
... install:
... \t@echo install
...
... """)
>>> sh('tar cfz  foo.tgz foo')
tar cfz  ...
<BLANKLINE>

Downloading some urls, files, git checkouts with one in a particular checkout directory and a particular revision:

>>> data = """
... [buildout]
... download-cache=${buildout:directory}
... parts =
...     part
... [part]
... recipe=minitage.recipe.fetch
... urls =file://${buildout:directory}/foo.tgz
...        http://git.minitage.org/git/minitage/eggs/minitage.core|git
...        http://git.minitage.org/git/minitage/eggs/minitage.recipe|git|e1f30b9d7a89572fa87fe26f8e353304532a281c|minitage.recipe.alt
... """
>>> touch('buildout.cfg', data=data)
>>> sh('bin/buildout install part')
bin/buildout  install part...
minitage.recipe: Start checkouts
minitage.recipe: Download archive
minitage.recipe: Downloading file:///tmp/buildout.test/foo.tgz in /tmp/buildout.test/parts/part/foo.tgz
minitage.recipe: Completed dowbload of file:///tmp/buildout.test/foo.tgz in /tmp/buildout.test/parts/part/
minitage.recipe: Download archive
minitage.recipe: Setting path
Initialized empty Git repository in /tmp/buildout.test/parts/part/minitage.recipe.alt/.git/
HEAD is now at e1f30b9 0.28
minitage.recipe: Completed dowbload of http://git.minitage.org/git/minitage/eggs/minitage.recipe in /tmp/buildout.test/parts/part/minitage.recipe.alt
minitage.recipe: Download archive
minitage.recipe: Setting path
Initialized empty Git repository in /tmp/buildout.test/parts/part/http.git.minitage.org.git.minitage.eggs.minitage.core/.git/
HEAD is now at ...
minitage.recipe: Completed dowbload of
http://git.minitage.org/git/minitage/eggs/minitage.core in /tmp/buildout.test/parts/part/http.git.minitage.org.git.minitage.eggs.minitage.core
minitage.recipe: Finnished checkouts...
<BLANKLINE>
g...
<BLANKLINE>

CHANGELOG

1.38

  • fix develop link

1.37

  • fix api

1.36

  • forgot to version one file

1.35

  • splitted out from minitage.recipe

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minitage.recipe.fetch-1.38.zip (17.2 kB view details)

Uploaded Source

File details

Details for the file minitage.recipe.fetch-1.38.zip.

File metadata

File hashes

Hashes for minitage.recipe.fetch-1.38.zip
Algorithm Hash digest
SHA256 71212767aadde8d3f25505c3b91826cc9cd1828f4a94dbeb0031b9bcdf309bfe
MD5 a23c40580b6c463cb4397bf2dc7c47e8
BLAKE2b-256 b46052fb1b0b7a2f55cafe33f14ee5d8506d7b3d4e23bb2b5a8245e4d80314e2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page