File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ Unreleased changes template.
59
59
* (pypi) The ` ppc64le ` is now pointing to the right target in the ` platforms ` package.
60
60
* (gazelle) No longer incorrectly merge ` py_binary ` targets during partial updates in
61
61
` file ` generation mode. Fixed in [ #2619 ] ( https://github.com/bazelbuild/rules_python/pull/2619 ) .
62
+ * (gazelle) Don't collapse depsets to a list or into args when generating the modules mapping file.
63
+ Support spilling modules mapping args into a params file.
62
64
63
65
{#v0-0-0-added}
64
66
### Added
Original file line number Diff line number Diff line change @@ -25,18 +25,22 @@ module name doesn't match the wheel distribution name.
25
25
26
26
def _modules_mapping_impl (ctx ):
27
27
modules_mapping = ctx .actions .declare_file (ctx .attr .modules_mapping_name )
28
- args = ctx .actions .args ()
29
28
all_wheels = depset (
30
29
[whl for whl in ctx .files .wheels ],
31
30
transitive = [dep [DefaultInfo ].files for dep in ctx .attr .wheels ] + [dep [DefaultInfo ].data_runfiles .files for dep in ctx .attr .wheels ],
32
31
)
33
- args .add ("--output_file" , modules_mapping .path )
32
+
33
+ args = ctx .actions .args ()
34
+ args .use_param_file (param_file_arg = "@%s" )
35
+ args .set_param_file_format (format = "multiline" )
34
36
if ctx .attr .include_stub_packages :
35
37
args .add ("--include_stub_packages" )
38
+ args .add ("--output_file" , modules_mapping )
36
39
args .add_all ("--exclude_patterns" , ctx .attr .exclude_patterns )
37
- args .add_all ("--wheels" , [whl .path for whl in all_wheels .to_list ()])
40
+ args .add_all ("--wheels" , all_wheels )
41
+
38
42
ctx .actions .run (
39
- inputs = all_wheels . to_list () ,
43
+ inputs = all_wheels ,
40
44
outputs = [modules_mapping ],
41
45
executable = ctx .executable ._generator ,
42
46
arguments = [args ],
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ def data_has_purelib_or_platlib(path):
152
152
parser = argparse .ArgumentParser (
153
153
prog = "generator" ,
154
154
description = "Generates the modules mapping used by the Gazelle manifest." ,
155
+ fromfile_prefix_chars = "@" ,
155
156
)
156
157
parser .add_argument ("--output_file" , type = str )
157
158
parser .add_argument ("--include_stub_packages" , action = "store_true" )
You can’t perform that action at this time.
0 commit comments