1.9.0-rc1
Pre-release
Pre-release
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Using Bzlmod
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.9.0-rc1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")Using WORKSPACE
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f4e65a01b6eca51f107d285c8d60869f42cbf4eac32711530399c704e9ba417a",
strip_prefix = "rules_python-1.9.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.0-rc1/rules_python-1.9.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Gazelle plugin
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "f4e65a01b6eca51f107d285c8d60869f42cbf4eac32711530399c704e9ba417a",
strip_prefix = "rules_python-1.9.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.0-rc1/rules_python-1.9.0-rc1.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()What's Changed
- feat(pypi): make whl_library reproducible under pipstar (#3589) by @rickeylev in #3632
Full Changelog: 1.9.0-rc0...1.9.0-rc1