v0.7.4
Pre-release
Pre-release
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_py", version = "0.7.4")
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 = "04278ce23cc5c91a24b62ea00ac04c553fe40ca390943acf6684d367a681a871",
strip_prefix = "rules_py-0.7.4",
url = "https://github.com/aspect-build/rules_py/releases/download/v0.7.4/rules_py-v0.7.4.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
- fix: BCR presubmit should test the release path by @alexeagle in #333
- ci: green up main by @gregmagolan in #343
- chore: don't cancel concurrent main builds by @gregmagolan in #342
- chore: add --check_direct_dependencies to .bazelrc by @gregmagolan in #346
- feat: support python_version attribute by @thesayyn in #347
- fix: allow test venv to be run by @alexeagle in #348
- example: add an example for rules_uv by @thesayyn in #354
- refactor: don't default imports to current folder by @alexeagle in #367
- fix: allow symlink collision error to be downgraded by @mattem in #369
- chore(deps): update dependency bazel to v7.1.0 by @renovate in #306
Full Changelog: v0.7.3...v0.7.4