@@ -313,6 +313,7 @@ def lock(*, name, srcs, out, args = [], env = None, **kwargs):
313313 """
314314 update_target = "{}.update" .format (name )
315315 locker_target = "{}.run" .format (name )
316+ template_target = "_{}.update_template" .format (name )
316317
317318 # Check if the output file already exists, if yes, first copy it to the
318319 # output file location in order to make `uv` not change the requirements if
@@ -353,16 +354,20 @@ def lock(*, name, srcs, out, args = [], env = None, **kwargs):
353354 # requirements file
354355 pkg = native .package_name ()
355356 expand_template (
356- name = update_target + "_gen" ,
357+ name = template_target ,
357358 out = update_target + ".py" ,
358359 template = "//python/uv/private:lock_copier.py" ,
359360 substitutions = {
360361 "{{dst}}" : "{}/{}" .format (pkg , out ),
361362 "{{src}}" : "{}/{}.out" .format (pkg , name ),
362363 "{{update_target}}" : "//{}/{}" .format (pkg , update_target ),
363364 },
365+ tags = ["manual" ],
364366 )
365367
368+ # TODO @aignas 2025-03-17: use a custom `py_binary` rule and
369+ # `ctx.actions.expand_template` instead of the bazel skylib rule. This
370+ # would make it possible to avoid the extra target.
366371 py_binary (
367372 name = update_target ,
368373 srcs = [update_target + ".py" ],
0 commit comments