Commit e1330abe authored by Jerome Dias's avatar Jerome Dias
Browse files

[defaults] Upgrade to python 3.7 exact.

We force python version to be exactly 3.7 as it is the only one tested.
USE_SYSTEM_python3 is used to define if python libs are directly linked
to the python3 system directory (USE_SYSTEM_python3=ON) or shipped
in the install dir (OFF) (See superbuild_python_install function).
parent 8dd36b06
......@@ -69,7 +69,7 @@ function (superbuild_find_projects var)
cxx11
paraview
python
python2
python3
qt5
pythonqt
boost
......@@ -130,29 +130,30 @@ if (WIN32)
endif()
if(UNIX)
if(NOT DEFINED USE_SYSTEM_python2)
# it is still possible to pass -DUSE_SYSTEM_python2=False to cmake
message(STATUS "Defaulting USE_SYSTEM_python2 to True (was undefined and we are on UNIX)")
set(USE_SYSTEM_python2 True CACHE BOOL INTERNAL)
# The following variable is used to define if python libs have to be used from the system
# directory (USE_SYSTEM_python3=True) or shipped in install dir (USE_SYSTEM_python3=False)
# this behavior is managed by the superbuild python install functions
if(NOT DEFINED USE_SYSTEM_python3)
# it is still possible to pass -DUSE_SYSTEM_python3=False to cmake
message(STATUS "Defaulting USE_SYSTEM_python3 to True (was undefined and we are on UNIX)")
set(USE_SYSTEM_python3 True CACHE BOOL INTERNAL)
endif()
if(USE_SYSTEM_python2)
# This is needed to ensure the superbuild projects to use the same python version.
# (Only needed when a python system is required)
find_package(Python2 2.7 QUIET REQUIRED COMPONENTS Interpreter Development)
# This is needed to ensure the superbuild projects to use the same python version.
# We force python to version 3.7 as it is the only one that has been tested
find_package(Python3 3.7 EXACT QUIET REQUIRED COMPONENTS Interpreter Development)
# By setting the following variables we specify a python version for FindPythonLibs
# (See cmake FindPythonLibs documentation)
set(PYTHON_INCLUDE_DIRS ${Python2_INCLUDE_DIRS})
set(PYTHON_INCLUDE_DIR ${Python2_INCLUDE_DIRS})
set(PYTHON_LIBRARY ${Python2_LIBRARIES})
# Python2_INCLUDE_DIR and Python2_LIBRARY are Artefacts in FindPython2
# Both can be used to specific a python version
# (See cmake FindPython2 documentations)
set(Python2_INCLUDE_DIR ${Python2_INCLUDE_DIRS})
set(Python2_LIBRARY ${Python2_LIBRARIES})
endif()
# By setting the following variables we specify a python version for FindPythonLibs
# (See cmake FindPythonLibs documentation)
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
set(PYTHON_INCLUDE_DIR ${Python3_INCLUDE_DIRS})
set(PYTHON_LIBRARY ${Python3_LIBRARIES})
# Python3_INCLUDE_DIR and Python3_LIBRARY are Artefacts in FindPython3
# Both can be used to specific a python version
# (See cmake FindPython3 documentations)
set(Python3_INCLUDE_DIR ${Python3_INCLUDE_DIRS})
set(Python3_LIBRARY ${Python3_LIBRARIES})
endif()
function (superbuild_add_packaging)
......
......@@ -6,7 +6,7 @@ if (Protobuf_FOUND)
list(APPEND pv_cmake_options "-DVTK_USE_SYSTEM_PROTOBUF:BOOL=${VTK_USE_SYSTEM_PROTOBUF}" )
endif()
superbuild_add_project(paraview
DEPENDS qt5 python python2 pythonqt
DEPENDS qt5 python python3 pythonqt
DEFAULT_ON
DEBUGGABLE
CMAKE_ARGS
......
superbuild_add_project(pythonqt
DEPENDS qt5 python python2
DEPENDS qt5 python python3
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=ON
-DPythonQt_QT_VERSION:STRING=${qt_version}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment