Code repository: http://svn.gocept.com/
Detailed Documentation
Example usage
The value of this recipe is that its part can be referenced from other parts using the ${…} syntax. The recipe mirrors the current environment variables into its section, so that e.g. ${env:USER} will give the current user.
In addition to whatever is in the environment, UID and GID will be set to the effective user id and group id as reported by Python’s os module.
Let’s look at how this works:
>>> write('buildout.cfg',
... """
... [buildout]
... parts = env
...
... [env]
... recipe = gocept.recipe.env
... """)
This configuration references an environment variable called buildout-test-info. Lets set it so we know its value:
>>> import os >>> os.environ['buildout-test-info'] = '42'
Running the buildout gives us:
>>> print 'start', system(buildout) # doctest:+ELLIPSIS start... Installing env. <BLANKLINE>
And the installed.cfg recorded the corresponding environment value:
>>> cat('.installed.cfg')
[buildout]
...
[env]
...
GID = ...
...
UID = ...
...
buildout-test-info = 42
...
Contributors
Christian Theune <ct@gocept.com>, Author
Thomas Lotze <tl@gocept.com>, Author
Change history
1.0 (2008-07-22)
Created recipe with ZopeSkel [Christian Theune <ct@gocept.com>].
Download
Release files for gocept.recipe.env 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gocept.recipe.env-1.0.tar.gz | 4.6 kB | Details |
Release files / gocept.recipe.env-1.0.tar.gz
| Download URL | gocept.recipe.env-1.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37d4d8ebc1504560687aed3702c0f756947a9a0440f72247a937b8a1498c7f8b
|
|
BLAKE2b-256 checksum How to use checksums |
91e59694fd80aa3b19fbcea55830fa91632b234be360bc2640b80db74da902d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |