vtk/vtk-opensuse-python-metadata.patch
Atri Bhattacharya 4e1cfe3078 Accepting request 901010 from home:bnavigator:branches:science
- Add vtk-opensuse-python-metadata.patch:
  Installing without VTK_BUILD_WHEEL lacks the dist-info/egg-info
  metadata. When a user installs python packages which depend
  on vtk through pip (into the user home or into a virtualenv),
  pip does not recognize the files installed into site-packages
  without the metadata and pulls in a big manylinux wheel from
  PyPI. We introduce the necessary egg-info metadata in order to
  avoid this.
- python3-vtk: Don't own the arch site-packages (%python3_sitearch)
  and the toplevel __pycache__ dir, only our own python files.
- Move qt and python .so devel files to main devel package, adjust
  rpmlintrc: The devel files are not required by the
  python bindings (anymore?).
- Add vtk-std_numeric_limits.patch in order to fix gcc 11.1 build
  https://gitlab.kitware.com/vtk/vtk/-/issues/18194
- Require %{name}-qt in python3-%{name}: The Python bindings link
  to libvtkRenderingQt.so.1, but zypper fails to resolve the
  requirement to the correct (non-)mpi flavor -- boo#1187161
- Change description: The vtk-qt subpackage provides some Qt
  libraries, not a designer plugin.
- Support for QtWebkit was removed with vtk 9.0.0: Remove the build
  requirement.

OBS-URL: https://build.opensuse.org/request/show/901010
OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=169
2021-06-27 22:21:07 +00:00

46 lines
1.2 KiB
Diff

Index: VTK-9.0.1/CMakeLists.txt
===================================================================
--- VTK-9.0.1.orig/CMakeLists.txt
+++ VTK-9.0.1/CMakeLists.txt
@@ -48,6 +48,8 @@ include(vtkCMakeBackports)
if (VTK_WHEEL_BUILD)
include(vtkWheelPreparation)
+elseif(VTK_OPENSUSE_PYTHON_BUILD)
+ include(vtkPythonMetadataPrepare)
endif ()
include(vtkCompilerChecks)
@@ -474,7 +476,7 @@ install(
# TODO: HeaderTest exclusions for memcheck.
-if (VTK_WHEEL_BUILD)
+if (VTK_WHEEL_BUILD OR VTK_OPENSUSE_PYTHON_BUILD)
include(vtkWheelFinalization)
endif ()
Index: VTK-9.0.1/CMake/vtkPythonMetadataPrepare.cmake
===================================================================
--- /dev/null
+++ VTK-9.0.1/CMake/vtkPythonMetadataPrepare.cmake
@@ -0,0 +1,18 @@
+# copied from vtkWheelPrepare, but without forcing wheel specific options
+
+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)