编译和安装软件或python包以及生成由makina corpus赞助的脚本或配置文件的方法。

minitage.recipe.fetch的Python项目详细描述


Introduction

鸡蛋有那些入口点:

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

您可以在Minitage的以下资源中浏览代码:

您可以使用buildout.minitagificator轻松迁移Buldouts:

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

请在以下位置查找选项:http://pypi.python.org/pypi/minitage.recipe.common#options-shared-by-all-the-recipes

  • 网址 有关如何设置共享选项的详细信息,请参见共享选项。

  • 对于静态取数器,可以在“revision”字段中精确md5sum。

  • 将unpack设置为自动解压缩下载的存档文件,例如:

    [foo]
    unpack=True
    

Detailled documentation

divide url函数测试:

- 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', '')

让我们创建一个构建配置文件:

>>> 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...

正在初始化测试环境。

>>> 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>

下载一些url、文件、git签出,其中一个位于特定签出目录和特定修订版:

>>> 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
Unused options for buildout: 'download-directory'.
Installing part.
minitage.recipe: Start checkouts
minitage.recipe: Completed dowbload of file:///tmp/buildout.test/foo.tgz in /tmp/buildout.test/parts/part/
minitage.fetchers.scm: Checkouted /tmp/buildout.test/parts/part/minitage.recipe.alt / http://git.minitage.org/git/minitage/eggs/minitage.recipe (e1f30b9d7a89572fa87fe26f8e353304532a281c) [git].
minitage.recipe: Completed dowbload of http://git.minitage.org/git/minitage/eggs/minitage.recipe in /tmp/buildout.test/parts/part/minitage.recipe.alt
minitage.fetchers.scm: Checkouted /tmp/buildout.test/parts/part/http.git.minitage.org.git.minitage.eggs.minitage.core / http://git.minitage.org/git/minitage/eggs/minitage.core (HEAD) [git].
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>
<BLANKLINE>

CHANGELOG

UP

  • fix bug on static fetching, (one upon another, content is removed)
  • fix invalid crossdevice link errors

1.38

  • fix develop link

1.37

  • fix api

1.36

  • forgot to version one file

1.35

  • splitted out from minitage.recipe

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
未调用java Spring WS-EndpointInterceptor   java JDBC连接打开还是关闭?   java如何执行嵌套for循环?   循环Java charAt方法,返回的值甚至不是字符串的一部分   使用同步的java producerconsumer   java Android ServerSocketChannel绑定到环回地址   java如何根据属性将bean与不同的实现连接起来?   java无法自动连接Spring安全实现类   用Java将数组数据写入二进制文件   java如何可以创建一个系统。出来如何防止死锁?   java从字符串中提取两种类型的文本   在Java中使用迭代器收集多个If条件   java如何以编程方式自动回复通知,如WhatsApp、Instagram   java Apache CXF/JAXRS、Felix和Jetty   java XDocReport:XDocConverterException:无法从=ODT中找到转换器   java实例化泛型抽象类的子(具体)类,其构造函数需要其他参数类   系统的java输出。出来格式(“%6f%n”,123.0);不像预期的那样   cucumber中的java未定义步骤