1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-04-19 01:04:16 +03:00

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
This commit is contained in:
Bruno S Marques 2024-09-18 15:27:20 -07:00 committed by Facebook GitHub Bot
parent 3762e0802f
commit 1ef112a3dc

View File

@ -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()