File tree Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ def _lock_impl(ctx):
108108 _add_args ("--generate-hashes" )
109109 if not ctx .attr .strip_extras :
110110 _add_args ("--no-strip-extras" )
111+ for constraint in ctx .attr .build_constraints :
112+ _add_args ("--build-constraints" , constraint )
113+ for constraint in ctx .attr .constraints :
114+ _add_args ("--constraints" , constraint )
111115
112116 lock_args .add ("--no-progress" )
113117 lock_args .add ("--quiet" )
@@ -149,6 +153,16 @@ _lock = rule(
149153 "args" : attr .string_list (
150154 doc = "Args to pass to `uv`." ,
151155 ),
156+ "build_constraints" : attr .label_list (
157+ mandatory = False ,
158+ allow_files = True ,
159+ doc = """The files to constrain the resolution.""" ,
160+ ),
161+ "constraints" : attr .label_list (
162+ mandatory = False ,
163+ allow_files = True ,
164+ doc = """The files to constrain the versions used when building wheels.""" ,
165+ ),
152166 "env" : attr .string_dict (
153167 doc = """\
154168 The env variables that are set when executing `uv`.
Original file line number Diff line number Diff line change 1- $out = " {{src_out}}"
2- if [[ - n " $env: BUILD_WORKSPACE_DIRECTORY " ]]; then
3- $out = " $env: BUILD_WORKSPACE_DIRECTORY \$out "
4- else
5- Copy-Item " $out " " {{bazel_out}}"
6- out= " {{bazel_out}}"
7- fi
8- & " {{uv}}" pip compile " {{args}}" -- output- file " $out " $args
1+ $out = " {{src_out}}"
2+
3+ if ($env: BUILD_WORKSPACE_DIRECTORY ) {
4+ $out = Join-Path - Path $env: BUILD_WORKSPACE_DIRECTORY - ChildPath $out
5+ } else {
6+ Copy-Item - Path $out - Destination " {{bazel_out}}" - Force
7+ $out = " {{bazel_out}}"
8+ }
9+
10+ & " {{uv}}" pip compile " {{args}}" -- output- file $out $args
You can’t perform that action at this time.
0 commit comments