vtk: Update to 8.2.0. Switch to python3 and build more modules
This commit is contained in:
64
mingw-w64-vtk/008-fix-python-modules-path.patch
Normal file
64
mingw-w64-vtk/008-fix-python-modules-path.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
--- 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-05-22 15:23:02.502137600 +0300
|
||||
+++ VTK-8.2.0/CMake/FindPythonLibs.cmake 2019-05-22 15:24:36.966270100 +0300
|
||||
@@ -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.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}
|
||||
Reference in New Issue
Block a user