Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Cleanup #403

Merged
merged 4 commits into from
Aug 1, 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
2 changes: 1 addition & 1 deletion examples/hellogrpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ py_test(
],
python_version = "PY2",
deps = [
"@yaml",
"@com_github_yaml_pyyaml//:yaml",
],
)
2 changes: 1 addition & 1 deletion examples/hellohttp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ py_test(
],
python_version = "PY2",
deps = [
"@yaml",
"@com_github_yaml_pyyaml//:yaml",
],
)

Expand Down
6 changes: 3 additions & 3 deletions k8s/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ py_library(
"//:__init__.py",
],
deps = [
"@com_github_yaml_pyyaml//:yaml",
"@containerregistry",
"@yaml",
],
)

Expand All @@ -62,8 +62,8 @@ par_binary(
python_version = "PY2",
visibility = ["//visibility:public"],
deps = [
"@com_github_yaml_pyyaml//:yaml",
"@containerregistry",
"@yaml",
],
)

Expand All @@ -82,6 +82,6 @@ par_binary(
python_version = "PY2",
visibility = ["//visibility:public"],
deps = [
"@yaml",
"@com_github_yaml_pyyaml//:yaml",
],
)
27 changes: 15 additions & 12 deletions k8s/k8s.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,25 @@ k8s_defaults = _k8s_defaults
def k8s_repositories():
"""Download dependencies of k8s rules."""

# Used by utilities for roundtripping yaml.
http_archive(
name = "yaml",
build_file_content = """
excludes = native.existing_rules().keys()

if "com_github_yaml_pyyaml" not in excludes:
# Used by utilities for roundtripping yaml.
http_archive(
name = "com_github_yaml_pyyaml",
build_file_content = """
py_library(
name = "yaml",
srcs = glob(["*.py"]),
srcs = glob(["lib/yaml/*.py"]),
imports = [
"lib",
],
visibility = ["//visibility:public"],
)""",
sha256 = "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab",
urls = [("https://pypi.python.org/packages/4a/85/" +
"db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a" +
"/PyYAML-3.12.tar.gz")],
strip_prefix = "PyYAML-3.12/lib/yaml",
)
sha256 = "6b4314b1b2051ddb9d4fcd1634e1fa9c1bb4012954273c9ff3ef689f6ec6c93e",
strip_prefix = "pyyaml-3.12",
urls = ["https://github.com/yaml/pyyaml/archive/3.12.zip"],
)

# Register the default kubectl toolchain targets for supported platforms
# note these work with the autoconfigured toolchain
Expand All @@ -46,7 +50,6 @@ py_library(
"@io_bazel_rules_k8s//toolchains/kubectl:kubectl_windows_toolchain",
)

excludes = native.existing_rules().keys()
if "io_bazel_rules_go" not in excludes:
# Only needed when building kubectl from source. It's always included
# here to keep all the http_archive calls in one function for simplicity.
Expand Down
2 changes: 2 additions & 0 deletions k8s/object.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ _k8s_object_delete = rule(
# See "attrs" parameter at https://docs.bazel.build/versions/master/skylark/lib/globals.html#parameters-26
_implicit_attrs = [
"visibility",
"restricted_to",
"compatible_with",
"deprecation",
"tags",
"testonly",
Expand Down