Skip to content

Commit cee8c4d

Browse files
committed
[bazel] Move rules_python to MODULE
1 parent 16db80a commit cee8c4d

File tree

3 files changed

+6953
-311
lines changed

3 files changed

+6953
-311
lines changed

MODULE.bazel

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module(name = "selenium")
22

3+
bazel_dep(name = "platforms", version = "0.0.8")
34
bazel_dep(name = "rules_dotnet", version = "0.14.0")
5+
bazel_dep(name = "rules_python", version = "0.31.0")
46
bazel_dep(name = "rules_ruby", version = "0.8.1")
57
bazel_dep(name = "rules_rust", version = "0.40.0")
68

@@ -13,6 +15,34 @@ use_repo(selenium_paket, "paket.nuget")
1315

1416
register_toolchains("@dotnet_toolchains//:all")
1517

18+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
19+
python.toolchain(
20+
is_default = True,
21+
python_version = "3.8",
22+
)
23+
python.toolchain(python_version = "3.9")
24+
python.toolchain(python_version = "3.10")
25+
python.toolchain(python_version = "3.11")
26+
use_repo(python, "pythons_hub")
27+
28+
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
29+
[
30+
pip.parse(
31+
hub_name = "py_dev_requirements",
32+
python_version = version,
33+
requirements_lock = "//py:requirements_lock.txt",
34+
)
35+
for version in [
36+
"3.8",
37+
"3.9",
38+
"3.10",
39+
"3.11",
40+
]
41+
]
42+
use_repo(pip, "py_dev_requirements")
43+
44+
register_toolchains("@pythons_hub//:all")
45+
1646
ruby = use_extension("@rules_ruby//ruby:extensions.bzl", "ruby")
1747
ruby.toolchain(
1848
name = "ruby",

0 commit comments

Comments
 (0)