Skip to content

v0.7.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 26 Apr 04:13
· 37 commits to main since this release
6c9aaca

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "0.7.2")

And also register a Python toolchain, see rules_python. For example:

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    configure_coverage_tool = True,
    python_version = "3.11",
)

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "959b433fa19238d3d3644be2960c606cea27b83a9ea8a0f1f7bd6d3be4fc53e9",
    strip_prefix = "rules_py-0.7.2",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.7.2/rules_py-v0.7.2.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
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()

What's Changed

  • chore(deps): update dependency rules_python_gazelle_plugin to v0.31.0 by @renovate in #271
  • Remove BASH_BIN in favor of referencing bash via /usr/bin/env by @shinypb in #229
  • chore: flip no legacy external runfiles by @thesayyn in #193
  • renovate: don't update minimum bounds in MODULE.bazel by @alexeagle in #294
  • chore(deps): update actions/github-script action to v7 by @renovate in #296
  • fix: use correct runfiles path for venv import paths by @wade-arista in #299
  • chore: update presubmit.yml by @alexeagle in #293
  • chore: improve error message for py_runtime missing version info by @wade-arista in #301
  • chore(deps): update dependency aspect_bazel_lib to v1.40.3 by @renovate in #304
  • Fix for external deps that use repo root relative imports by @scasagrande in #310
  • fix: use PyInfo from rules_python by @mattem in #311
  • fix: don't allow files in deps attr by @mattem in #318
  • fix: handle a system interpreter path on the toolchain by @mattem in #313
  • site-packages symlink forest in venv by @siddharthab in #275
  • chore(deps): update dependency asgiref to v3.8.1 by @renovate in #319
  • refactor: split toolchains and repositories by @thesayyn in #323

New Contributors

Full Changelog: v0.7.1...v0.7.2