Commit 362f89a9 authored by Jim Fulton's avatar Jim Fulton

Rearranged some more to stop confusing easy install.

Renamed distribution option to eggs and filled out README.txt.
parent 9d92aa0d
[buildout]
develop = eggrecipe testrunnerrecipe
develop = zc.recipe.egg zc.recipe.testrunner
parts = test
# prevent slow access to cheeseshop:
......
Buildout recipe for installing Python distutils distributions as eggs
Buildout Egg-Installation Recipe
================================
The egg-installation recipe installes eggs into a buildout eggs
directory. It also generates scripts in a buildout bin directory with
egg paths baked into them.
The recipe provides the following options:
eggs
A list of eggs to install given as one ore more setuptools
requirement strings. Each string must be given on a separate
line.
find-links
One or more addresses of link servers to be searched for
distributions. This is optional. If not specified, links
specified in the buildout section will be used, if any.
index
The optional address of a distribution index server. If not
specified, then the option from the buildout section will be
used. If not specified in the part data or in the buildout
section, then http://www.python.org/pypi is used.
python
The name of a section defining the Python executable to use.
This defaults to buildout.
unzip
The value of this option must be either true or false. If the value
is true, then the installed egg will be unzipped. Note that this is
only effective when an egg is installed. If a zipped egg already
exists in the eggs directory, it will not be unzipped.
To do
-----
- Some way to freeze the egg-versions used. This includes some way to
record which versions were selected dynamially and then a way to
require that the recorded versions be used in a later run.
- More control over script generation. In particular, some way to
specify data t be recored in the script.
......@@ -4,15 +4,10 @@ Installation of distributions as eggs
The zc.recipe.egg recipe can be used to install various types if
distutils distributions as eggs. It takes a number of options:
distribution
The distribution specifies the distribution requirement.
This is a requirement as defined by setuptools.
If not specified, the distribution defaults to the part name.
Multiple requirements can be given, separated by newlines. Each
requirement has to be on a separate line.
eggs
A list of eggs to install given as one ore more setuptools
requirement strings. Each string must be given on a separate
line.
find-links
A list of URLs, files, or directories to search for distributions.
......@@ -65,7 +60,7 @@ install the demo package.
...
... [demo]
... recipe = zc.recipe.egg
... distribution = demo<0.3
... eggs = demo<0.3
... find-links = %(server)s
... index = %(server)s/index
... """ % dict(server=link_server))
......@@ -153,7 +148,7 @@ Then we'll get a new demo egg:
d demo-0.3-py2.3.egg
d demoneeded-1.0-py2.3.egg
Note that we removed the distribution option, and the distribution
Note that we removed the eggs option, and the eggs
defaulted to the part name.
The script is updated too:
......
......@@ -48,11 +48,14 @@ class Egg:
python = options.get('python', buildout['buildout']['python'])
options['executable'] = buildout[python]['executable']
def install(self):
options = self.options
def working_set(self):
"""Separate method to just get the working set
This is intended for reuse by similar recipes.
"""
distributions = [
r.strip()
for r in options.get('distribution', self.name).split('\n')
for r in options.get('eggs', self.name).split('\n')
if r.strip()]
ws = zc.buildout.easy_install.install(
......@@ -64,6 +67,10 @@ class Egg:
path=[options['_d']]
)
def install(self):
ws = self.working_set()
options = self.options
scripts = options.get('scripts')
if scripts or scripts is None:
if scripts is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment