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