File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515"""Constants used by parts of pip_repository for naming libraries and wheels."""
1616
17+ EXTRACTED_WHEEL_FILES = "extracted_whl_files"
1718WHEEL_FILE_PUBLIC_LABEL = "whl"
1819WHEEL_FILE_IMPL_LABEL = "_whl"
1920PY_LIBRARY_PUBLIC_LABEL = "pkg"
Original file line number Diff line number Diff line change 2424 ":labels.bzl" ,
2525 "DATA_LABEL" ,
2626 "DIST_INFO_LABEL" ,
27+ "EXTRACTED_WHEEL_FILES" ,
2728 "PY_LIBRARY_IMPL_LABEL" ,
2829 "PY_LIBRARY_PUBLIC_LABEL" ,
2930 "WHEEL_ENTRY_POINT_PREFIX" ,
@@ -101,8 +102,16 @@ def whl_library_targets(
101102 srcs_exclude = [],
102103 tags = [],
103104 filegroups = {
104- DIST_INFO_LABEL : ["site-packages/*.dist-info/**" ],
105- DATA_LABEL : ["data/**" ],
105+ EXTRACTED_WHEEL_FILES : dict (
106+ include = ["**" ],
107+ exclude = ["*.whl" ],
108+ ),
109+ DIST_INFO_LABEL : dict (
110+ include = ["site-packages/*.dist-info/**" ],
111+ ),
112+ DATA_LABEL : dict (
113+ include = ["data/**" ],
114+ ),
106115 },
107116 dependencies = [],
108117 dependencies_by_platform = {},
@@ -168,10 +177,11 @@ def whl_library_targets(
168177 tags = sorted (tags )
169178 data = [] + data
170179
171- for filegroup_name , glob in filegroups .items ():
180+ for filegroup_name , glob_kwargs in filegroups .items ():
181+ glob_kwargs = {"allow_empty" : True } | glob_kwargs
172182 native .filegroup (
173183 name = filegroup_name ,
174- srcs = native .glob (glob , allow_empty = True ),
184+ srcs = native .glob (** glob_kwargs ),
175185 visibility = ["//visibility:public" ],
176186 )
177187
You can’t perform that action at this time.
0 commit comments