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

Removed the python version checking.

As discussed on the mailinglist: better to have python version checking
as a separate buildout option instead of hidden in the [versions] part.
And... the python version checking itself needs to be more robust.
sys.version is too long, minor/major needs explicit checking.
parent 8a8cef1a
......@@ -16,11 +16,6 @@ Change History
- If ``update-versions-file`` is set to a filename (relative to the buildout
directory), the ``show-picked-versions`` output is appended to that file.
- Also from buildout-versions: if a ``python`` version is given in the
versions, buildout now checks if it is running with that python
version. Handy if you know if the buildout only functions with a specific
python version.
2.0.0b1 (2013-01-21)
====================
......
......@@ -233,13 +233,6 @@ class Buildout(DictMixin):
if k not in versions
))
python_version = versions.get('python')
if python_version and python_version[0] not in sys.version:
raise zc.buildout.easy_install.IncompatibleConstraintError(
"python version specified not found in sys.version:",
python_version
)
self._annotated = copy.deepcopy(data)
self._raw = _unannotate(data)
self._data = {}
......
......@@ -390,51 +390,3 @@ configured.
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
-------------------------------
Sometimes you know that your buildout should always use a specific python
version. You can add use ``python`` in your version list and buildout will
give an error if the version doesn't match:
>>> write('buildout.cfg',
... '''
... [buildout]
... parts = foo
...
... [versions]
... python = 1.5
... spam = 1
...
... [foo]
... recipe = spam
... ''')
If we run the buildout, it will complain:
>>> print_(system(buildout), end='')
While:
Initializing.
Error: python version specified not found in sys.version: ('1.5', '/sample-buildout/buildout.cfg')
Now the same with a correct version:
>>> import sys
>>> write('buildout.cfg',
... '''
... [buildout]
... parts = foo
...
... [versions]
... python = %s.%s
... spam = 1
...
... [foo]
... recipe = spam
... ''' % (sys.version_info.major, sys.version_info.minor))
>>> print_(system(buildout), end='')
Uninstalling foo.
Installing foo.
recipe v1
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