Skip to content
  • Rolf Eike Beer's avatar
    FindPythonInterp: rework the version detection · 7d6db93d
    Rolf Eike Beer authored
    There are versions out there that neither understand --version nor -V. Try a
    completely different approach: execute a small python script that prints the
    version number (and only that) in an easily reusable way using
    sys.version_info. This is documented to work since Python 2.0. Use sys.version
    for older versions, which is documented to exist since 1.5. If even that
    doesn't work then simply assume we are on 1.4.0.
    7d6db93d