From 1ef112a3dc61e3e4304bc6a07dc6047ee3a6ac9c Mon Sep 17 00:00:00 2001 From: Bruno S Marques Date: Wed, 18 Sep 2024 15:27:20 -0700 Subject: [PATCH] Added conditional verification to python executable. (#500) Summary: Added conditional verification to python executable to search for python instead of python3 on Windows. This code without this modification is searching for python as python3.exe in Windows, but in the OS, python is installed as python.exe, what cause an incorrect python not found. Issue: https://github.com/facebook/proxygen/issues/499 Pull Request resolved: https://github.com/facebook/proxygen/pull/500 Reviewed By: kvtsoy Differential Revision: D62987053 Pulled By: afrind fbshipit-source-id: fb21d711483b350d0b86b481cf876c95b82334e0 --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f97377dfc..dde1bcda84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,12 @@ set(PROXYGEN_GENERATED_ROOT ${CMAKE_CURRENT_BINARY_DIR}/generated) file(MAKE_DIRECTORY ${PROXYGEN_GENERATED_ROOT}) # Build-time program requirements. -find_program(PROXYGEN_PYTHON python3) +if(WIN32) + find_program(PROXYGEN_PYTHON python) +else() + find_program(PROXYGEN_PYTHON python3) +endif() + if(NOT PROXYGEN_PYTHON) message(FATAL_ERROR "python is required for the proxygen build") endif()