build: add PyPI fallback to Python setup (#16228)

This commit is contained in:
Daniel La Rocque authored and GitHub committed 2026-06-10 09:40:54 -05:00
1 parent 05a216b357
commit e38e05ff4a
1 file changed
+15 -1
+15 -1
View File
@@ -152,14 +152,28 @@ function(FirebaseSetupPythonInterpreter)
"${LOG_PREFIX}: Installing Python dependencies into "
"${PYVENV_DIRECTORY}: ${ARG_REQUIREMENTS}"
)
firebase_execute_process(
execute_process(
COMMAND
"${PYTHON_EXECUTABLE}"
-m
pip
install
${ARG_REQUIREMENTS}
RESULT_VARIABLE PIP_INSTALL_STATUS
)
if(NOT PIP_INSTALL_STATUS EQUAL 0)
message(STATUS "${LOG_PREFIX}: pip install failed. Retrying with public PyPI index...")
firebase_execute_process(
COMMAND
"${PYTHON_EXECUTABLE}"
-m
pip
install
--index-url
https://pypi.org/simple
${ARG_REQUIREMENTS}
)
endif()
endif()
# Write the stamp files.