Skip to content

Instantly share code, notes, and snippets.

@taras
Created October 12, 2009 03:34
Show Gist options
  • Save taras/208100 to your computer and use it in GitHub Desktop.
Save taras/208100 to your computer and use it in GitHub Desktop.
diff --git a/zerokspot/recipe/git/__init__.py b/zerokspot/recipe/git/__init__.py
index 29900d8..30d1dc5 100644
--- a/zerokspot/recipe/git/__init__.py
+++ b/zerokspot/recipe/git/__init__.py
@@ -6,7 +6,7 @@ subversion repositories::
[myapp]
recipe = zerokspot.recipe.git
repository = <url-of-repository>
- path = <relative-path-to-package-source-inside-repository>
+ paths = <relative-paths-to-packages-inside-repository>
branch = <name-of-branch> # default: "master"
rev = <name-of-revision> # default: None
newest = [true|false] # default: false, stay up to date even when
@@ -70,6 +70,10 @@ class Recipe(object):
the source at a given revision. If this is used, an update won't do
all that much when executed.
+ paths
+ List of relative paths to packages to develop. Must be used together
+ with as_egg=true.
+
as_egg
Set to True if you want the checkout to be registered as a
development egg in your buildout.
@@ -105,10 +109,7 @@ class Recipe(object):
self.part_updated = False
self.cache_cloned = False
self.installed_from_cache = False
- if options.has_key('path'):
- self.path = os.path.join(options['location'], options['path'])
- else:
- self.path = options['location']
+ self.paths = options.get('paths', None)
def install(self):
"""
@@ -230,6 +231,13 @@ class Recipe(object):
"""
Install clone as development egg.
"""
- path = self.path
+ def install(path, target):
+ zc.buildout.easy_install.develop(path, target)
target = self.buildout['buildout']['develop-eggs-directory']
- zc.buildout.easy_install.develop(path, target)
+ if self.paths:
+ for path in self.paths.split():
+ path = os.path.join(self.options['location'], path.strip())
+ install(path, target)
+ else:
+ install(self.options['location'], target)
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment