SHA256
1
0
forked from pool/vtk
vtk/0001-Always-generate-Python-Metadata-when-WRAP_PYTHON-is-.patch
Stefan Brüns d4d99e1c44 Accepting request 933294 from home:StefanBruens:branches:science
- Update to version 9.1.0, see:
  https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/release/9.1.md
- Drop upstream patches:
  + 0001-clean-up-some-old-opengl-es-stuff.patch
  + 0001-expose-1d-texture-options.patch
  + 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch
  + 0001-Allow-compilation-on-GLES-platforms.patch
  + 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch
  + 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch
  + 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch
  + 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch
  + 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch
  + vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch
  + vtk-std_numeric_limits.patch
- Rebase:
  + 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch
  + 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch
  + 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch
- Replace openSUSE python hack with upstreamable solution:
  + vtk-opensuse-python-metadata.patch ->
    0001-Always-generate-Python-Metadata-when-WRAP_PYTHON-is-.patch,
    0001-Consider-VTK_PYTHON_SITE_PACKAGES_SUFFIX-for-Python-.patch
- Add:
  + 0001-Add-missing-libm-link-library-to-kissfft-module.patch
- Remove Leap 15.1 support from specfile
- Remove openmpi1 flavor, add openmpi4

OBS-URL: https://build.opensuse.org/request/show/933294
OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=170
2021-11-25 00:20:17 +00:00

96 lines
2.8 KiB
Diff

From a08e2a67c1e6694ba2eb2631c7e8e371bd055b46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sat, 20 Nov 2021 23:26:05 +0100
Subject: [PATCH] Always generate Python Metadata when WRAP_PYTHON is active
Python Metadata in accordance with PEP 314 is not only used by wheels
(PEP 427/PEP 491), but can also used for `python setup.py
install_egg_info`.
The latter can be used to make a system wide VTK installation available
for other python packages (e.g. installed via pip) which require VTK.
Without the metadata, pip will not find it and always try to download the
wheel.
---
CMake/vtkPythonMetadata.cmake | 17 +++++++++++++++++
CMake/vtkWheelPreparation.cmake | 18 -----------------
CMakeLists.txt | 3 ++-
3 files changed, 19 insertions(+), 19 deletions(-)
create mode 100644 CMake/vtkPythonMetadata.cmake
diff --git a/CMake/vtkPythonMetadata.cmake b/CMake/vtkPythonMetadata.cmake
new file mode 100644
index 0000000000..44fb591321
--- /dev/null
+++ b/CMake/vtkPythonMetadata.cmake
@@ -0,0 +1,17 @@
+configure_file(
+ "${CMAKE_CURRENT_LIST_DIR}/setup.py.in"
+ "${CMAKE_BINARY_DIR}/setup.py"
+ @ONLY)
+configure_file(
+ "${CMAKE_CURRENT_LIST_DIR}/MANIFEST.in.in"
+ "${CMAKE_BINARY_DIR}/MANIFEST.in"
+ @ONLY)
+configure_file(
+ "${CMAKE_SOURCE_DIR}/Copyright.txt"
+ "${CMAKE_BINARY_DIR}/LICENSE"
+ COPYONLY)
+configure_file(
+ "${CMAKE_SOURCE_DIR}/README.md"
+ "${CMAKE_BINARY_DIR}/README.md"
+ COPYONLY)
+
diff --git a/CMake/vtkWheelPreparation.cmake b/CMake/vtkWheelPreparation.cmake
index 0a4c4786d0..df56a3d98c 100644
--- a/CMake/vtkWheelPreparation.cmake
+++ b/CMake/vtkWheelPreparation.cmake
@@ -84,22 +84,4 @@ elseif (UNIX)
endif ()
set(VTK_PYTHON_OPTIONAL_LINK ON)
-configure_file(
- "${CMAKE_CURRENT_LIST_DIR}/setup.py.in"
- "${CMAKE_BINARY_DIR}/setup.py"
- @ONLY)
-configure_file(
- "${CMAKE_CURRENT_LIST_DIR}/MANIFEST.in.in"
- "${CMAKE_BINARY_DIR}/MANIFEST.in"
- @ONLY)
-configure_file(
- "${CMAKE_SOURCE_DIR}/Copyright.txt"
- "${CMAKE_BINARY_DIR}/LICENSE"
- COPYONLY)
-configure_file(
- "${CMAKE_SOURCE_DIR}/README.md"
- "${CMAKE_BINARY_DIR}/README.md"
- COPYONLY)
-
-unset(license_file)
unset(wheel_data_dir)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 371ffd61a6..ccd4409251 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -447,6 +447,8 @@ if (VTK_WRAP_PYTHON)
TARGET_SPECIFIC_COMPONENTS "${VTK_TARGET_SPECIFIC_COMPONENTS}"
TARGET VTK::vtkpythonmodules)
+ include(vtkPythonMetadata)
+
if (APPLE AND VTK_WHEEL_BUILD)
list(REMOVE_ITEM CMAKE_INSTALL_RPATH
"@loader_path/.dylibs")
@@ -547,7 +549,7 @@ install(
# TODO: HeaderTest exclusions for memcheck.
-if (VTK_WHEEL_BUILD)
+if (VTK_WRAP_PYTHON)
include(vtkWheelFinalization)
endif ()
--
2.33.1