[Distutils] [zc.buildout] borrowing another part's eggs

Pascoe, S (Stephen) stephen.pascoe at stfc.ac.uk
Tue Jan 20 17:37:49 CET 2009


Is there a way for a recipe to pick another part's dependencies so that
it can do the sys.path[0:0] = [...] magic that
zc.buildout.easy_install.scripts does.  I'm trying to add functionality
to a zc.recipe.egg buildout by writing a recipe but I'm finding I want
to use the working_set configured in the zc.recipe.egg part.  E.g.
 
"""
[buildout]
develop-eggs = recipes
parts = foo bar
 
[foo]
recipe = zc.recipe.egg
eggs = ...
 
[bar]
recipe = recipes:myrecipe
# I want to create scripts that include the eggs installed in foo
eggs_from = foo
...
"""
 
At the moment the only option I can see is:
 
 1. Grab config options from the [foo] section and re-parse all options
relating to egg configuration (eggs/dependency-links/etc.)
 2. Call zc.recipe.easy_install.install() to get a working set.
 3. Write sys.path[0:0] = [...] into my scripts based on the new working
set.
 
It seems a little redundant but the zc.buildout.easy_install.scripts API
doesn't quite do what I want.
 
Thanks,
Stephen.
 
---
Stephen Pascoe  +44 (0)1235 445980
British Atmospheric Data Centre
Rutherford Appleton Laboratory
 

-- 
Scanned by iCritical.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20090120/fe6e7f40/attachment.htm>


More information about the Distutils-SIG mailing list