Commit 3ddfa224 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

python2: remove support for python2 builds

parent 4a5fecf7
......@@ -33,7 +33,6 @@ function (superbuild_find_projects var)
cxx11
paraview
python
python2
python3)
option(USE_NONFREE_COMPONENTS "Enable the non-free parts of the superbuild" OFF)
......
......@@ -69,8 +69,7 @@ endif ()
set(PARAVIEW_USE_PYTHON ${python_enabled})
if (python_enabled AND
((python2_enabled AND USE_SYSTEM_python2 AND NOT python2_FIND_LIBRARIES) OR
(python3_enabled AND USE_SYSTEM_python3 AND NOT python3_FIND_LIBRARIES)))
(python3_enabled AND USE_SYSTEM_python3 AND NOT python3_FIND_LIBRARIES))
set(PARAVIEW_USE_PYTHON OFF)
endif()
......@@ -122,7 +121,7 @@ superbuild_add_project(paraview
DEPENDS cxx11
DEPENDS_OPTIONAL
adios2 cuda boost fortran gdal hdf5 matplotlib mpi numpy png protobuf
python python2 python3 qt5 visitbridge zlib silo las
python python3 qt5 visitbridge zlib silo las
xdmf3 ospray vrpn vtkm tbb netcdf
nlohmannjson
paraviewgettingstartedguide
......
......@@ -184,11 +184,7 @@ endif ()
if (python_enabled)
file(GLOB egg_dirs
"${superbuild_install_location}/lib/python${superbuild_python_version}/site-packages/*.egg/")
if (python2_built_by_superbuild)
include(python2.functions)
superbuild_install_superbuild_python2(
LIBSUFFIX "/python${superbuild_python_version}")
elseif (python3_built_by_superbuild)
if (python3_built_by_superbuild)
include(python3.functions)
superbuild_install_superbuild_python3(
LIBSUFFIX "/python${superbuild_python_version}")
......
......@@ -28,7 +28,7 @@ foreach (paraview_executable IN LISTS paraview_executables)
"${superbuild_install_location}/bin/${paraview_executable}")
endforeach ()
if (python_enabled)
if (python3_enabled)
# Install ParaView Python libraries and any non-ParaView Python libraries.
install(
DIRECTORY "${superbuild_install_location}/lib/python${superbuild_python_version}/"
......@@ -40,11 +40,11 @@ if (python_enabled)
PATTERN "*.pyc" EXCLUDE)
# Install python binaries and symlinks
if (python_built_by_superbuild)
if (python3_built_by_superbuild)
install(
PROGRAMS "${superbuild_install_location}/bin/python${superbuild_python_version}-config"
"${superbuild_install_location}/bin/python2"
"${superbuild_install_location}/bin/python2-config"
"${superbuild_install_location}/bin/python3"
"${superbuild_install_location}/bin/python3-config"
"${superbuild_install_location}/bin/python"
"${superbuild_install_location}/bin/python-config"
DESTINATION bin
......
......@@ -133,48 +133,39 @@ if (visrtx_enabled)
endif ()
if (python_enabled)
if (python2_built_by_superbuild)
include(python2.functions)
superbuild_install_superbuild_python2()
elseif (python3_built_by_superbuild)
if (python3_built_by_superbuild)
include(python3.functions)
superbuild_install_superbuild_python3()
endif ()
if (python3_enabled)
set(python_prefix "Python")
else()
set(python_prefix "bin")
endif()
superbuild_windows_install_python(
MODULES ${python_modules}
MODULE_DIRECTORIES "${superbuild_install_location}/${python_prefix}/Lib/site-packages"
MODULE_DIRECTORIES "${superbuild_install_location}/Python/Lib/site-packages"
"${superbuild_install_location}/bin/Lib/site-packages"
"${superbuild_install_location}/lib/site-packages"
"${superbuild_install_location}/lib/python${superbuild_python_version}/site-packages"
"${superbuild_install_location}/lib/paraview-${paraview_version_major}.${paraview_version_minor}/site-packages"
SEARCH_DIRECTORIES "${superbuild_install_location}/lib"
"${superbuild_install_location}/bin"
"${superbuild_install_location}/${python_prefix}"
"${superbuild_install_location}/Python"
EXCLUDE_REGEXES ${exclude_regexes})
if (matplotlib_built_by_superbuild)
install(
DIRECTORY "${superbuild_install_location}/${python_prefix}/Lib/site-packages/matplotlib/mpl-data/"
DIRECTORY "${superbuild_install_location}/Python/Lib/site-packages/matplotlib/mpl-data/"
DESTINATION "bin/Lib/site-packages/matplotlib/mpl-data"
COMPONENT superbuild)
endif ()
if (pywin32_built_by_superbuild)
install(
DIRECTORY "${superbuild_install_location}/${python_prefix}/Lib/site-packages/win32"
DIRECTORY "${superbuild_install_location}/Python/Lib/site-packages/win32"
DESTINATION "bin/Lib/site-packages"
COMPONENT "superbuild")
install(
FILES "${superbuild_install_location}/${python_prefix}/Lib/site-packages/pywin32.pth"
"${superbuild_install_location}/${python_prefix}/Lib/site-packages/pywin32.version.txt"
FILES "${superbuild_install_location}/Python/Lib/site-packages/pywin32.pth"
"${superbuild_install_location}/Python/Lib/site-packages/pywin32.version.txt"
DESTINATION "bin/Lib/site-packages"
COMPONENT "superbuild")
endif ()
......
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