@@ -535,12 +535,16 @@ def _create_venv(ctx, output_prefix, imports, runtime_details, add_runfiles_root
535535
536536 is_windows = target_platform_has_any_constraint (ctx , ctx .attr ._windows_constraints )
537537 if is_windows :
538- venv_details = _create_venv_windows (ctx , venv_root = venv_root ,
538+ venv_details = _create_venv_windows (
539+ ctx ,
540+ venv_root = venv_root ,
539541 interpreter_actual_path = interpreter_actual_path ,
540542 runtime = runtime ,
541543 )
542544 else :
543- venv_details = _create_venv_unixy (ctx , venv_root = venv_root ,
545+ venv_details = _create_venv_unixy (
546+ ctx ,
547+ venv_root = venv_root ,
544548 interpreter_actual_path = interpreter_actual_path ,
545549 runtime = runtime ,
546550 )
@@ -614,6 +618,7 @@ def _create_venv_unixy(ctx, *, venv_root, runtime, interpreter_actual_path):
614618 interpreter_runfiles = builders .RunfilesBuilder ()
615619 is_bootstrap_script = BootstrapImplFlag .get_value (ctx ) == BootstrapImplFlag .SCRIPT
616620 create_full_venv = True
621+
617622 # The legacy build_python_zip codepath (enabled by default on windows) isn't
618623 # compatible with full venv.
619624 # TODO: Use non-build_python_zip codepath for Windows
@@ -736,14 +741,14 @@ def _create_venv_windows(ctx, *, venv_root, runtime, interpreter_actual_path):
736741 interpreter_runfiles = interpreter_runfiles .build (ctx ),
737742 )
738743
739- def _venv_details (* ,
744+ def _venv_details (
745+ * ,
740746 interpreter ,
741747 pyvenv_cfg ,
742748 venv_site_packages ,
743749 bin_dir ,
744750 recreate_venv_at_runtime ,
745- interpreter_runfiles ,
746- ):
751+ interpreter_runfiles ):
747752 """Helper to create a struct of platform-specific venv details."""
748753 return struct (
749754 # File; the `bin/python` executable (or equivalent) within the venv.
@@ -851,7 +856,6 @@ def _create_stage1_bootstrap(
851856 else :
852857 resolve_python_binary_at_runtime = "1"
853858
854-
855859 subs = {
856860 "%interpreter_args%" : "\n " .join (ctx .attr .interpreter_args ),
857861 "%is_zipfile%" : "1" if is_for_zip else "0" ,
0 commit comments