Skip to content

v0.5.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 27 Nov 21:16
· 103 commits to main since this release
e5c2112

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

bazel_dep(name = "rules_python", dev_dependency = True, version = "0.22.0")

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

register_toolchains(
    "@python3_toolchains//:all",
)

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "e1d1023bc9ba8545dc87c6df10508d9d7c20f489f5e5c5c1e16380b33c013485",
    strip_prefix = "rules_py-0.5.0",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.5.0/rules_py-v0.5.0.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()

What's Changed

  • refactor: put 'git archive' config in .gitattributes by @alexeagle in #215
  • feat: support 'virtual' dependencies by @mattem in #201
  • chore(deps): update dependency bazel_gazelle to v0.34.0 by @renovate in #188
  • chore(deps): update dependency rules_python_gazelle_plugin to v0.26.0 by @renovate in #192
  • chore(deps): update dependency aspect_bazel_lib to v1.38.1 by @renovate in #187
  • fix(py_library): don't return transitive srcs as defaultinfo by @alexeagle in #221
  • chore(deps): update dependency io_bazel_rules_go to v0.42.0 by @renovate in #195
  • build(deps): bump django from 4.2.0 to 4.2.7 in /py/tests/virtual/django by @dependabot in #220
  • build(deps): bump django from 4.2.5 to 4.2.7 by @dependabot in #216
  • fix: use original interpreter path as 'home' value in pyvenv.cfg by @mattem in #226

New Contributors

Full Changelog: v0.4.0...v0.5.0