Skip to content

Commit 48a7680

Browse files
committed
Revert "Improve FIREBASE_PYTHON_EXECUTABLE cmake cache var and make its usage ubiquitous"
It seemed to cause problems with the build. There is a better way in the iOS SDK anyways. This reverts commit c6346fd.
1 parent 05efff1 commit 48a7680

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

CMakeLists.txt

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,21 +86,8 @@ if (NOT FIREBASE_ANDROID_STL STREQUAL "")
8686
set(ANDROID_STL ${FIREBASE_ANDROID_STL})
8787
endif()
8888

89-
# Find a Python interpreter using the best available mechanism.
90-
if(${CMAKE_VERSION} VERSION_LESS "3.12")
91-
include(FindPythonInterp)
92-
set(DEFAULT_FIREBASE_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
93-
else()
94-
find_package(Python3 COMPONENTS Interpreter)
95-
set(DEFAULT_FIREBASE_PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
96-
endif()
97-
98-
set(
99-
FIREBASE_PYTHON_EXECUTABLE
100-
"${DEFAULT_FIREBASE_PYTHON_EXECUTABLE}"
101-
CACHE FILEPATH
102-
"The Python interpreter to use"
103-
)
89+
set(FIREBASE_PYTHON_EXECUTABLE "python" CACHE FILEPATH
90+
"The Python interpreter to use, such as one from a venv")
10491

10592
set(FIREBASE_XCODE_TARGET_FORMAT "frameworks" CACHE STRING
10693
"Format to output, 'frameworks' or 'libraries'")

cmake/external/firestore.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
include(ExternalProject)
16+
include(FindPythonInterp)
1617

1718
if(TARGET firestore)
1819
return()
@@ -32,6 +33,6 @@ ExternalProject_Add(
3233
BUILD_COMMAND ""
3334
INSTALL_COMMAND ""
3435
TEST_COMMAND ""
35-
PATCH_COMMAND ${FIREBASE_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake
36+
PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake
3637
HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}"
3738
)

0 commit comments

Comments
 (0)