| --- VTK-8.2.0/Utilities/Python/CMakeLists.txt.orig 2019-05-22 15:09:47.607021700 +0300 |
| +++ VTK-8.2.0/Utilities/Python/CMakeLists.txt 2019-05-22 15:10:29.029079800 +0300 |
| @@ -28,7 +28,7 @@ |
| # Export location of python module dirs in install and build tree for every vtkpython module to use |
| # As long as those modules depend on vtkpython, they can retrieve and use these |
| if(NOT VTK_PYTHON_SITE_PACKAGES_SUFFIX) |
| - if(WIN32 AND NOT CYGWIN) |
| + if(MSVC) |
| set(VTK_PYTHON_SITE_PACKAGES_SUFFIX "Lib/site-packages") |
| else() |
| set(VTK_PYTHON_SITE_PACKAGES_SUFFIX |
| @@ -52,7 +52,7 @@ |
| endif() |
| |
| if(NOT DEFINED VTK_INSTALL_PYTHON_MODULES_DIR) |
| - if(WIN32 AND NOT CYGWIN) |
| + if(MSVC) |
| set(VTK_INSTALL_PYTHON_MODULES_DIR |
| "${VTK_INSTALL_RUNTIME_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}" |
| CACHE INTERNAL "Directory where python modules will be installed") |
| --- VTK-8.2.0/ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py.orig 2019-05-22 15:14:18.614402100 +0300 |
| +++ VTK-8.2.0/ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py 2019-05-22 15:15:06.457469200 +0300 |
| @@ -16,6 +16,7 @@ |
| import string |
| import sys |
| import os |
| +from sysconfig import _POSIX_BUILD |
| |
| def get_install_path(command, *args): |
| """Return the module install path, given the arguments that were |
| @@ -84,7 +85,7 @@ |
| platlib = home+'/lib/python' |
| scripts = home+'/bin' |
| data = home |
| - elif os.name == 'posix': |
| + elif os.name == 'posix' or _POSIX_BUILD: |
| ver = sys.version[0:3] |
| purelib = prefix+'/lib/python'+ver+'/site-packages' |
| platlib = exec_prefix+'/lib/python'+ver+'/site-packages' |
| --- VTK-8.2.0/CMake/FindPythonLibs.cmake.orig 2019-01-30 18:15:13.000000000 +0100 |
| +++ VTK-8.2.0/CMake/FindPythonLibs.cmake 2021-01-03 10:14:54.693475800 +0100 |
| @@ -32,7 +32,7 @@ |
| # Use the executable's path as a hint |
| set(_Python_LIBRARY_PATH_HINT) |
| if(PYTHON_EXECUTABLE) |
| - if(WIN32) |
| + if(MSVC) |
| get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH) |
| if(_Python_PREFIX) |
| set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/libs) |
| @@ -70,11 +70,11 @@ |
| # the user supplied additional versions to the front. |
| set(_Python_VERSIONS |
| ${Python_ADDITIONAL_VERSIONS} ${_PythonInterp_VERSION} |
| - 2.7 2.6 2.5 3.6 3.5 3.4 3.3 3.2) |
| + 2.7 2.6 2.5 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2) |
| |
| foreach(_CURRENT_VERSION ${_Python_VERSIONS}) |
| string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION}) |
| - if(WIN32) |
| + if(MSVC) |
| find_library(PYTHON_DEBUG_LIBRARY |
| NAMES python${_CURRENT_VERSION_NO_DOTS}_d python |
| HINTS ${_Python_LIBRARY_PATH_HINT} |
| @@ -102,10 +102,6 @@ |
| python${_CURRENT_VERSION} |
| HINTS |
| ${_Python_LIBRARY_PATH_HINT} |
| - PATHS |
| - ${PYTHON_FRAMEWORK_LIBRARIES} |
| - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs |
| - [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs |
| # Avoid finding the .dll in the PATH. We want the .lib. |
| NO_SYSTEM_ENVIRONMENT_PATH |
| ) |