Skip to content
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
13 changes: 13 additions & 0 deletions .github/workflows/release_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Add generated API docs to the release
# see https://github.com/bazelbuild/bazel-central-registry/blob/main/docs/stardoc.md
set -o errexit -o nounset -o pipefail

docs="$(mktemp -d)"
targets="$(mktemp)"
out=$1
bazel --output_base="$docs" query --output=label --output_file="$targets" 'kind("starlark_doc_extract rule", //...)'
bazel --output_base="$docs" build --target_pattern_file="$targets"
tar --create --auto-compress \
--directory "$(bazel --output_base="$docs" info bazel-bin)" \
--file "${out}" .
34 changes: 0 additions & 34 deletions .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ tar --create --auto-compress \
--file "$GITHUB_WORKSPACE/${ARCHIVE%.tar.gz}.docs.tar.gz" .

cat << EOF
## Using [Bzlmod] with Bazel 6:

Add to your \`MODULE.bazel\` file:

\`\`\`starlark
Expand All @@ -67,36 +65,4 @@ python.toolchain(
)
\`\`\`

[Bzlmod]: https://bazel.build/build/bzlmod

## Using WORKSPACE

\`\`\`starlark
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_py",
sha256 = "${SHA}",
strip_prefix = "${PREFIX}",
url = "https://github.com/aspect-build/rules_py/releases/download/${TAG}/${ARCHIVE}",
)

load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
name = "python_toolchain",
python_version = "3.9",
)

py_repositories()
\`\`\`

EOF
2 changes: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
load("@gazelle//:def.bzl", "gazelle")
load("@rules_python//python/pip_install:requirements.bzl", "compile_pip_requirements")

# buildifier: disable=bzl-visibility
load("//uv/private/manifest:defs.bzl", "gazelle_python_manifest")

# gazelle:exclude internal_python_deps.bzl
Expand Down
37 changes: 11 additions & 26 deletions py/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@ load("@bazel_lib//:bzl_library.bzl", "bzl_library")
# 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
# TODO(2.0): remove since Bazel 6 is no longer LTS
alias(
name = "interpreter_version",
actual = "@rules_python//python/config_settings:python_version",
visibility = ["//visibility:public"],
)

bzl_library(
name = "repositories",
srcs = ["repositories.bzl"],
visibility = ["//visibility:public"],
deps = [
"//py/private/toolchain:autodetecting",
"@bazel_tools//tools/build_defs/repo:cache.bzl",
"@bazel_tools//tools/build_defs/repo:http.bzl",
"@bazel_tools//tools/build_defs/repo:utils.bzl",
],
)

bzl_library(
name = "defs",
srcs = ["defs.bzl"],
Expand All @@ -39,20 +28,16 @@ bzl_library(
],
)

# This needs to dep on @aspect_tools_telemetry_report but we don't have that in WORKSPACE
# gazelle:exclude extensions.bzl
# bzl_library(
# name = "extensions",
# srcs = [
# "extensions.bzl",
# "@aspect_tools_telemetry_report//:defs.bzl",
# ],
# visibility = ["//visibility:public"],
# deps = [
# ":toolchains",
# "//py/private/release:version",
# ],
# )
bzl_library(
name = "extensions",
srcs = ["extensions.bzl"],
visibility = ["//visibility:public"],
deps = [
":toolchains",
"//py/private/release:version",
"@aspect_tools_telemetry_report//:defs.bzl",
],
)

bzl_library(
name = "toolchains",
Expand Down
44 changes: 0 additions & 44 deletions py/repositories.bzl

This file was deleted.

Loading