Skip to content

Commit 811e42d

Browse files
committed
[bazel] Switch to rules_python for python rules
1 parent f1b87b6 commit 811e42d

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

WORKSPACE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,20 @@ npm_install(
5151
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
5252

5353
install_bazel_dependencies()
54+
55+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
56+
57+
git_repository(
58+
name = "rules_python",
59+
remote = "https://github.com/bazelbuild/rules_python.git",
60+
commit = "4b84ad270387a7c439ebdccfd530e2339601ef27",
61+
shallow_since = "1564776078 -0400"
62+
)
63+
64+
# This call should always be present.
65+
load("@rules_python//python:repositories.bzl", "py_repositories")
66+
py_repositories()
67+
68+
# This one is only needed if you're using the packaging rules.
69+
load("@rules_python//python:pip.bzl", "pip_repositories")
70+
pip_repositories()

py/BUILD.bazel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
2+
13
genrule(
24
name = "get-attribute",
35
srcs = ["//javascript/webdriver/atoms:get-attribute.js"],
@@ -34,4 +36,4 @@ py_test(
3436
":main",
3537
],
3638
legacy_create_init = False,
37-
)
39+
)

third_party/py/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)