Commit 4b889785 authored by Jim Fulton's avatar Jim Fulton

- Fixed a bug that caused buildouts to fail when variable

  substitutions are used to name standard directories, as in::

[buildout]
    eggs-directory = ${buildout:directory}/develop-eggs
parent caa49d0f
......@@ -4,8 +4,17 @@ Status
Change History
**************
1.1 (2008-07-19)
================
1.1.1 (2008-07-28)
==================
- Fixed a bug that caused buildouts to fail when variable
substitutions are used to name standard directories, as in::
[buildout]
eggs-directory = ${buildout:directory}/develop-eggs
1.1.0 (2008-07-19)
==================
- Added a buildout-level unzip option tp change the default policy for
unzipping zip-safe eggs.
......
......@@ -128,8 +128,11 @@ class Buildout(UserDict.DictMixin):
# used already (Gottfried Ganssauge)
buildout_section = data.get('buildout')
# Try to make sure we have absolute paths for standard directories. We do this
# before doing substitutions, in case a one of these gets read by another section.
# Try to make sure we have absolute paths for standard
# directories. We do this before doing substitutions, in case
# a one of these gets read by another section. If any
# variable references are used though, we leave it as is in
# _buildout_path.
if 'directory' in buildout_section:
self._buildout_dir = buildout_section['directory']
for name in ('bin', 'parts', 'eggs', 'develop-eggs'):
......@@ -255,8 +258,10 @@ class Buildout(UserDict.DictMixin):
os.chdir(options['directory'])
def _buildout_path(self, *names):
return os.path.join(self._buildout_dir, *names)
def _buildout_path(self, name):
if '${' in name:
return name
return os.path.join(self._buildout_dir, name)
def bootstrap(self, args):
__doing__ = 'Bootstraping.'
......
......@@ -2444,6 +2444,19 @@ def pyc_and_pyo_files_have_correct_paths():
"""
def dont_mess_with_standard_dirs_with_variable_refs():
"""
>>> write('buildout.cfg',
... '''
... [buildout]
... eggs-directory = ${buildout:directory}/develop-eggs
... parts =
... ''' % globals())
>>> print system(buildout),
"""
######################################################################
def create_sample_eggs(test, executable=sys.executable):
......
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