Buildout extension to extend only sections in parts
Project description
A buildout extension to allow any section of 'parts' to define options
which will be appended to an option of another section.
Example configuration
---------------------
[buildout]
extensions = erp5.extension.sectionextender
section-extender =
supervisor-instance:programs supervisor-program
parts =
supervisor-instance
test1-instance
test3-instance
[supervisor-instance]
recipe = collective.recipe.supervisor
[test1-instance]
recipe = recipe.foo.bar
supervisor-program = 21 test1-instance test1-instance
[test2-instance]
recipe = recipe.foo.bar2
supervisor-program = 22 test2-instance test2-instance
[test3-instance]
recipe = recipe.foo.bar3
supervisor-program = 23 test3-instance test3-instance
With this configuration, 'supervisor-program' options in
'test1-instance' and 'test3-instance' will be added to
'${supervisor-instance:programs}', but not 'test2-instance' as it's
not in 'parts'.
You can specify several sections to be extended by just adding them to
'section-extender' (one per line).
0.3.1
---
- pep8
0.3
---
- Do not assume buildout::parts to be linebreak-separated. It could be
normalized to whitespace-separated values by some other code.
0.2
---
- Improve the way to declare a section extender by having a single
option 'section-extender' and one section per line as its values.
Many thanks to Mustapha Benali for the review and suggestion.
0.1
---
- initial release
which will be appended to an option of another section.
Example configuration
---------------------
[buildout]
extensions = erp5.extension.sectionextender
section-extender =
supervisor-instance:programs supervisor-program
parts =
supervisor-instance
test1-instance
test3-instance
[supervisor-instance]
recipe = collective.recipe.supervisor
[test1-instance]
recipe = recipe.foo.bar
supervisor-program = 21 test1-instance test1-instance
[test2-instance]
recipe = recipe.foo.bar2
supervisor-program = 22 test2-instance test2-instance
[test3-instance]
recipe = recipe.foo.bar3
supervisor-program = 23 test3-instance test3-instance
With this configuration, 'supervisor-program' options in
'test1-instance' and 'test3-instance' will be added to
'${supervisor-instance:programs}', but not 'test2-instance' as it's
not in 'parts'.
You can specify several sections to be extended by just adding them to
'section-extender' (one per line).
0.3.1
---
- pep8
0.3
---
- Do not assume buildout::parts to be linebreak-separated. It could be
normalized to whitespace-separated values by some other code.
0.2
---
- Improve the way to declare a section extender by having a single
option 'section-extender' and one section per line as its values.
Many thanks to Mustapha Benali for the review and suggestion.
0.1
---
- initial release
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 erp5.extension.sectionextender-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39d5b12335dde3ced68f1c8bc8b40ea2be8f00c9ffe36e13d267b7d9ec757ab2 |
|
MD5 | 342e29225ec2d01d8017963c218e3c94 |
|
BLAKE2b-256 | 9bd0f3beec4b62e19b8dd2262f1aa0b202004366792d4ca565ad25c709c01f67 |