Skip to content

Commit

Permalink
Update rules_python and use new deps installer (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
keith authored Mar 24, 2023
1 parent a68bf9f commit 9865504
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ rules_fuzzing_dependencies()
load("@rules_fuzzing//fuzzing:init.bzl", "rules_fuzzing_init")

rules_fuzzing_init()

load("@fuzzing_py_deps//:requirements.bzl", "install_deps")

install_deps()
```

> NOTE: Replace this snippet with the [latest release instructions](https://github.com/bazelbuild/rules_fuzzing/releases/latest). To get the latest unreleased features, you may need to change the `urls` and `sha256` attributes to fetch from `HEAD`. For more complex `WORKSPACE` files, you may also need to reconcile conflicting dependencies; read more in the [Bazel documentation](https://docs.bazel.build/versions/master/external.html).
Expand Down
4 changes: 4 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ load("@rules_fuzzing//fuzzing:init.bzl", "rules_fuzzing_init")

rules_fuzzing_init()

load("@fuzzing_py_deps//:requirements.bzl", "install_deps")

install_deps()

load("@jazzer//:repositories.bzl", "jazzer_dependencies")

jazzer_dependencies()
Expand Down
4 changes: 2 additions & 2 deletions fuzzing/init.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

"""Dependency initialization utilities."""

load("@rules_python//python:pip.bzl", "pip_install")
load("@rules_python//python:pip.bzl", "pip_parse")
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

def rules_fuzzing_init():
pip_install(
pip_parse(
name = "fuzzing_py_deps",
extra_pip_args = ["--require-hashes"],
requirements = "@rules_fuzzing//fuzzing:requirements.txt",
Expand Down
6 changes: 3 additions & 3 deletions fuzzing/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def rules_fuzzing_dependencies(oss_fuzz = True, honggfuzz = True, jazzer = False
maybe(
http_archive,
name = "rules_python",
sha256 = "c03246c11efd49266e8e41e12931090b613e12a59e6f55ba2efd29a7cb8b4258",
strip_prefix = "rules_python-0.11.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.11.0.tar.gz",
sha256 = "a644da969b6824cc87f8fe7b18101a8a6c57da5db39caa6566ec6109f37d2141",
strip_prefix = "rules_python-0.20.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.20.0.tar.gz",
)
maybe(
http_archive,
Expand Down

0 comments on commit 9865504

Please sign in to comment.