File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ load("@py_dev_requirements//:requirements.bzl", "requirement")
66load ("//common:defs.bzl" , "copy_file" )
77load ("//py:defs.bzl" , "py_test_suite" )
88load ("//py/private:browsers.bzl" , "BROWSERS" )
9+ load ("//py/private:import.bzl" , "py_import" )
910load ("@rules_python//python:pip.bzl" , "compile_pip_requirements" )
1011
1112compile_pip_requirements (
@@ -164,6 +165,7 @@ pkg_files(
164165 "README.rst" ,
165166 "setup.py" ,
166167 ":selenium-pkg" ,
168+ ":selenium-pkginfo" ,
167169 ],
168170 strip_prefix = strip_prefix .from_pkg (),
169171)
@@ -176,6 +178,18 @@ pkg_tar(
176178 package_file_name = "selenium-%s.tar.gz" % SE_VERSION ,
177179)
178180
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+
179193py_wheel (
180194 name = "selenium-wheel" ,
181195 classifiers = [
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ def _py_import_impl(ctx):
3535 runfiles = runfiles .merge (dep [DefaultInfo ].default_runfiles )
3636
3737 imports = depset (
38- items = [
38+ [
3939 "%s/%s/%s-pyroot" % (ctx .workspace_name , ctx .label .package , ctx .label .name ),
4040 ],
4141 transitive = [dep [PyInfo ].imports for dep in ctx .attr .deps ],
4242 )
4343 transitive_sources = depset (
44- items = [],
44+ [],
4545 transitive = [dep [PyInfo ].transitive_sources for dep in ctx .attr .deps ],
4646 )
4747
@@ -57,7 +57,7 @@ def _py_import_impl(ctx):
5757
5858 return [
5959 DefaultInfo (
60- files = depset (items = [root ]),
60+ files = depset ([root ]),
6161 default_runfiles = runfiles ,
6262 ),
6363 info ,
You can’t perform that action at this time.
0 commit comments