Skip to content

Fix path to python on windows desktop build. #910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/gha/build_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import utils
import shutil
import subprocess
import sys

def append_line_to_file(path, line):
"""Append the given line to the end of the file if it's not already in the file.
Expand Down Expand Up @@ -234,6 +235,8 @@ def cmake_configure(build_dir, arch, msvc_runtime_library='static', linux_abi='l
# on different windows machines.
cmd.append('-A')
cmd.append('Win32') if arch == 'x86' else cmd.append('x64')
# Also, for Windows, specify the path to Python.
cmd.append('-DFIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=%s' % sys.executable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO It would be a good idea to specify -DFIREBASE_PYTHON_HOST_EXECUTABLE for all OS's, not just Windows.


# Use our special cmake flag to specify /MD vs /MT
if msvc_runtime_library == "static":
Expand Down