From 630b4432da9c2731fa9a1d3c5c33efdc263264f7 Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Mon, 30 Oct 2023 20:10:09 +0200
Subject: [PATCH] Revert "DRTVWR-587 Bring back the previously reverted change"

This reverts commit 9d49edbc48d81f820870d43edb2c975beffa5485.
---
 indra/cmake/Python.cmake | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake
index c8af9a528bc..da5d2ef22c2 100644
--- a/indra/cmake/Python.cmake
+++ b/indra/cmake/Python.cmake
@@ -40,15 +40,18 @@ elseif (WINDOWS)
     ${regpaths}
     ${pymaybe}
     )
+  find_package(Python3 COMPONENTS Interpreter)
 else()
   find_program(python python3)
+
+  if (python)
+    set(PYTHONINTERP_FOUND ON)
+  endif (python)
 endif (DEFINED ENV{PYTHON})
 
-if (python)
-  set(PYTHONINTERP_FOUND ON)
-else()
+if (NOT python)
   message(FATAL_ERROR "No Python interpreter found")
-endif (python)
+endif (NOT python)
 
 set(PYTHON_EXECUTABLE "${python}" CACHE FILEPATH "Python interpreter for builds")
 mark_as_advanced(PYTHON_EXECUTABLE)
-- 
GitLab