Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 412925 | Differences between
and this patch

Collapse All | Expand All

(-)a/Modules/FindPythonLibs.cmake (-2 / +6 lines)
Lines 50-59 IF(PythonLibs_FIND_VERSION) Link Here
50
        UNSET(_PYTHON_FIND_MAJ_MIN)
50
        UNSET(_PYTHON_FIND_MAJ_MIN)
51
        UNSET(_PYTHON_FIND_MAJ)
51
        UNSET(_PYTHON_FIND_MAJ)
52
    ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
52
    ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
53
        SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
53
        EXECUTE_PROCESS(COMMAND python${PythonLibs_FIND_VERSION} -c "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))"
54
                        OUTPUT_VARIABLE _PYTHON_FIND_OTHER_VERSIONS)
55
        SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS} ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
54
    ENDIF(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
56
    ENDIF(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
55
ELSE(PythonLibs_FIND_VERSION)
57
ELSE(PythonLibs_FIND_VERSION)
56
    SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
58
    EXECUTE_PROCESS(COMMAND python -c "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))"
59
                    OUTPUT_VARIABLE _PYTHON_FIND_OTHER_VERSIONS)
60
    SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS} ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
57
ENDIF(PythonLibs_FIND_VERSION)
61
ENDIF(PythonLibs_FIND_VERSION)
58
62
59
# Set up the versions we know about, in the order we will search. Always add
63
# Set up the versions we know about, in the order we will search. Always add

Return to bug 412925