[cmake-developers] FindPythonInterp.cmake an different major versions

Rolf Eike Beer eike at sf-mail.de
Wed Jan 18 12:31:42 EST 2012


Brad King wrote:
> On 1/17/2012 3:52 PM, Rolf Eike Beer wrote:
> > Brad King wrote:
> >> Can this use the version argument to find_package?  If a project's
> >> python code works only with 2 or only with 3 why bother even looking
> >> for other versions?
> > 
> > No, it can not. This argument gives either a minimum version, or an
> > exact
> > version. This way it is impossible to specify that any 2.x version would
> > match.
> 
> Actually the find_package command documents that argument as
> 
>    "The [version] argument requests a version with which the
>     package found should be compatible"
> 
> so it is looking for compatible versions, not greater versions.
> The meaning of "compatible" is package-specific.  That's why each
> Find module needs to do its own test, or in Config mode it checks
> for the FooConfigVersion.cmake file and uses that to do the test.
> 
> Therefore I would expect
> 
>    find_package(PythonInterp 2)
> 
> to find a python interpreter compatible with version 2, which does
> not include version 3.  You just can't use the normal version
> check from the standard find helper module.

Ok, built it that way.

>  > It would be enough for 3.x versions, but for that this module has to
>  > be
> > 
> > fixed to actually find 3.x versions at all.
> 
> Shouldn't that be part of this fix?

It is. I've pushed an implementation to topic "python-version" on stage. If 
noone objects I'll merge it to next at the end of the week.

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120118/f0f97630/attachment.sig>


More information about the cmake-developers mailing list