@@ -887,39 +887,3 @@ index 000000000..bdb7b9f6a
887
887
+
888
888
+ set("${ARG_OUTVAR}" "${PYTHON_EXECUTABLE}" PARENT_SCOPE)
889
889
+endfunction(FirebaseSetupPythonInterpreter)
890
- diff --git a/cmake/python_setup.cmake b/cmake/python_setup.cmake
891
- index bdb7b9f6a..152744fab 100644
892
- --- a/cmake/python_setup.cmake
893
- +++ b/cmake/python_setup.cmake
894
- @@ -91,12 +91,30 @@ function(FirebaseSetupPythonInterpreter)
895
- "The Python interpreter on the host system to use"
896
- )
897
-
898
- + # Create a temporary directory into which to install the virtualenv
899
- + execute_process(
900
- + COMMAND
901
- + "${FIREBASE_PYTHON_HOST_EXECUTABLE}"
902
- + -c
903
- + "import tempfile; print(tempfile.mkdtemp('FirebaseSetupPythonInterpreter', 'pyvenv'))"
904
- + RESULT_VARIABLE
905
- + FIREBASE_PYVENV_MKDTEMP_RESULT
906
- + OUTPUT_VARIABLE
907
- + FIREBASE_PYVENV_MKDTEMP_OUTPUT
908
- + OUTPUT_STRIP_TRAILING_WHITESPACE
909
- + )
910
- + if(NOT FIREBASE_PYVENV_MKDTEMP_RESULT EQUAL 0)
911
- + message(FATAL_ERROR
912
- + "Failed to create a temporary directory for the Python virtualenv "
913
- + "using ${FIREBASE_PYTHON_HOST_EXECUTABLE}")
914
- + endif()
915
- +
916
- # Check if the virtualenv is already up-to-date by examining the contents of
917
- # its stamp files. The stamp files store the path of the host Python
918
- # interpreter and the dependencies that were installed by pip. If both of
919
- # these files exist and contain the same Python interpreter and dependencies
920
- # then just re-use the virtualenv; otherwise, re-create it.
921
- - set(PYVENV_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pyvenv/${ARG_KEY}")
922
- + set(PYVENV_DIRECTORY "${FIREBASE_PYVENV_MKDTEMP_OUTPUT}/${ARG_KEY}")
923
- set(STAMP_FILE1 "${PYVENV_DIRECTORY}/cmake_firebase_python_stamp1.txt")
924
- set(STAMP_FILE2 "${PYVENV_DIRECTORY}/cmake_firebase_python_stamp2.txt")
925
-
0 commit comments