Commit dadc1632 authored by Reinout van Rees's avatar Reinout van Rees

Raising an error if buildout-versions or buildout.dumppickedversions is used

parent f9c631a8
......@@ -960,6 +960,14 @@ class Buildout(DictMixin):
def _load_extensions(self):
__doing__ = 'Loading extensions.'
specs = self['buildout'].get('extensions', '').split()
for superceded_extension in ['buildout-versions',
'buildout.dumppickedversions']:
if superceded_extension in specs:
msg = ("The extension %s is now included in buildout itself.\n"
"Remove the extension from your configuration and "
"look at the `show-picked-versions`\n"
"option in buildout's documentation.")
raise zc.buildout.UserError(msg % superceded_extension)
if specs:
path = [self['buildout']['develop-eggs-directory']]
if self.offline:
......
......@@ -370,6 +370,27 @@ And re-running buildout doesn't report any picked versions anymore:
Updating foo.
recipe v2
Because buildout now includes buildout-versions' (and the older
buildout.dumppickedversions') functionality, it warns if these extensions are
configured.
>>> write(sample_buildout, 'buildout.cfg',
... """
... [buildout]
... parts = foo
... extensions = buildout-versions
...
... [foo]
... recipe = spam
... """)
>>> print_(system(buildout), end='') # doctest: +ELLIPSIS
While:
Installing.
Loading extensions.
Error: The extension buildout-versions is now included in buildout itself.
Remove the extension from your configuration and look at the `show-picked-versions`
option in buildout's documentation.
Controlling the python version
-------------------------------
......
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