File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ load("@py_dev_requirements//:requirements.bzl", "requirement")
6
6
load ("//common:defs.bzl" , "copy_file" )
7
7
load ("//py:defs.bzl" , "py_test_suite" )
8
8
load ("//py/private:browsers.bzl" , "BROWSERS" )
9
+ load ("//py/private:import.bzl" , "py_import" )
9
10
load ("@rules_python//python:pip.bzl" , "compile_pip_requirements" )
10
11
11
12
compile_pip_requirements (
@@ -164,6 +165,7 @@ pkg_files(
164
165
"README.rst" ,
165
166
"setup.py" ,
166
167
":selenium-pkg" ,
168
+ ":selenium-pkginfo" ,
167
169
],
168
170
strip_prefix = strip_prefix .from_pkg (),
169
171
)
@@ -176,6 +178,18 @@ pkg_tar(
176
178
package_file_name = "selenium-%s.tar.gz" % SE_VERSION ,
177
179
)
178
180
181
+ genrule (
182
+ name = "selenium-pkginfo" ,
183
+ srcs = [":selenium-wheel-lib" ],
184
+ cmd = "cp $(location :selenium-wheel-lib)/selenium-%s.dist-info/METADATA $@" % SE_VERSION ,
185
+ outs = ["PKG-INFO" ],
186
+ )
187
+
188
+ py_import (
189
+ name = "selenium-wheel-lib" ,
190
+ wheel = ":selenium-wheel" ,
191
+ )
192
+
179
193
py_wheel (
180
194
name = "selenium-wheel" ,
181
195
classifiers = [
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ def _py_import_impl(ctx):
35
35
runfiles = runfiles .merge (dep [DefaultInfo ].default_runfiles )
36
36
37
37
imports = depset (
38
- items = [
38
+ [
39
39
"%s/%s/%s-pyroot" % (ctx .workspace_name , ctx .label .package , ctx .label .name ),
40
40
],
41
41
transitive = [dep [PyInfo ].imports for dep in ctx .attr .deps ],
42
42
)
43
43
transitive_sources = depset (
44
- items = [],
44
+ [],
45
45
transitive = [dep [PyInfo ].transitive_sources for dep in ctx .attr .deps ],
46
46
)
47
47
@@ -57,7 +57,7 @@ def _py_import_impl(ctx):
57
57
58
58
return [
59
59
DefaultInfo (
60
- files = depset (items = [root ]),
60
+ files = depset ([root ]),
61
61
default_runfiles = runfiles ,
62
62
),
63
63
info ,
You can’t perform that action at this time.
0 commit comments