0.16.2
Using Bzlmod with Bazel 6
Add to your MODULE.bazel
file:
bazel_dep(name = "rules_python", version = "0.16.2")
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 = "rules_python",
sha256 = "48a838a6e1983e4884b26812b2c748a35ad284fd339eb8e2a6f3adf95307fbcd",
strip_prefix = "rules_python-0.16.2",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.16.2.tar.gz",
)
What's Changed
- fix: gazelle panics when "# gazelle:ignore" doesn't have a value by @stdll00 in #915
- Remove unused code by @groodt in #933
- Various updates build_file_generation example by @chrislovecnm in #869
- Fix CI after bazel 6.0.0 by @groodt in #938
- Refactor wheel_installer by @groodt in #937
- Updates lockfiles by @groodt in #943
- fix: embed stamped version in py_wheel METADATA by @mattoberle in #935
- chore(gazelle): clarify a particular failure message by @srabraham in #939
- pip: 22.2.1 -> 22.3.1; build: 0.8.0 -> 0.9.0; installer: 0.5.1 -> 0.6.0; pip-tools: 6.8.0 -> 6.12.1 by @groodt in #944
- Update name of
compile_pip_requirements
by @groodt in #945 - Rename
BUILD
->BUILD.bazel
by @groodt in #946 - Add missing .gitignore for //examples/pip_parse_vendored by @groodt in #947
- Removes unused "incremental" property by @groodt in #948
- Disable bytecode optimization during wheel installation by @groodt in #949
- Fix broken link. by @phst in #955
- Don’t use keyword argument for TestEnvironment. by @phst in #954
- Fix hyphen in requirement didn't work with bzlmod (#952) by @acr92 in #957
- chore(docs): fix bad html formatting by @alexeagle in #959
- Fully switch to bazel 6.0.0 in all places by @aignas in #960
- Use 'os' instead of 'ioutil' in gazelle tests by @aignas in #962
- Refactor and separate concerns of external python package handling code by @groodt in #953
New Contributors
- @stdll00 made their first contribution in #915
- @srabraham made their first contribution in #939
- @acr92 made their first contribution in #957
Full Changelog: 0.16.1...0.16.2