Commit a2ba3ed3 authored by Jim Fulton's avatar Jim Fulton

Made abi-tagged eggs directories subdirectories of the eggs directory.

As suggested in: https://github.com/buildout/buildout/pull/325

Also simplified _setup_directories to not bother with the eggs
directory, since that's handled elsewhere.
parent be0f11b7
......@@ -387,7 +387,9 @@ class Buildout(DictMixin):
if bool_option(options, 'abi-tag-eggs', 'false'):
from zc.buildout.pep425tags import get_abi_tag
options['eggs-directory'] += '-' + get_abi_tag()
options['eggs-directory'] = os.path.join(
options['eggs-directory'], get_abi_tag())
eggs_cache = options.get('eggs-directory')
for cache in [download_cache, extends_cache, eggs_cache]:
......@@ -734,7 +736,7 @@ class Buildout(DictMixin):
__doing__ = 'Setting up buildout directories'
# Create buildout directories
for name in ('bin', 'parts', 'eggs', 'develop-eggs'):
for name in ('bin', 'parts', 'develop-eggs'):
d = self['buildout'][name+'-directory']
if not os.path.exists(d):
self._logger.info('Creating directory %r.', d)
......
......@@ -3035,6 +3035,8 @@ def parse_with_section_expr():
def test_abi_tag_eggs():
r"""
>>> mkdir('..', 'bo')
>>> cd('..', 'bo')
>>> write('buildout.cfg',
... '''
... [buildout]
......@@ -3044,16 +3046,17 @@ def test_abi_tag_eggs():
... recipe = zc.recipe.egg
... eggs = demo
... ''')
>>> _ = system(join('bin', 'buildout') + ' bootstrap')
>>> remove('eggs')
>>> _ = system(join('..', 'sample-buildout', 'bin', 'buildout')
... + ' bootstrap')
>>> _ = system(join('bin', 'buildout'))
>>> dirs = os.listdir('.')
>>> 'eggs' in dirs
False
>>> ls('.')
d bin
- buildout.cfg
d develop-eggs
d eggs
d parts
>>> from zc.buildout.pep425tags import get_abi_tag
>>> 'eggs-' + get_abi_tag() in dirs
True
>>> ls('eggs-' + get_abi_tag()) # doctest: +ELLIPSIS
>>> ls(join('eggs', get_abi_tag())) # doctest: +ELLIPSIS
d...
d setuptools-34.0.3-py3.5.egg
...
......
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