![](https://secure.gravatar.com/avatar/d8199ddc0a286ca23415595a4eb22c44.jpg?s=120&d=mm&r=g)
On 28-01-13 12:50, Jim Fulton wrote:
On Mon, Jan 28, 2013 at 6:38 AM, Jim Fulton <jim@zope.com> wrote:
On Fri, Jan 25, 2013 at 3:53 PM, Reinout van Rees <reinout@vanrees.org> wrote:
...
3. New buildout option: ``python-version`` that restricts the Python version, with the same semantics as buildout-version provides now.
Hm. I copy/pasted the buildout-versions code and worked from there. Buildout-versions simply looks at a 'python' entry in the [versions] part, so that's different from a python-version option.
That's not too bad as it saves us another buildout option. But... do we want to change this?
I think so. Python itself is not a distutils distribution. This feels like mixing apples and oranges. Also, version entries can now have
=, >, <= and < modifiers, but you aren't supporting that for Python versions.
I'd rather make this a separate option.
Sounds logical.
Also, the implementation shouldn't simply test whether the version is in the version string. It's too easy to get false matches. The implementation should parse the version (maybe as simple as splitting on dots) and check it against sys.version_info.
Yeah, I saw that the implementation wasn't perfect. It looks at the whole string including "linux 2.1.xxx", so python=2 would work all the time. Copy/pasted from buildout-versions.
I should have mentioned that an option is to defer the python-version feature for later.
I'll take the python version out of my pull request for now and create a separate issue that points at the removed code. Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham"