Creates a unified directory structure of all namespace packages, symlinking to the actual contents, in order to ease navigation.
Project description
Code repository: http://svn.plone.org/svn/collective/buildout/collective.recipe.omelette/trunk
Change history
0.1 (2008-03-10)
Initial basic implementation. [davisagli]
Created recipe with ZopeSkel. [davisagli]
Detailed Documentation
Introduction
Namespace packages offer the huge benefit of being able to distribute parts of a large system in small, self-contained pieces. However, they can be somewhat clunky to navigate, since you end up with a large list of eggs in your egg cache, and then a seemingly endless series of directories you need to open to actually find the contents of your egg.
This recipe sets up a directory structure that mirrors the actual python namespaces, with symlinks to the egg contents. So, instead of this…:
egg-cache/ my.egg.one-1.0-py2.4.egg/ my/ egg/ one/ (contents of first egg) my.egg.two-1.0-py2.4.egg/ my/ egg/ two/ (contents of second egg)
…you get this:
omelette/ my/ egg/ one/ (contents of first egg) two/ (contents of second egg)
Caveat 1: Don’t try to manually add any eggs to the omelette!
Caveat 2: This only works with filesystems that support symlinks (so no go on Windows).
Supported options
The recipe supports the following options:
- eggs
List of eggs which should be included in the omelette.
Example usage
Usage is pretty basic. The following installs a buildout and omelette featuring the setuptools egg (for the sake of example, since it has no dependencies):
>>> write('buildout.cfg', ... """ ... [buildout] ... eggs = setuptools ... parts = omelette ... ... [omelette] ... recipe = collective.recipe.omelette ... eggs = ${buildout:eggs} ... """)
Running the buildout gives us:
>>> print system(buildout) Upgraded: ... Installing omelette. <BLANKLINE>
Now we have an easily navigable link:
>>> import os >>> os.path.exists('parts/omelette/setuptools') True
And it points to the real location of the egg’s contents:
>>> os.readlink('parts/omelette/setuptools') '/sample-buildout/eggs/setuptools-....egg/setuptools'
If we call the part something else, the omelette should be created there instead (and the old one removed):
>>> write('buildout.cfg', ... """ ... [buildout] ... eggs = setuptools ... parts = frittata ... ... [frittata] ... recipe = collective.recipe.omelette ... eggs = ${buildout:eggs} ... """) >>> print system(buildout) Uninstalling... >>> os.path.exists('parts/omelette') False >>> os.path.exists('parts/frittata') True
Reporting bugs or asking questions
There is a shared bugtracker and help desk on Launchpad: https://bugs.launchpad.net/collective.buildout/
Contributors
David Glick [davisagli], Author
Download
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
Built Distribution
Hashes for collective.recipe.omelette-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d05aeab962e81e676bdf3f289dc613b6d5671b5d7390da3fe070710d27cf8af |
|
MD5 | 2abf6f3e3418dc26443866bce372ff35 |
|
BLAKE2b-256 | b7983a1fbca3b58b699d4bffae741d9d2ae1c5bf5364b57f54eea2157e4e0c35 |
Hashes for collective.recipe.omelette-0.1-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dd6638fa11b3d8451903a5943a3e4b4921a6fb33194597ebf72b4f9ca1905bc |
|
MD5 | 07ea68baadf2d922cfa3bd29aec5c374 |
|
BLAKE2b-256 | 76969a04240589a1668d1f4e55acadd0b930c58e488680f6da7681fa64d1bf6b |