Buildout recipes for PasteDeploy¶
Sponsored by: | 2degrees Limited. |
---|---|
Latest release: | 1.0.1 |
Overview
DeployRecipes aims to be a collection of Buildout recipes to integrate PasteDeploy.
The recipes¶
confvars: Load options from PasteDeploy configuration files¶
The confvars recipe loads the options from a PasteDeploy configuration file into a Buildout part, so you can define variables in a single place and use them within your Buildout configuration.
The URI given must be absolute or relative to the Buildout directory.
Example¶
Say you have the following PasteDeploy config:
# /path/to/config.ini
[DEFAULT]
debug = false
[app:main]
use = egg:yourpackage
database_name = db1
database_password = passw0rd
You may want to reuse the database_name
and database_password
options
in a recipe that sets the database up. In that case, you would use a Buildout
configuration file like the one below:
[buildout]
parts = setup_db
[paste_vars]
recipe = deployrecipes:confvars
config_uri = config:/path/to/config.ini
factory_distribution = yourpackage
[setup_db]
recipe = your_recipe_to_setup_the_database
database_name = ${paste_vars:database_name}
database_password = ${paste_vars:database_password}
Or just:
[buildout]
parts = setup_db
[paste_vars]
recipe = deployrecipes:confvars
config_uri = config:/path/to/config.ini
factory_distribution = yourpackage
[setup_db]
<= paste_vars
recipe = your_recipe_to_setup_the_database
This recipe internally uses zc.recipe.egg, so you could use any of its options if you need it.
Attention
It’s mandatory to set the factory_distribution
option to the package
that provides the PasteDeploy application factory! Otherwise you will get
import errors (DistributionNotFound
).
Links¶
- Online documentation.
- Support mailing list.
- Development Web site: The place to report bugs, request features and get the source code.
More information¶
- DeployRecipes releases
- Version 1.0.1 (2015-10-30)
- Version 1.0 Final (2013-09-24)
- Version 1.0 Release Candidate 2 (2013-06-19)
- Version 1.0 Release Candidate 1 (2011-04-06)
- Version 1.0 Alpha 5 (2010-02-15)
- Version 1.0 Alpha 4 (2010-02-15)
- Version 1.0 Alpha 3 (2010-02-10)
- Version 1.0 Alpha 2 (2010-02-10)
- Version 1.0 Alpha 1 (2010-02-08)