zc.buildout recipe to run python methods as hooks
Project description
Supported options
=================
hooks
Custom python script(s) and method(s) that will be executed.
The format of the options is::
/path/to/the/module.py:name_of_callable
where the first part is a filesystem path to the python module and
the second part is the name of the callable in the module that
will be called. The callable will be passed two parameters: the
``options`` dictionary from the recipe and the global ``buildout``
dictionary. The callable is not expected to return anything.
This code was essentially ripped out of plone.recipe.command_
and hexagonit.recipe.cmmi_
.. _plone.recipe.command : http://dev.plone.org/collective/browser/buildout/plone.recipe.command
.. _hexagonit.recipe.cmmi : http://pypi.python.org/pypi/hexagonit.recipe.cmmi
Example usage
=============
It can be helpful to define in [buildout] a::
hooks = ${buildout:directory}/hooks
then invoke like::
[your_part_section]
hooks = ${buildout:hooks}/hookfile.py:methodname
The value of 'hooks' can be a whitespace-separated list of
files:methods to specify multiple hooks that are executed in
order. You can also specify options that can be used in your
hooks. Example::
[your_part_section]
hooks = ${buildout:hooks}/hookfile1.py:methodname1
${buildout:hooks}/hookfile2.py:methodname2
${buildout:hooks}/hookfile2.py:methodname3
option1 = xyzzy
option2 = You won't get it up the stairs.
=================
hooks
Custom python script(s) and method(s) that will be executed.
The format of the options is::
/path/to/the/module.py:name_of_callable
where the first part is a filesystem path to the python module and
the second part is the name of the callable in the module that
will be called. The callable will be passed two parameters: the
``options`` dictionary from the recipe and the global ``buildout``
dictionary. The callable is not expected to return anything.
This code was essentially ripped out of plone.recipe.command_
and hexagonit.recipe.cmmi_
.. _plone.recipe.command : http://dev.plone.org/collective/browser/buildout/plone.recipe.command
.. _hexagonit.recipe.cmmi : http://pypi.python.org/pypi/hexagonit.recipe.cmmi
Example usage
=============
It can be helpful to define in [buildout] a::
hooks = ${buildout:directory}/hooks
then invoke like::
[your_part_section]
hooks = ${buildout:hooks}/hookfile.py:methodname
The value of 'hooks' can be a whitespace-separated list of
files:methods to specify multiple hooks that are executed in
order. You can also specify options that can be used in your
hooks. Example::
[your_part_section]
hooks = ${buildout:hooks}/hookfile1.py:methodname1
${buildout:hooks}/hookfile2.py:methodname2
${buildout:hooks}/hookfile2.py:methodname3
option1 = xyzzy
option2 = You won't get it up the stairs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for koansys.recipe.hooks-0.1-dev-r8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2472606a06a9f520c4aff7d9a1a898c6ad6b9899a6ad1fd38fe606079f99d800 |
|
MD5 | c1691d25b5c6d53980b1aa052a0ca165 |
|
BLAKE2b-256 | bfcb59ae6e87f955df7cc8319f7d193befc54ad5d2d887561f19520f60649f4c |