@@ -35,12 +35,9 @@ def _to_rlocation_path(workspace_name, file):
3535 else :
3636 return workspace_name + "/" + file .short_path
3737
38-
3938def _interpreter_path (workspace_name , py_toolchain ):
4039 return (
41- _to_rlocation_path (workspace_name , py_toolchain .python )
42- if py_toolchain .runfiles_interpreter
43- else py_toolchain .python .path
40+ _to_rlocation_path (workspace_name , py_toolchain .python ) if py_toolchain .runfiles_interpreter else py_toolchain .python .path
4441 )
4542
4643# FIXME: This is derived directly from the py_binary.bzl rule and should really
@@ -114,8 +111,8 @@ def _py_venv_base_impl(ctx):
114111 workspace_name = ctx .workspace_name
115112
116113 args = ctx .actions .args ()
117- args .add_all ([venv_dir ], expand_directories = False , format_each = "--location=%s" )
118- args .add (py_shim .bin .bin , format = "--venv-shim=%s" )
114+ args .add_all ([venv_dir ], expand_directories = False , format_each = "--location=%s" )
115+ args .add (py_shim .bin .bin , format = "--venv-shim=%s" )
119116
120117 # Post-bzlmod we need to record the current repository in case the
121118 # user tries to consume a `py_venv_binary` across repo boundaries
@@ -126,9 +123,10 @@ def _py_venv_base_impl(ctx):
126123 )
127124 args .add_all (
128125 [py_toolchain ],
129- map_each = lambda py_toolchain : _interpreter_path (workspace_name , py_toolchain ),
126+ map_each = lambda py_toolchain : _interpreter_path (workspace_name , py_toolchain ),
130127 format_each = "--python=%s" ,
131- allow_closure = True )
128+ allow_closure = True ,
129+ )
132130 args .add (site_packages_pth_file , format = "--pth-file=%s" )
133131 args .add (env_file , format = "--env-file=%s" )
134132 args .add (ctx .bin_dir .path , format = "--bin-dir=%s" )
0 commit comments