[Checkins]
SVN: zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.
Added the (documented) egg option and deprecated use of the
eggs option.
Jim Fulton
jim at zope.com
Tue Mar 20 08:08:45 EDT 2007
Log message for revision 73397:
Added the (documented) egg option and deprecated use of the eggs option.
Changed:
U zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.py
U zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.txt
-=-
Modified: zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.py
===================================================================
--- zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.py 2007-03-20 09:55:32 UTC (rev 73396)
+++ zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.py 2007-03-20 12:08:44 UTC (rev 73397)
@@ -16,9 +16,11 @@
$Id$
"""
-import os, re, zipfile
+import logging, os, re, zipfile
import zc.buildout.easy_install
+logger = logging.getLogger(__name__)
+
class Base:
def __init__(self, buildout, name, options):
@@ -65,7 +67,17 @@
def install(self):
options = self.options
- distribution = options.get('eggs', self.name).strip()
+ distribution = options.get('egg')
+ if distribution is None:
+ distribution = options.get('eggs')
+ if distribution is None:
+ distribution = self.name
+ else:
+ logger.warn("The eggs option is deprecated. Use egg instead")
+
+
+ distribution = options.get('egg', options.get('eggs', self.name)
+ ).strip()
return zc.buildout.easy_install.build(
distribution, options['_d'], self.build_ext,
self.links, self.index, options['executable'], [options['_e']],
Modified: zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.txt
===================================================================
--- zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.txt 2007-03-20 09:55:32 UTC (rev 73396)
+++ zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/custom.txt 2007-03-20 12:08:44 UTC (rev 73397)
@@ -59,8 +59,8 @@
In addition, the following options can be used to specify the egg:
egg
- An eggs to install given as a setuptools requirement string.
- This defaults to the part name.
+ An specification for the egg to be created, to install given as a
+ setuptools requirement string. This defaults to the part name.
find-links
A list of URLs, files, or directories to search for distributions.
@@ -242,7 +242,44 @@
d extdemo-1.5-py2.4-linux-i686.egg
- zc.recipe.egg.egg-link
+Controlling the version used
+----------------------------
+We can specify a specific version using the egg option:
+
+ >>> write('buildout.cfg',
+ ... """
+ ... [buildout]
+ ... develop = demo
+ ... parts = extdemo demo
+ ...
+ ... [extdemo]
+ ... recipe = zc.recipe.egg:custom
+ ... egg = extdemo ==1.4
+ ... find-links = %(server)s
+ ... index = %(server)s/index
+ ... include-dirs = include
+ ...
+ ... [demo]
+ ... recipe = zc.recipe.egg
+ ... eggs = demo
+ ... extdemo ==1.4
+ ... entry-points = demo=demo:main
+ ... """ % dict(server=link_server))
+
+ >>> print system(buildout+' -D'),
+ buildout: Develop: /sample-buildout/demo
+ buildout: Uninstalling demo
+ buildout: Uninstalling extdemo
+ buildout: Installing extdemo
+ zip_safe flag not set; analyzing archive contents...
+ buildout: Installing demo
+
+ >>> ls(sample_buildout, 'develop-eggs')
+ - demo.egg-link
+ d extdemo-1.4-py2.4-linux-i686.egg
+ - zc.recipe.egg.egg-link
+
Controlling develop-egg generation
==================================
@@ -342,9 +379,10 @@
>>> print system(buildout),
buildout: Develop: /sample-buildout/demo
+ buildout: Uninstalling demo
buildout: Uninstalling extdemo
buildout: Installing extdemo
- buildout: Updating demo
+ buildout: Installing demo
Our develop-eggs now includes an egg link for extdemo:
More information about the Checkins
mailing list