Skip to content

Commit

Permalink
[bazel] Switch to rules_python for python rules
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Aug 13, 2019
1 parent f1b87b6 commit 811e42d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
17 changes: 17 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,20 @@ npm_install(
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")

install_bazel_dependencies()

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "rules_python",
remote = "https://github.com/bazelbuild/rules_python.git",
commit = "4b84ad270387a7c439ebdccfd530e2339601ef27",
shallow_since = "1564776078 -0400"
)

# This call should always be present.
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()

# This one is only needed if you're using the packaging rules.
load("@rules_python//python:pip.bzl", "pip_repositories")
pip_repositories()
4 changes: 3 additions & 1 deletion py/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")

genrule(
name = "get-attribute",
srcs = ["//javascript/webdriver/atoms:get-attribute.js"],
Expand Down Expand Up @@ -34,4 +36,4 @@ py_test(
":main",
],
legacy_create_init = False,
)
)
1 change: 1 addition & 0 deletions third_party/py/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 811e42d

Please sign in to comment.