File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -777,6 +777,12 @@ def _create_stage1_bootstrap(
777777
778778 python_binary_actual = venv .interpreter_actual_path if venv else ""
779779
780+ # Runtime may be None on Windows due to the --python_path flag.
781+ if runtime and runtime .supports_build_time_venv :
782+ resolve_python_binary_at_runtime = "0"
783+ else :
784+ resolve_python_binary_at_runtime = "1"
785+
780786 subs = {
781787 "%interpreter_args%" : "\n " .join ([
782788 '"{}"' .format (v )
@@ -786,7 +792,7 @@ def _create_stage1_bootstrap(
786792 "%python_binary%" : python_binary_path ,
787793 "%python_binary_actual%" : python_binary_actual ,
788794 "%recreate_venv_at_runtime%" : str (int (venv .recreate_venv_at_runtime )) if venv else "0" ,
789- "%resolve_python_binary_at_runtime%" : "0" if runtime . supports_build_time_venv else "1" ,
795+ "%resolve_python_binary_at_runtime%" : resolve_python_binary_at_runtime ,
790796 "%target%" : str (ctx .label ),
791797 "%venv_rel_site_packages%" : venv .venv_site_packages if venv else "" ,
792798 "%workspace_name%" : ctx .workspace_name ,
You can’t perform that action at this time.
0 commit comments