Commit 888e47d1 authored by Gary Poster's avatar Gary Poster

flow the gary-1 changes through the connected branches

parent 287a7582
......@@ -495,7 +495,7 @@ class Installer:
if dist is None:
raise zc.buildout.UserError(
"Couln't download distribution %s." % avail)
"Couldn't download distribution %s." % avail)
if dist.precedence == pkg_resources.EGG_DIST:
# It's already an egg, just fetch it into the dest
......@@ -628,9 +628,9 @@ class Installer:
logger.debug('Installing %s.', repr(specs)[1:-1])
path = self._path
dest = self._dest
if dest is not None and dest not in path:
path.insert(0, dest)
destination = self._dest
if destination is not None and destination not in path:
path.insert(0, destination)
requirements = [self._constrain(pkg_resources.Requirement.parse(spec))
for spec in specs]
......@@ -661,7 +661,7 @@ class Installer:
except pkg_resources.DistributionNotFound, err:
[requirement] = err
requirement = self._constrain(requirement)
if dest:
if destination:
logger.debug('Getting required %r', str(requirement))
else:
logger.debug('Adding required %r', str(requirement))
......
......@@ -492,10 +492,14 @@ def _normalize_path(match):
path = path[1:]
return '/' + path.replace(os.path.sep, '/')
if sys.platform == 'win32':
sep = r'[\\/]' # Windows uses both sometimes.
else:
sep = re.escape(os.path.sep)
normalize_path = (
re.compile(
r'''[^'" \t\n\r]+\%(sep)s_[Tt][Ee][Ss][Tt]_\%(sep)s([^"' \t\n\r]+)'''
% dict(sep=os.path.sep)),
r'''[^'" \t\n\r]+%(sep)s_[Tt][Ee][Ss][Tt]_%(sep)s([^"' \t\n\r]+)'''
% dict(sep=sep)),
_normalize_path,
)
......
......@@ -2880,7 +2880,7 @@ def test_suite():
'We have a develop egg: zc.buildout X.X.'),
(re.compile(r'\\[\\]?'), '/'),
(re.compile('WindowsError'), 'OSError'),
(re.compile(r'\[Error 17\] Cannot create a file '
(re.compile(r'\[Error \d+\] Cannot create a file '
r'when that file already exists: '),
'[Errno 17] File exists: '
),
......@@ -2933,6 +2933,7 @@ def test_suite():
(re.compile('extdemo[.]pyd'), 'extdemo.so'),
(re.compile('[-d] setuptools-\S+[.]egg'), 'setuptools.egg'),
(re.compile(r'\\[\\]?'), '/'),
(re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'),
]+(sys.version_info < (2, 5) and [
(re.compile('.*No module named runpy.*', re.S), ''),
(re.compile('.*usage: pdb.py scriptfile .*', re.S), ''),
......
......@@ -46,7 +46,7 @@ We have a link server that has a number of distributions:
<a href="other-1.0-py2.3.egg">other-1.0-py2.3.egg</a><br>
</body></html>
We have a sample buildout. Let's update it's configuration file to
We have a sample buildout. Let's update its configuration file to
install the demo package.
>>> write(sample_buildout, 'buildout.cfg',
......@@ -187,7 +187,7 @@ Let's add an interpreter option:
... interpreter = py-demo
... """ % dict(server=link_server))
Note that we ommitted 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.
......
......@@ -95,6 +95,7 @@ We can see that the options were augmented with additional data
computed by the egg recipe by looking at .installed.cfg:
>>> cat(sample_buildout, '.installed.cfg')
... # doctest: +NORMALIZE_WHITESPACE
[buildout]
installed_develop_eggs = /sample-buildout/develop-eggs/sample.egg-link
parts = sample-part
......
......@@ -24,7 +24,7 @@ We have a link server:
<a href="other-1.0-py2.4.egg">other-1.0-py2.4.egg</a><br>
</body></html>
We have a sample buildout. Let's update it's configuration file to
We have a sample buildout. Let's update its configuration file to
install the demo package using Python 2.4.
>>> write(sample_buildout, 'buildout.cfg',
......
......@@ -67,7 +67,7 @@ def test_suite():
'setuptools-\S+\s+'
'zc.buildout-\S+\s*'
),
'__buildout_signature__ = sample- zc.recipe.egg-'),
'__buildout_signature__ = sample- zc.recipe.egg-\n'),
(re.compile('executable = [\S ]+python\S*', re.I),
'executable = python'),
(re.compile('find-links = http://localhost:\d+/'),
......
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