Skip to content
  • Björn Ricks's avatar
    Search for the installed python interpreter first · 20980ef5
    Björn Ricks authored
    The old approach to determine the python executeable chooses the newest
    version from _Python_VERSIONS if no additonal versions are passed.
    With python it is possible to install different versions side-by-side.
    Therefore a user can install e.g. python 2.5 and 2.7. Python 2.7 maybe
    only installed for testing new features and 2.5 for building and running
    his software. Thus the default installation for the user would be python
    2.5 and then returning PYTHON_EXECUTEABLE python2.7 would be wrong. The
    new approuch searches first for the the default python executable e.g.
    /usr/bin/python on unix and if it can't be found _Python_VERSIONS is
    used.
    20980ef5