Skip to content

0.15.0

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Nov 17:58
· 570 commits to main since this release
518c873

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.15.0")

pip = use_extension("@rules_python//python:extensions.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

# (Optional) Register a specific python toolchain instead of using the host version
python = use_extension("@rules_python//python:extensions.bzl", "python")

python.toolchain(
    name = "python3_9",
    python_version = "3.9",
)

use_repo(python, "python3_9_toolchains")

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

Using WORKSPACE:

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "bazel_skylib",
    sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
    ],
)
http_archive(
    name = "rules_python",
    sha256 = "fda23c37fbacf7579f94d5e8f342d3a831140e9471b770782e83846117dd6596",
    strip_prefix = "rules_python-0.15.0",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.15.0.tar.gz",
)

What's Changed

  • Expose python3n.lib as libpython's interface_library by @jlaxson in #890
  • Fix //docs:update by @philsc in #876
  • fix: correct bcr metadata template filename by @kormide in #892
  • fix: fix a bug where some transitive deps could not be resolved via bzlmod by @kormide in #893
  • feat: multi-toolchain support by @f0rmiga in #846
  • bump: python toolchain releases by @f0rmiga in #902
  • Correctly reference os-specific labels from central alias repo by @jlaxson in #889
  • Document how to get started working on rules_python by @rickeylev in #891
  • fix: #895 append _py if ending with .py by @rbuckland in #897
  • fix: missing RunEnvironmentInfo by @f0rmiga in #904

New Contributors

Full Changelog: 0.14.0...0.15.0