Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5aa465d

Browse filesBrowse files
authored
Fix WORKSPACE/distro boilerplate (bazel-contrib#238)
We don't have a toolchain method, so don't try to call one in WORKSPACE. Add optional pip_repositories() call to README and add note that relnotes need manual editing for this.
1 parent 9150caa commit 5aa465d
Copy full SHA for 5aa465d

File tree

2 files changed

+8
-5
lines changed
Filter options

2 files changed

+8
-5
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ http_archive(
4747
url = "https://github.com/bazelbuild/rules_python/releases/download/<RELEASE>/rules_python-<RELEASE>.tar.gz",
4848
sha256 = "<SHA>",
4949
)
50-
load("@rules_python//python:repositories.bzl", "py_repositories", "rules_python_toolchains")
50+
load("@rules_python//python:repositories.bzl", "py_repositories")
5151
py_repositories()
52-
rules_python_toolchains()
52+
# Only needed if using the packaging rules.
53+
load("@rules_python//python:pip.bzl", "pip_repositories")
54+
pip_repositories()
5355
```
5456

5557
Otherwise, you may import rules_python in a standalone way by copying the
@@ -63,10 +65,9 @@ git_repository(
6365
# NOT VALID: Replace with actual Git commit SHA.
6466
commit = "{HEAD}",
6567
)
66-
# This call should always be present.
6768
load("@rules_python//python:repositories.bzl", "py_repositories")
6869
py_repositories()
69-
# This one is only needed if you're using the packaging rules.
70+
# Only needed if using the packaging rules.
7071
load("@rules_python//python:pip.bzl", "pip_repositories")
7172
pip_repositories()
7273
```

‎distro/BUILD

Copy file name to clipboardExpand all lines: distro/BUILD
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ pkg_tar(
2121
strip_prefix = ".",
2222
)
2323

24+
# TODO(brandjon): print_rel_notes doesn't appear to handle our use case of
25+
# emitting an optional additional deps method from a different file. For now we
26+
# manually adjust our release notes.
2427
print_rel_notes(
2528
name = "relnotes",
2629
outs = ["relnotes.txt"],
2730
deps_method = "py_repositories",
2831
repo = "rules_python",
2932
setup_file = "python:repositories.bzl",
30-
toolchains_method = "rules_python_toolchains",
3133
version = version,
3234
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.