Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
85cbc718
Commit
85cbc718
authored
Mar 22, 2013
by
pombredanne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed several tiny typos.
parent
7afe0399
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
65 additions
and
65 deletions
+65
-65
CHANGES.rst
CHANGES.rst
+2
-2
specifications/repeatable.txt
specifications/repeatable.txt
+2
-2
src/zc/buildout/allowhosts.txt
src/zc/buildout/allowhosts.txt
+1
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+7
-7
src/zc/buildout/buildout.txt
src/zc/buildout/buildout.txt
+9
-9
src/zc/buildout/configparser.py
src/zc/buildout/configparser.py
+3
-3
src/zc/buildout/debugging.txt
src/zc/buildout/debugging.txt
+1
-1
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+4
-4
src/zc/buildout/extends-cache.txt
src/zc/buildout/extends-cache.txt
+5
-5
src/zc/buildout/repeatable.txt
src/zc/buildout/repeatable.txt
+3
-3
src/zc/buildout/testing.txt
src/zc/buildout/testing.txt
+2
-2
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+10
-10
src/zc/buildout/update.txt
src/zc/buildout/update.txt
+1
-1
zc.recipe.egg_/CHANGES.txt
zc.recipe.egg_/CHANGES.txt
+3
-3
zc.recipe.egg_/src/zc/recipe/egg/README.txt
zc.recipe.egg_/src/zc/recipe/egg/README.txt
+3
-3
zc.recipe.egg_/src/zc/recipe/egg/api.txt
zc.recipe.egg_/src/zc/recipe/egg/api.txt
+1
-1
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
+8
-8
No files found.
CHANGES.rst
View file @
85cbc718
...
...
@@ -709,7 +709,7 @@ Feature Changes
this option.
- Adjusted the output for verbosity levels. Using a single -v option
no longer causes voluminous setuptools output. U
is
ng -vv and -vvv
no longer causes voluminous setuptools output. U
si
ng -vv and -vvv
now triggers extra setuptools output.
- Added a remove testing helper function that removes files or directories.
...
...
@@ -728,7 +728,7 @@ Feature Changes
- Added a *newest* keyword parameter to the
zc.buildout.easy_install.install and zc.buildout.easy_install.build
functions to control whether the newest distributions that
m
eed
functions to control whether the newest distributions that
n
eed
given requirements should be sought. If a false value is provided
for this parameter and already installed eggs meet the given
requirements, then no attempt will be made to search for newer
...
...
specifications/repeatable.txt
View file @
85cbc718
...
...
@@ -73,7 +73,7 @@ itself added an entry for the recipe that fixes the recipe version
at the version used by the buildout.
The zc.recipe.eggs recipe added the eggs option that lists the
specif
o
c releases that were assembled.
specif
i
c releases that were assembled.
Finally the buildout.cfg file can be modified to use the
repeatable.cfg file::
...
...
@@ -88,7 +88,7 @@ repeatable.cfg file::
eek
When the buildout is run, the options in repeatable.cfg will override
the on
c
es in buildout.cfg, providing a repeatable buildout
the ones in buildout.cfg, providing a repeatable buildout
Python API
----------
...
...
src/zc/buildout/allowhosts.txt
View file @
85cbc718
...
...
@@ -37,7 +37,7 @@ Let's create a develop egg in our buildout that specifies
... ''')
Now let's configure the buildout to use the develop egg,
together with some rules that disallow any website but PyPI and
together with some rules that disallow any web
site but PyPI and
local files::
>>> write(sample_buildout, 'buildout.cfg',
...
...
src/zc/buildout/buildout.py
View file @
85cbc718
...
...
@@ -345,7 +345,7 @@ class Buildout(DictMixin):
if
self
.
offline
:
raise
zc
.
buildout
.
UserError
(
"install-from-cache can't be used with offline mode.
\
n
"
"Nothing is installed, even from
n
cache, in offline
\
n
"
"Nothing is installed, even from cache, in offline
\
n
"
"mode, which might better be called 'no-install mode'.
\
n
"
)
zc
.
buildout
.
easy_install
.
install_from_cache
(
True
)
...
...
@@ -449,7 +449,7 @@ class Buildout(DictMixin):
# for eggs:
sys
.
path
.
insert
(
0
,
self
[
'buildout'
][
'develop-eggs-directory'
])
# Check for updates. This could cause the process to be rstarted
# Check for updates. This could cause the process to be r
e
started
self
.
_maybe_upgrade
()
# load installed data
...
...
@@ -649,11 +649,11 @@ class Buildout(DictMixin):
f
.
close
()
def
_uninstall_part
(
self
,
part
,
installed_part_options
):
# un
u
nstall part
# un
i
nstall part
__doing__
=
'Uninstalling %s.'
,
part
self
.
_logger
.
info
(
*
__doing__
)
# run uinstall recipe
# run u
u
install recipe
recipe
,
entry
=
_recipe
(
installed_part_options
[
part
])
try
:
uninstaller
=
_install_and_load
(
...
...
@@ -786,7 +786,7 @@ class Buildout(DictMixin):
==
realpath
(
f
)
)
# Sigh. This is the exectable used to run the buildout
# Sigh. This is the exec
u
table used to run the buildout
# and, of course, it's in use. Leave it.
):
raise
...
...
@@ -1685,7 +1685,7 @@ def _error(*message):
sys
.
exit
(
1
)
_internal_error_template
=
"""
An internal error occured due to a bug in either zc.buildout or in a
An internal error occur
r
ed due to a bug in either zc.buildout or in a
recipe being used:
"""
...
...
@@ -1899,7 +1899,7 @@ def main(args=None):
section
,
option
=
option
options
.
append
((
section
.
strip
(),
option
.
strip
(),
value
.
strip
()))
else
:
# We've run out of command-line options and option assign
nem
nts
# We've run out of command-line options and option assign
me
nts
# The rest should be commands, so we'll stop here
break
...
...
src/zc/buildout/buildout.txt
View file @
85cbc718
...
...
@@ -462,7 +462,7 @@ leave previously created paths in place:
While:
Installing data-dir.
<BLANKLINE>
An internal error occured due to a bug in either zc.buildout or in a
An internal error occur
r
ed due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
... exists...
...
...
@@ -493,7 +493,7 @@ If we fix the typo:
While:
Installing data-dir.
<BLANKLINE>
An internal error occured due to a bug in either zc.buildout or in a
An internal error occur
r
ed due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
... exists...
...
...
@@ -580,7 +580,7 @@ When we rerun the buildout:
While:
Installing data-dir.
<BLANKLINE>
An internal error occured due to a bug in either zc.buildout or in a
An internal error occur
r
ed due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
... exists...
...
...
@@ -655,7 +655,7 @@ directories will be created:
While:
Installing data-dir.
<BLANKLINE>
An internal error occured due to a bug in either zc.buildout or in a
An internal error occur
r
ed due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
... exists...
...
...
@@ -717,7 +717,7 @@ Option values have extra whitespace stripped. How this is done
depends on whether the value has non-whitespace characterts on the
first line. If an option value has non-whitespace characters on the
first line, then each line is stripped and blank lines are removed.
For exampe, in::
For examp
l
e, in::
[foo]
bar = 1
...
...
@@ -768,7 +768,7 @@ Buildout configuration data are Python strings, which are bytes in
Python 2 and unicode in Python 3.
Sections and options within sections may be repeated. Multiple
occurrences of of a section are treated as if they were conca
nti
nated.
occurrences of of a section are treated as if they were conca
te
nated.
The last option value for a given name in a section overrides previous
values.
...
...
@@ -971,7 +971,7 @@ Section and option names in variable substitutions are only allowed to
contain alphanumeric characters, hyphens, periods and spaces. This
restriction might be relaxed in future releases.
We can om
m
it the section name in a variable substitution to refer to
We can omit the section name in a variable substitution to refer to
the current section. We can also use the special option,
_buildout_section_name_ to get the current section name.
...
...
@@ -2833,12 +2833,12 @@ interpreter with the given requirements or paths:
extra-paths =
./src
Passing requirements or paths causes the the builout to be run as part
Passing requirements or paths causes the the buil
d
out to be run as part
of initialization. In the example above, we got a number of
distributions installed and 2 scripts generated. The first, ``demo``,
was defined by the ``demo`` project. The second, ``py`` was defined by
the generated configuration. It's a "custom interpreter" that behaves
like a standard Python interpeter, except that includes the specified
like a standard Python interp
r
eter, except that includes the specified
eggs and extra paths in it's Python path.
We specified a source directory that didn't exist. Buildout created it
...
...
src/zc/buildout/configparser.py
View file @
85cbc718
...
...
@@ -14,7 +14,7 @@
# The following copied from Python 2 config parser because:
# - The py3 configparser isn't backward compatible
# - Both strip option values in undesir
e
able ways
# - Both strip option values in undesirable ways
# - dict of dicts is a much simpler api
import
re
...
...
@@ -82,7 +82,7 @@ class MissingSectionHeaderError(ParsingError):
# [section_name: some Python expression] #; some comment
# This regex leverages the fact that the following is a valid Python expression:
# [some Python expression] # some comment
# and that section headers are also delimited by [brackets] t
ah
t are also [list]
# and that section headers are also delimited by [brackets] t
ha
t are also [list]
# delimiters.
# So instead of doing complex parsing to balance brackets in an expression, we
# capture just enough from a header line to collect then remove the section_name
...
...
@@ -127,7 +127,7 @@ def parse(fp, fpname, exp_globals=dict):
Optionally
the
title
line
can
have
the
form
`
[
name
:
expression
]
' where
expression is an arbitrary Python expression. Sections with an expression
that evaluates to False are ignored. Semicolon `;'
an
hash
`
#' characters
must
r
be
string
-
escaped
in
expression
literals
.
must
be
string
-
escaped
in
expression
literals
.
exp_globals
is
a
callable
returning
a
mapping
of
defaults
used
as
globals
during
the
evaluation
of
a
section
conditional
expression
.
...
...
src/zc/buildout/debugging.txt
View file @
85cbc718
...
...
@@ -5,7 +5,7 @@ Buildouts can be pretty complex. When things go wrong, it isn't
always obvious why. Errors can occur due to problems in user input or
due to bugs in zc.buildout or recipes. When an error occurs, Python's
post-mortem debugger can be used to inspect the state of the buildout
or recipe code were there error occured. To enable this, use the -D
or recipe code were there error occur
r
ed. To enable this, use the -D
option to the buildout. Let's create a recipe that has a bug:
>>> mkdir(sample_buildout, 'recipes')
...
...
src/zc/buildout/easy_install.py
View file @
85cbc718
...
...
@@ -318,7 +318,7 @@ class Installer:
if
exit_code
:
logger
.
error
(
"An error occured when trying to install %s. "
"An error occur
r
ed when trying to install %s. "
"Look above this message for any errors that "
"were output by easy_install."
,
dist
)
...
...
@@ -1384,7 +1384,7 @@ def _constrained_requirement_constraint(constraint, requirement):
# Simple cases:
# No specs t
p
merge with:
# No specs t
o
merge with:
if
not
requirement
.
specs
:
if
not
constraint
[
0
]
in
'<=>'
:
constraint
=
'=='
+
constraint
...
...
@@ -1422,8 +1422,8 @@ def _constrained_requirement_constraint(constraint, requirement):
cop0
=
cop
[
0
]
# Normalize specs by splitting >= and <= specs. We
meed tp
do this
# beca
i
se these have really weird semantics. Also cache parsed
# Normalize specs by splitting >= and <= specs. We
need to
do this
# beca
u
se these have really weird semantics. Also cache parsed
# versions, which we'll need for comparisons:
specs
=
[]
for
op
,
v
in
requirement
.
specs
:
...
...
src/zc/buildout/extends-cache.txt
View file @
85cbc718
...
...
@@ -153,7 +153,7 @@ under any particular circumstances.
been specified by the user's default configuration, the project's root
config file must be available, be it from disk or from the net.
- Offline mode turned on by the ``-o`` command line option is hono
u
red from
- Offline mode turned on by the ``-o`` command line option is honored from
the beginning even though command line options are applied to the
configuration last. If offline mode is not requested by the command line, it
may be switched on by either the user's or the project's config root.
...
...
@@ -383,12 +383,12 @@ Error: Couldn't download 'http://localhost/base.cfg' in offline mode.
While:
Installing.
Checking for upgrades.
An internal error occured ...
An internal error occur
r
ed ...
ValueError: install_from_cache set to true with no download cache
>>> rmdir('home', '.buildout')
Newest and non-newest behavio
u
r for extends cache
Newest and non-newest behavior for extends cache
-------------------------------------------------
While offline mode forbids network access completely, 'newest' mode determines
...
...
@@ -467,7 +467,7 @@ used:
Unused options for buildout: 'bar' 'foo'.
(XXX We patch download utility's API to produce readable output for the test;
a better solution would
utili
se the logging already done by the utility.)
a better solution would
re-u
se the logging already done by the utility.)
>>> import zc.buildout
>>> old_download = zc.buildout.download.Download.download
...
...
@@ -489,7 +489,7 @@ Unused options for buildout: 'bar' 'foo'.
The deprecated ``extended-by`` option
-------------------------------------
The ``buildout`` section used to recogni
s
e an option named ``extended-by``
The ``buildout`` section used to recogni
z
e an option named ``extended-by``
that was deprecated at some point and removed in the 1.5 line. Since ignoring
this option silently was considered harmful as a matter of principle, a
UserError is raised if that option is encountered now:
...
...
src/zc/buildout/repeatable.txt
View file @
85cbc718
...
...
@@ -7,13 +7,13 @@ configuration files for a project into a version control system and
later use the checked in files to get the same buildout, subject to
changes in the environment outside the buildout.
An advantage of using Python eggs is that depenencies of eggs used are
An advantage of using Python eggs is that depen
d
encies of eggs used are
automatically determined and used. The automatic inclusion of
depenent distributions is at odds with the goal of repeatable
depen
d
ent distributions is at odds with the goal of repeatable
buildouts.
To support repeatable buildouts, a versions section can be created
with options for each distribution name whos version is to be fixed.
with options for each distribution name who
'
s version is to be fixed.
The section can then be specified via the buildout versions option.
To see how this works, we'll create two versions of a recipe egg:
...
...
src/zc/buildout/testing.txt
View file @
85cbc718
...
...
@@ -49,7 +49,7 @@ number of names to the test namespace:
will be automatically removed at the end of the test. The path of
the created directory is returned.
Further, if the the normalize_path norm
la
izing substitution (see
Further, if the the normalize_path norm
al
izing substitution (see
below) is used, then any paths starting with this path will be
normalized to::
...
...
@@ -111,7 +111,7 @@ number of names to the test namespace:
``sdist(setup, dest)``
Create a source distribution by running the given setup file and
placing the result in the given destination directory. If the
setup argument is a directory, the
thge
setup.py file in that
setup argument is a directory, the setup.py file in that
directory is used.
``bdist_egg(setup, dest)``
...
...
src/zc/buildout/tests.py
View file @
85cbc718
...
...
@@ -146,7 +146,7 @@ It is an error to create a variable-reference cycle:
Getting option buildout:x.
Error: Circular reference in substitutions.
It is an error to use funny characters in variable refereces:
It is an error to use funny characters in variable refere
n
ces:
>>> write(sample_buildout, 'buildout.cfg',
... '''
...
...
@@ -222,7 +222,7 @@ and too have too many or too few colons:
Error: The substitution, ${buildout:y:z},
has too many colons.
Al parts have to have a section:
Al
l
parts have to have a section:
>>> write(sample_buildout, 'buildout.cfg',
... '''
...
...
@@ -745,13 +745,13 @@ All gone
def
add_distribute_to_dependencies_when_namespace_packages
():
'''
Often, a package depends on distribute soley by virtue of using
Often, a package depends on distribute sole
l
y by virtue of using
namespace packages. In this situation, package authors often forget to
declare distribute as a dependency. This is a mistake, but,
unfortunately, a common one that we need to work around. If an egg
uses namespace packages and does not include distribute as a depenency,
uses namespace packages and does not include distribute as a depen
d
ency,
we will still include distribute in the working set. If we see this for
a devlop egg, we will also generate a warning.
a dev
e
lop egg, we will also generate a warning.
>>> mkdir('foo')
>>> mkdir('foo', 'src')
...
...
@@ -832,7 +832,7 @@ We do not get a warning, but we do get distribute included in the working set:
>>> print_(handler, end='')
We get the same behavior if the it is a depedency that uses a
We get the same behavior if the it is a depe
n
dency that uses a
namespace package.
...
...
@@ -1392,7 +1392,7 @@ def internal_errors():
Getting section data-dir.
Initializing section data-dir.
<BLANKLINE>
An internal error occured due to a bug in either zc.buildout or in a
An internal error occur
r
ed due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
...
...
...
@@ -1844,7 +1844,7 @@ if sys.version_info > (2, 4):
Initializing section x.
Loading zc.buildout recipe entry zc.buildout.testexit:default.
<BLANKLINE>
An internal error occured due to a bug in either zc.buildout or in a
An internal error occur
r
ed due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
...
...
...
@@ -2084,7 +2084,7 @@ directory and then use the wacky extension to load the demo package
def
distributions_from_local_find_links_make_it_to_download_cache
():
"""
If we specify a local directory in find links, dist
or
s found there
If we specify a local directory in find links, dist
ro
s found there
need to make it to the download cache.
>>> mkdir('test')
...
...
@@ -2699,7 +2699,7 @@ def increment_on_command_line():
def
test_constrained_requirement
():
"""
zc.buildout.easy_install._constrained_requirement(constraint, requi
t
ement)
zc.buildout.easy_install._constrained_requirement(constraint, requi
r
ement)
Transforms an environment by applying a constraint.
...
...
src/zc/buildout/update.txt
View file @
85cbc718
...
...
@@ -237,7 +237,7 @@ directory:
When buildout restarts and the restarted buildout exits with an error code,
the original buildout that called the second buildout also exits with that
error code. Otherwise build scripts can erroneously detect a succesful
error code. Otherwise build scripts can erroneously detect a succes
s
ful
buildout run even if it failed.
Make a recipe that fails:
...
...
zc.recipe.egg_/CHANGES.txt
View file @
85cbc718
...
...
@@ -56,7 +56,7 @@ Feature Changes
- Added initialization and arguments options to the scripts recipe.
- Added an eggs recipe that *just* install
e
s eggs.
- Added an eggs recipe that *just* installs eggs.
- Advertized the scripts recipe for creating scripts.
...
...
@@ -97,7 +97,7 @@ Updated to work with zc.buildout 1.0.0b3.
- Extra path elements to be included in generated scripts can now be
set via the extra-paths option.
- No longer implicitly generate
py\_ scripts fo r
each egg. There is
- No longer implicitly generate
"py\_" scripts for
each egg. There is
now an interpreter option to generate a script that, when run
without arguments, launches the Python interactive interpreter with
the path set based on a parts eggs and extra paths. If this script
...
...
@@ -122,7 +122,7 @@ Updated to work with zc.buildout 1.0.0b3.
1.0.0a2
=======
Added a custom recipe for building custom eggs using custom dist
r
utils
Added a custom recipe for building custom eggs using custom distutils
build_ext arguments.
1.0.0a1
...
...
zc.recipe.egg_/src/zc/recipe/egg/README.txt
View file @
85cbc718
...
...
@@ -182,7 +182,7 @@ Let's add an interpreter option:
... interpreter = py-demo
... """ % dict(server=link_server))
Note that we om
m
itted the entry point name from the recipe
Note that we omitted the entry point name from the recipe
specification. We were able to do this because the scripts recipe is
the default entry point for the zc.recipe.egg egg.
...
...
@@ -483,11 +483,11 @@ each individual script section:
if __name__ == '__main__':
sys.exit(eggrecipedemo.main())
Specifying initiali
ali
zation code and arguments
Specifying initialization code and arguments
-----------------------------------------------
Sometimes, we need to do more than just calling entry points. We can
use the initiali
ali
zation and arguments options to specify extra code
use the initialization and arguments options to specify extra code
to be included in generated scripts:
...
...
zc.recipe.egg_/src/zc/recipe/egg/api.txt
View file @
85cbc718
...
...
@@ -7,7 +7,7 @@ recipe provides an API that other recipes can use.
A recipe can reuse the egg recipe, supporting the eggs, find-links,
index, and extra-paths options. This is done by creating an
egg recipe instance in a recipes's contructor. In the recipe's
egg recipe instance in a recipes's con
s
tructor. In the recipe's
install script, the egg-recipe instance's working_set method is used
to collect the requested eggs and working set.
...
...
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
View file @
85cbc718
...
...
@@ -25,17 +25,17 @@ define
define.
undef
A comma
n
separated list of names of C preprocessor variables to
A comma
-
separated list of names of C preprocessor variables to
undefine.
libraries
The name of an additional library to link with. Due to limitations
in distutils and desp
r
ite the option name, only a single library
in distutils and despite the option name, only a single library
can be specified.
link-objects
The name of an link object to link against. Due to limitations
in distutils and desp
r
ite the option name, only a single link object
in distutils and despite the option name, only a single link object
can be specified.
debug
...
...
@@ -286,7 +286,7 @@ Controlling environment variables
To set additional environment variables, the `environment` option is used.
Let's create a recipe which prints out environment variables. We need this to
make sure the set envir
i
onment variables are removed after the egg:custom
make sure the set environment variables are removed after the egg:custom
recipe was run.
>>> mkdir(sample_buildout, 'recipes')
...
...
@@ -372,7 +372,7 @@ the original value will be restored:
Sometimes it is required to prepend or append to an existing environment
variable, for instance for adding something to the PATH. Therefor all variables
variable, for instance for adding something to the PATH. Therefor
e
all variables
are interpolated with os.environ before the're set:
>>> write(sample_buildout, 'buildout.cfg',
...
...
@@ -460,17 +460,17 @@ define
define.
undef
A comma
n
separated list of names of C preprocessor variables to
A comma
-
separated list of names of C preprocessor variables to
undefine.
libraries
The name of an additional library to link with. Due to limitations
in distutils and desp
r
ite the option name, only a single library
in distutils and despite the option name, only a single library
can be specified.
link-objects
The name of an link object to link against. Due to limitations
in distutils and desp
r
ite the option name, only a single link object
in distutils and despite the option name, only a single link object
can be specified.
debug
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment