From debc4ad2f459092aa2ba7929d78f44d9edb2dbd0 Mon Sep 17 00:00:00 2001
From: Ben Boeckel <ben.boeckel@kitware.com>
Date: Thu, 3 Jan 2019 14:03:46 -0500
Subject: [PATCH] python: write out the requirements.txt file again

---
 CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b58d7ffd46..32aacb5d5ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -265,6 +265,14 @@ if(VTK_DATA_EXCLUDE_FROM_ALL)
 endif()
 
 if (VTK_WRAP_PYTHON)
+  get_property(vtk_required_python_modules GLOBAL
+    PROPERTY  vtk_required_python_modules)
+  if (vtk_required_python_modules)
+    list(REMOVE_DUPLICATES vtk_required_python_modules)
+  endif ()
+  string(REPLACE ";" "\n" vtk_required_python_modules "${vtk_required_python_modules}")
+  file(WRITE "${CMAKE_BINARY_DIR}/requirements.txt"
+    "${vtk_required_python_modules}\n")
   vtk_module_wrap_python(
     MODULES         ${vtk_modules}
     INSTALL_EXPORT  VTK
-- 
GitLab