Skip to content

Commit

Permalink
chore: docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Jun 16, 2024
1 parent 9e727c4 commit 93bd381
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 15 deletions.
33 changes: 33 additions & 0 deletions docs/rules.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions examples/py_binary/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ platform_transition_filegroup(
}),
)

container_structure_test(
name = "test",
configs = ["test.yaml"],
image = ":platform_image",
)

# $ bazel run //examples/py_binary:load
# $ docker run --rm gcr.io/oci_python_hello_world:latest
oci_tarball(
Expand Down
8 changes: 0 additions & 8 deletions examples/py_binary/image_test.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion py/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
# For stardoc to reference the files
exports_files(["defs.bzl"])

# For Bazel 6.x compatibility, since
# For Bazel 6.x compatibility, since
# PyRuntimeInfo shipped only with Bazel 7
# Users can set, e.g. --@aspect_rules_py//py:interpreter_version=3.9.18
string_flag(
Expand All @@ -31,6 +31,7 @@ bzl_library(
deps = [
"//py/private:py_binary",
"//py/private:py_executable",
"//py/private:py_image_layers",
"//py/private:py_library",
"//py/private:py_pytest_main",
"//py/private:py_unpacked_wheel",
Expand Down
7 changes: 7 additions & 0 deletions py/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,10 @@ bzl_library(
srcs = ["virtual.bzl"],
visibility = ["//py:__subpackages__"],
)

bzl_library(
name = "py_image_layers",
srcs = ["py_image_layers.bzl"],
visibility = ["//py:__subpackages__"],
deps = ["@aspect_bazel_lib//lib:tar"],
)
1 change: 1 addition & 0 deletions py/private/py_image_layers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def py_image_layers(name, binary, interpreter_regex = PY_INTERPRETER_REGEX, site
binary: a py_binary target
interpreter_regex: a regular expression for use by `grep` which extracts the interpreter and related files from the binary runfiles tree
site_packages_regex: a regular expression for use by `grep` which extracts installed packages from the binary runfiles tree
Returns:
a list of labels for the layers, which are tar files
"""
Expand Down

0 comments on commit 93bd381

Please sign in to comment.