@@ -81,10 +81,10 @@ This is only needed on Windows, where Bazel doesn't preserve declare_symlink
8181with relative paths.
8282""" ,
8383 fields = {
84+ "link_to" : "Path the symlink should point to" ,
8485 "rf_path" : "runfile-root-relative path for the link" ,
8586 "venv_rel_path" : "venv-root-relative path for the link" ,
86- "link_to" : "Path the symlink should point to"
87- }
87+ },
8888)
8989
9090# Non-Google-specific attributes for executables
@@ -754,11 +754,11 @@ def _create_venv_windows(ctx, *, venv_ctx_rel_root, runtime, interpreter_actual_
754754 rf_path = rf_path ,
755755 venv_rel_path = venv_rel_path ,
756756 link_to = relative_path (
757- # dirname is necessary because a relative symlink is relative to
758- # the directory the symlink resides within.
757+ # dirname is necessary because a relative symlink is relative to
758+ # the directory the symlink resides within.
759759 from_ = paths .dirname (rf_path ),
760760 to = interpreter_actual_path ,
761- )
761+ ),
762762 ))
763763 else :
764764 interpreter = ctx .actions .declare_symlink ("{}/{}" .format (venv_bin_ctx_rel_path , py_exe_basename ))
@@ -782,7 +782,7 @@ def _create_venv_windows(ctx, *, venv_ctx_rel_root, runtime, interpreter_actual_
782782 # the directory the symlink resides within.
783783 from_ = paths .dirname (rf_path ),
784784 to = runfiles_root_path (ctx , f .short_path ),
785- )
785+ ),
786786 ))
787787
788788 # See site.py logic: Windows uses a version/build agnostic site-packages path
@@ -806,8 +806,7 @@ def _venv_details(
806806 bin_dir ,
807807 recreate_venv_at_runtime ,
808808 interpreter_runfiles ,
809- interpreter_symlinks ,
810- ):
809+ interpreter_symlinks ):
811810 """Helper to create a struct of platform-specific venv details."""
812811 return struct (
813812 # File; the `bin/python` executable (or equivalent) within the venv.
@@ -931,8 +930,12 @@ def _create_stage1_bootstrap(
931930 }
932931 computed_subs = ctx .actions .template_dict ()
933932 if venv :
934- computed_subs .add_joined ("%runtime_venv_symlinks%" ,
935- venv .interpreter_symlinks , join_with = "\n " , map_each = _map_runtime_venv_symlink )
933+ computed_subs .add_joined (
934+ "%runtime_venv_symlinks%" ,
935+ venv .interpreter_symlinks ,
936+ join_with = "\n " ,
937+ map_each = _map_runtime_venv_symlink ,
938+ )
936939
937940 if stage2_bootstrap :
938941 subs ["%stage2_bootstrap%" ] = runfiles_root_path (ctx , stage2_bootstrap .short_path )
0 commit comments