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.5 (2008-05-29)
Added uninstall entry point so that the omelette can be uninstalled on Windows without clobbering things outside the omelette path. [optilude]
Support Windows using NTFS junctions (see http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx) [optilude]
Ignore zipped eggs and fakezope2eggs-created links. [davisagli]
Added ‘packages’ option to allow merging non-eggified Python packages to any directory in the omelette (so that, for instance, the contents of Zope’s lib/python can be merged flexibly). [davisagli]
0.4 (2008-04-07)
Added option to include Products directories. [davisagli]
Fixed ignore-develop option. [davisagli]
0.3 (2008-03-30)
Fixed test infrastructure. [davisagli]
Added option to ignore develop eggs [claytron]
Added option to ignore eggs [claytron]
Added option to override the default omelette location. [davisagli]
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)
You can also include non-eggified python packages in the omelette. This makes it simple to get a single path that you can add to your PYTHONPATH for use with specialized python environments like when running under mod_wsgi or PyDev.
Typical usage with Zope and Plone
For a typical Plone buildout, with a part named “instance” that uses the plone.recipe.zope2instance recipe and a part named “zope2” that uses the plone.recipe.zope2install recipe, the following additions to buildout.cfg will result in an omelette including all eggs and old-style Products used by the Zope instance as well as all of the packages from Zope’s lib/python. It is important that omelette come last if you want it to find everything:
[buildout] parts = ...(other parts)... omelette ... [omelette] recipe = collective.recipe.omelette eggs = ${instance:eggs} products = ${instance:products} modules = ${zope2:location}/lib/python ./
Supported options
The recipe supports the following options:
- eggs
List of eggs which should be included in the omelette.
- location
(optional) Override the directory in which the omelette is created (default is parts/[name of buildout part])
- ignore-develop
(optional) Ignore eggs that you are currently developing (listed in ${buildout:develop}). Default is False
- ignores
(optional) List of eggs to ignore when preparing your omelette.
- packages
List of Python packages whose contents should be included in the omelette. Each line should be in the format [package_location] [target_directory], where package_location is the real location of the package, and target_directory is the (relative) location where the package should be inserted into the omelette (defaults to top level).
- products
(optional) List of old Zope 2-style products directories whose contents should be included in the omelette, one per line. (For backwards-compatibility – equivalent to using packages with Products as the target directory.)
Windows support
Using omelette on Windows requires the junction utility to make links. Junction.exe must be present in your PATH when you run omelette.
Using omelette with eggtractor
Mustapha Benali’s buildout.eggtractor provides a handy way for buildout to automatically find development eggs without having to edit buildout.cfg. However, if you use it, the omelette recipe won’t be aware of your eggs unless you a) manually add them to the omelette part’s eggs option, or b) add the name of the omelette part to the builout part’s tractor-target-parts option.
Running the tests
Just grab the recipe from svn and run:
python2.4 setup.py test
Known issue: The tests run buildout in a separate process, so it’s currently impossible to put a pdb breakpoint in the recipe and debug during the test. If you need to do this, set up another buildout which installs an omelette part and includes collective.recipe.omelette as a development egg.
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
Clayton Parker [claytron], Code Monkey
Martin Aspeli [optilude], Windows Hacker
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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6fb5b0040de5b94c3d3a5e5cc3f3ce107b86c25f5c1c652988f9450db79759c |
|
MD5 | 8772f1591a9dd8cf04c79319573ede06 |
|
BLAKE2b-256 | 8c817d7accafff1051bd41e9b57abfbc7cf0c8f1350ea5bea2dcbb814173947f |
Hashes for collective.recipe.omelette-0.5-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | db019e9a53e327ad0a26929c162290fdb64b686e4c312eda9d33b3a7d2f9194b |
|
MD5 | bd33f9290f3d20810969e0570bb22c62 |
|
BLAKE2b-256 | e6a0d4a459e71b2e3f12afe07c8cae3207c28ebc1935053bc20b11640d06d054 |