mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 04:17:43 +00:00
Update build time Python requirement to 2.8 (cmake edition)
This commit is contained in:
parent
1d2f8b94cb
commit
b86059ee6d
@ -924,26 +924,17 @@ unset(PYTHON_VERSION_MAJOR)
|
||||
unset(PYTHON_VERSION_MINOR)
|
||||
unset(PYTHON_VERSION_STRING)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.13")
|
||||
find_package(PythonInterp 3.5 QUIET)
|
||||
find_package(PythonInterp 3.8)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
find_package(PythonInterp 2.0 REQUIRED)
|
||||
if(NOT PYTHON_VERSION_STRING VERSION_LESS 2.8)
|
||||
message(FATAL_ERROR "Python interpreter found, but is not suitable")
|
||||
endif()
|
||||
message(FATAL_ERROR "Python interpreter not found or not suitable")
|
||||
endif()
|
||||
set(LYX_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")
|
||||
else()
|
||||
find_package(Python3 3.5 QUIET)
|
||||
find_package(Python3 3.8)
|
||||
if(NOT Python3_Interpreter_FOUND)
|
||||
unset(PYTHON_EXECUTABLE CACHE)
|
||||
find_package(Python2 2.0 REQUIRED)
|
||||
if(NOT Python2_VERSION VERSION_LESS 2.8)
|
||||
message(FATAL_ERROR "Python interpreter found, but is not suitable")
|
||||
endif()
|
||||
set(LYX_PYTHON_EXECUTABLE ${Python2_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")
|
||||
else()
|
||||
set(LYX_PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")
|
||||
message(FATAL_ERROR "Python interpreter not found or not suitable")
|
||||
endif()
|
||||
set(LYX_PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")
|
||||
endif()
|
||||
|
||||
if(LYX_NLS)
|
||||
|
@ -51,8 +51,8 @@ if(_configure_needed)
|
||||
# Get binary directory of tex2lyx
|
||||
string(REGEX REPLACE "(.*)tex2lyx${_suffix}.*" "\\1" _bindir "${TEX2LYX_EXE}")
|
||||
|
||||
message(STATUS "executing ${LYX_PYTHON_EXECUTABLE} -tt \"${SCRIPT_DIR}/../configure.py\" ${_with_ver} \"--binary-dir=${_bindir}\"")
|
||||
execute_process(COMMAND ${LYX_PYTHON_EXECUTABLE} -tt "${SCRIPT_DIR}/../configure.py"
|
||||
message(STATUS "executing ${LYX_PYTHON_EXECUTABLE} \"${SCRIPT_DIR}/../configure.py\" ${_with_ver} \"--binary-dir=${_bindir}\"")
|
||||
execute_process(COMMAND ${LYX_PYTHON_EXECUTABLE} "${SCRIPT_DIR}/../configure.py"
|
||||
${_with_ver} "--binary-dir=${_bindir}"
|
||||
WORKING_DIRECTORY "${LYX_TESTS_USERDIR}"
|
||||
)
|
||||
@ -70,5 +70,3 @@ string(COMPARE NOTEQUAL ${_err} 0 _erg)
|
||||
if(_erg)
|
||||
message(FATAL_ERROR "${PY_SCRIPT} failed")
|
||||
endif()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user