1.7.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.7.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 = "7671ad98078cf9a06d283ae47286fc60bab15397b89a8c2f05b432aad9a1029a",
strip_prefix = "rules_python-1.7.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc1/rules_python-1.7.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 = "7671ad98078cf9a06d283ae47286fc60bab15397b89a8c2f05b432aad9a1029a",
strip_prefix = "rules_python-1.7.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc1/rules_python-1.7.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
- test(venv): functional test for pth files by @aignas in #3343
- docs: Fix GitHub PR links by @thejcannon in #3346
- build: Starlarkify python flags by @mai93 in #3334
- doc: Fix
pip.defaultarguments in multi-platform example by @hartikainen in #3358 - chore(toolchain): use the last build and add 3.15.0a1 by @aignas in #3357
- fix(doc): fix the release notes for the starlarkification of the flags by @aignas in #3361
- chore: switch to use publish-to-bcr workflow by @rickeylev in #3359
- chore: fix create_archive_and_notes to ignore release tool markers by @rickeylev in #3355
- chore: make gazelle bcr tests compatible with bcr presubmit environment by @rickeylev in #3365
- chore: fix release workflow by @rickeylev in #3366
- Merge main -> release/1.7 by @rickeylev in #3369
New Contributors
- @thejcannon made their first contribution in #3346
- @hartikainen made their first contribution in #3358
Full Changelog: 1.7.0-rc0...1.7.0-rc1