From 93753ddd365e68eb99e4f4af04a75e608799ae40 Mon Sep 17 00:00:00 2001 From: Alexy Pellegrini Date: Fri, 23 Aug 2024 13:52:05 +0200 Subject: [PATCH 1/2] Remove mangling of VTK dlls in Windows' Python wheels VTK SDK (https://vtk.org/files/wheel-sdks) is unusable on Windows since !10095 has been merged due to mangling being enable. This removes mangling for the VTK DLLs, but not for their dependencies such as OSMesa. --- .gitlab/os-windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index 646ef60f2a4..eb01ba8c909 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -352,7 +352,8 @@ - python "$env:GIT_CLONE_PATH\.gitlab\ci\create_wheel_sdk_archive.py" - pip install delvewheel - delvewheel show --add-path "bin" (Get-ChildItem dist\*.whl | % FullName) | Out-File -FilePath "$env:GIT_CLONE_PATH\wheel_output.log" - - delvewheel repair --add-path "bin" (Get-ChildItem dist\*.whl | % FullName) | Out-File -Append -FilePath "$env:GIT_CLONE_PATH\wheel_output.log" + - $no_mangle = (Get-ChildItem -Path ".\bin" -Filter "*.dll" -File -Name) -join ';' + - delvewheel repair --add-path "bin" --no-mangle "$no_mangle" (Get-ChildItem dist\*.whl | % FullName) | Out-File -Append -FilePath "$env:GIT_CLONE_PATH\wheel_output.log" - Rename-Item -Path dist -NewName dist-orig - Rename-Item -Path wheelhouse -NewName dist - cd .. -- GitLab From 2c7e172e955eb51a83a8af7bb50aae23e5c436ee Mon Sep 17 00:00:00 2001 From: Alexy Pellegrini Date: Fri, 23 Aug 2024 14:43:09 +0200 Subject: [PATCH 2/2] Add full version to VTK DLLs when building Python wheel on Windows Full version is "major.minor.patch", for example "9.3.20240525" for untaged version or "9.3.1" for a tagged release. --- CMake/vtkWheelPreparation.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMake/vtkWheelPreparation.cmake b/CMake/vtkWheelPreparation.cmake index 454c16b9b6b..5a57080c3ad 100644 --- a/CMake/vtkWheelPreparation.cmake +++ b/CMake/vtkWheelPreparation.cmake @@ -74,7 +74,11 @@ else () "${setup_py_build_dir}/vtkmodules") endif () set(VTK_PYTHON_SITE_PACKAGES_SUFFIX ".") -set(VTK_CUSTOM_LIBRARY_SUFFIX "") +if (WIN32) + set(VTK_CUSTOM_LIBRARY_SUFFIX "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}") +else() + set(VTK_CUSTOM_LIBRARY_SUFFIX "") +endif() if(NOT DEFINED VTK_INSTALL_SDK) set(VTK_INSTALL_SDK OFF) endif() -- GitLab