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.2 (2008-03-16)
Fixed so created directories are not normalized to lowercase. [davisagli]
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79cee3a81207e92afa41439b2f17cfd42c85eac58484d6435091b7b55f299c16 |
|
MD5 | c4a7fbc7e7bcbb9ffec8b992ee6ce97f |
|
BLAKE2b-256 | 1c344562d43e087506a93a50d10757bcd285c05900c9ef7436cebb2b597c6746 |
Hashes for collective.recipe.omelette-0.2-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba88a958b35b9648570d0c34505c66daed0b8cef45d32872cd64507233fe2f8 |
|
MD5 | 9abd5bf275027b445bc4b688f4a55a94 |
|
BLAKE2b-256 | 0bc1b1a505714a715ab8077d3c71bc36a1bd44c06fa96003f602cbf62097f754 |