8000 Fix WORKSPACE/distro boilerplate by brandjon · Pull Request #238 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content

Fix WORKSPACE/distro boilerplate #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ http_archive(
url = "https://github.com/bazelbuild/rules_python/releases/download/<RELEASE>/rules_python-<RELEASE>.tar.gz",
sha256 = "<SHA>",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "rules_python_toolchains")
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
rules_python_toolchains()
# Only needed if using the packaging rules.
load("@rules_python//python:pip.bzl", "pip_repositories")
pip_repositories()
```

Otherwise, you may import rules_python in a standalone way by copying the
Expand All @@ -63,10 +65,9 @@ git_repository(
# NOT VALID: Replace with actual Git commit SHA.
commit = "{HEAD}",
)
# 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.
# Only needed if using the packaging rules.
load("@rules_python//python:pip.bzl", "pip_repositories")
pip_repositories()
```
Expand Down
4 changes: 3 additions & 1 deletion distro/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ pkg_tar(
strip_prefix = ".",
)

# TODO(brandjon): print_rel_notes doesn't appear to handle our use case of
# emitting an optional additional deps method from a different file. For now we
# manually adjust our release notes.
print_rel_notes(
name = "relnotes",
outs = ["relnotes.txt"],
deps_method = "py_repositories",
repo = "rules_python",
setup_file = "python:repositories.bzl",
toolchains_method = "rules_python_toolchains",
version = version,
)
0