Commit fc96bec3 authored by Gary Poster's avatar Gary Poster

doc fixes per review.

parent 2c19eb34
...@@ -11,19 +11,17 @@ New Features: ...@@ -11,19 +11,17 @@ New Features:
than zc.recipe.egg (which is still a fully supported, and simpler, way of than zc.recipe.egg (which is still a fully supported, and simpler, way of
generating scripts and interpreters if you are using a "clean" Python). generating scripts and interpreters if you are using a "clean" Python).
A hopefully slight limitation: in no cases are distributions in your (Note that this branch is incomplete in its implementation of this feature:
site-packages used to satisfy buildout dependencies. The if eggs are in installed in site-packages but you do not want to use
site-packages can be used in addition to the dependencies specified in site-packages, the eggs will drag in site-packages even if you try to
your buildout, and buildout dependencies can override code in your exclude it. This is addressed in subsequent branches in the series of
site-packages, but even if your Python's site-packages has the same which this one is a part.)
exact version as specified in your buildout configuration, buildout
will still use its own copy.
- Added new function, ``zc.buildout.easy_install.sitepackage_safe_scripts``, - Added new function, ``zc.buildout.easy_install.sitepackage_safe_scripts``,
to generate scripts and interpreter. It produces a full-featured to generate scripts and interpreter. It produces a full-featured
interpreter (all command-line options supported) and the ability to interpreter (all command-line options supported) and the ability to
safely let scripts include site packages. The ``z3c.recipe.scripts`` safely let scripts include site packages, such as with a system
recipe uses this new function. Python. The ``z3c.recipe.scripts`` recipe uses this new function.
- Improve bootstrap. - Improve bootstrap.
......
...@@ -35,12 +35,15 @@ Existing recipes include: ...@@ -35,12 +35,15 @@ Existing recipes include:
`zc.recipe.egg <http://pypi.python.org/pypi/zc.recipe.egg>`_ `zc.recipe.egg <http://pypi.python.org/pypi/zc.recipe.egg>`_
The egg recipe installes one or more eggs, with their The egg recipe installes one or more eggs, with their
dependencies. It installs their console-script entry points with dependencies. It installs their console-script entry points with
the needed eggs included in their paths. the needed eggs included in their paths. It is suitable for use with
a "clean" Python: one without packages installed in site-packages.
`z3c.recipe.scripts <http://pypi.python.org/pypi/z3c.recipe.scripts>`_ `z3c.recipe.scripts <http://pypi.python.org/pypi/z3c.recipe.scripts>`_
This scripts recipe builds interpreter scripts and entry point scripts Like zc.recipe.egg, this recipe builds interpreter scripts and entry
based on eggs. These scripts have more features and flexibility than the point scripts based on eggs. It can be used with a Python that has
ones offered by zc.recipe.egg. packages installed in site-packages, such as a system Python. The
interpreter also has more features than the one offered by
zc.recipe.egg.
`zc.recipe.testrunner <http://pypi.python.org/pypi/zc.recipe.testrunner>`_ `zc.recipe.testrunner <http://pypi.python.org/pypi/zc.recipe.testrunner>`_
The testrunner egg creates a test runner script for one or The testrunner egg creates a test runner script for one or
......
...@@ -1018,7 +1018,7 @@ def sitepackage_safe_scripts( ...@@ -1018,7 +1018,7 @@ def sitepackage_safe_scripts(
site_py_dest, working_set, executable, extra_paths, site_py_dest, working_set, executable, extra_paths,
add_site_packages, relative_paths)) add_site_packages, relative_paths))
script_initialization = ( script_initialization = (
'\nimport site # imports custom buildbot-generated site.py\n%s' % ( '\nimport site # imports custom buildout-generated site.py\n%s' % (
script_initialization,)) script_initialization,))
if not script_initialization.endswith('\n'): if not script_initialization.endswith('\n'):
script_initialization += '\n' script_initialization += '\n'
...@@ -1302,7 +1302,7 @@ if _interactive: ...@@ -1302,7 +1302,7 @@ if _interactive:
# These are used only by the newer ``sitepackage_safe_scripts`` function. # These are used only by the newer ``sitepackage_safe_scripts`` function.
def _get_system_paths(executable): def _get_system_paths(executable):
"""return lists of standard lib and site paths for executable. """Return lists of standard lib and site paths for executable.
""" """
# We want to get a list of the site packages, which is not easy. # We want to get a list of the site packages, which is not easy.
# The canonical way to do this is to use # The canonical way to do this is to use
......
...@@ -1171,7 +1171,7 @@ packages. This has some advantages and some serious dangers. ...@@ -1171,7 +1171,7 @@ packages. This has some advantages and some serious dangers.
A typical reason to include site-packages is that it is easier to A typical reason to include site-packages is that it is easier to
install one or more dependencies in your Python than it is with install one or more dependencies in your Python than it is with
buildbot. Some packages, such as lxml or Python PostgreSQL integration, buildout. Some packages, such as lxml or Python PostgreSQL integration,
have dependencies that can be much easier to build and/or install using have dependencies that can be much easier to build and/or install using
other mechanisms, such as your operating system's package manager. By other mechanisms, such as your operating system's package manager. By
installing some core packages into your Python's site-packages, this can installing some core packages into your Python's site-packages, this can
...@@ -1428,7 +1428,7 @@ The demo script runs the entry point defined in the demo egg: ...@@ -1428,7 +1428,7 @@ The demo script runs the entry point defined in the demo egg:
] ]
<BLANKLINE> <BLANKLINE>
<BLANKLINE> <BLANKLINE>
import site # imports custom buildbot-generated site.py import site # imports custom buildout-generated site.py
<BLANKLINE> <BLANKLINE>
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
...@@ -1467,7 +1467,7 @@ Let's see ``script_arguments`` and ``script_initialization`` in action. ...@@ -1467,7 +1467,7 @@ Let's see ``script_arguments`` and ``script_initialization`` in action.
'/interpreter/parts/interpreter', '/interpreter/parts/interpreter',
] ]
<BLANKLINE> <BLANKLINE>
import site # imports custom buildbot-generated site.py import site # imports custom buildout-generated site.py
import os import os
os.chdir("foo") os.chdir("foo")
<BLANKLINE> <BLANKLINE>
......
...@@ -47,7 +47,7 @@ extends ...@@ -47,7 +47,7 @@ extends
exec-sitecustomize exec-sitecustomize
Normally the Python's real sitecustomize module is not processed. Normally the Python's real sitecustomize module is not processed.
If you want it to be processed, set this value to 'true'. This will If you want it to be processed, set this value to 'true'. This will
be honored irrespective of the setting for include-site-paths. be honored irrespective of the setting for add-site-packages.
script-initialization script-initialization
The standard initialization code affects both an interpreter and scripts. The standard initialization code affects both an interpreter and scripts.
...@@ -181,7 +181,7 @@ some advantages and some serious dangers. ...@@ -181,7 +181,7 @@ some advantages and some serious dangers.
A typical reason to include site-packages is that it is easier to A typical reason to include site-packages is that it is easier to
install one or more dependencies in your Python than it is with install one or more dependencies in your Python than it is with
buildbot. Some packages, such as lxml or Python PostgreSQL integration, buildout. Some packages, such as lxml or Python PostgreSQL integration,
have dependencies that can be much easier to build and/or install using have dependencies that can be much easier to build and/or install using
other mechanisms, such as your operating system's package manager. By other mechanisms, such as your operating system's package manager. By
installing some core packages into your Python's site-packages, this can installing some core packages into your Python's site-packages, this can
...@@ -399,5 +399,4 @@ interpreter, so that you are not forced to use the name of the section. ...@@ -399,5 +399,4 @@ interpreter, so that you are not forced to use the name of the section.
42 42
<BLANKLINE> <BLANKLINE>
The other options all identical to the zc.recipe.egg script. Here are some The other options all identical to zc.recipe.egg.
quick demos and discussions.
...@@ -25,7 +25,7 @@ from zope.testing import doctest, renormalizing ...@@ -25,7 +25,7 @@ from zope.testing import doctest, renormalizing
# all of the examples. The README tests ``extends``, # all of the examples. The README tests ``extends``,
# ``include-site-customization`` and ``name``. That leaves ``python``, # ``include-site-customization`` and ``name``. That leaves ``python``,
# ``extra-paths``, ``initialization``, ``relative-paths``, and # ``extra-paths``, ``initialization``, ``relative-paths``, and
# ``include-site-packages``. # ``add-site-packages``.
def supports_python_option(): def supports_python_option():
""" """
......
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