Skip to content
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
6 changes: 4 additions & 2 deletions setuptools_rust/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,10 @@ def _replace_vendor_with_unknown(target: str) -> Optional[str]:
def _prepare_build_environment() -> Dict[str, str]:
"""Prepares environment variables to use when executing cargo build."""

executable = getattr(sys, "_base_executable", sys.executable)
if not os.path.exists(executable):
base_executable = getattr(sys, "_base_executable")
if base_executable and os.path.exists(base_executable):
executable = os.path.realpath(base_executable)
else:
executable = sys.executable

# Make sure that if pythonXX-sys is used, it builds against the current
Expand Down