1.3.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.3.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 = "069b14defc462c1382d4d8f00c25eb59dc468e38d6c932471312d466fdf7700b",
strip_prefix = "rules_python-1.3.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.3.0-rc1/rules_python-1.3.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 = "069b14defc462c1382d4d8f00c25eb59dc468e38d6c932471312d466fdf7700b",
strip_prefix = "rules_python-1.3.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.3.0-rc1/rules_python-1.3.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
- docs: update dev docs on how to pick next version by @rickeylev in #2612
- docs: tell how to create branches for releases by @rickeylev in #2613
- docs: split out release steps into separate doc by @rickeylev in #2615
- feat: provide access to arbitrary interpreters by @philsc in #2507
- docs: add changelog update for //python/bin by @rickeylev in #2616
- refactor: cleanup now-unreferenced proto toolchain type by @alexeagle in #2620
- docs: add some docs to help contributors get started by @rickeylev in #2623
- ci: use Python 3.9 for mypy workflow to fix ci by @rickeylev in #2625
- fix(pypi): correctly translate ppc64le to bazel platforms by @aignas in #2577
- fix: Gazelle bug with merging py_binary targets in per-file mode and partial update by @jimmyt857 in #2619
- refactor: stop using some deprecated Starlark APIs by @EdSchouten in #2626
- docs: fix changelog header for 1.2.0 entry by @rickeylev in #2635
- fix: Downgrade "running as root" error to a warning by default by @Wyverald in #2636
- fix: spill module mapping args to a file by @mattem in #2644
- Add error for pip.parse attrs that require other attrs by @keith in #2646
- feat: Package pyi files in wheel by @Synss in #2609
- chore: Remove *_build_test targets from sphinx_docs (#2645) by @255 in #2650
- fix(pypi): use python -B for repo-phase invocations by @aignas in #2641
- build: Update doublestar to a version that works with the latest Gazelle by @shs96c in #2480
- fix: Add libdir to library search path by @shs96c in #2476
- fix(gazelle): Include YAML 'docstart' in gazelle manifest file by @dougthor42 in #2656
- feat(uv): parse the dist-manifest.json to not hardcode sha256 in rules_python by @aignas in #2578
- fix(coverage): missing files in the coverage report if they have no tests by @BurnzZ in #2607
- feat(pypi): support direct urls for wheels in bazel downloader by @chrisirhc in #2655
- refactor: API for deriving customized versions of the base rules by @rickeylev in #2610
- fix(gazelle): Explicitly call sys.exit in the modules_mapping generator by @samschlegel in #2662
- feat(rules): allow deriving custom rules from core rules by @rickeylev in #2666
- feat(binary/test): add interpreter_args attribute by @rickeylev in #2669
- feat: env-var for additional interpreter args in bootstrap stage 1 by @andponlin-canva in #2654
- Update source repo in BCR metadata.json by @meteorcloudy in #2672
- build(deps): bump jinja2 from 3.1.4 to 3.1.6 in /examples/bzlmod by @dependabot in #2651
- chore(docs): fix forward-ref to 1.0 by @alexeagle in #2673
- chore: account for new GH org of standalone interpreter by @alexeagle in #2676
- feat(rules): add main_module attribute to run a module name (python -m) by @rickeylev in #2671
- fix: expose public attrb/ruleb bzl targets by @aignas in #2682
- chore: update changelog and version markers for 1.3 release by @rickeylev in #2683
- chore: ignore releasing.md for version string check by @rickeylev in #2684
- chore: replace bazelbuild with bazel-contrib by @rickeylev in #2688
- chore: update bcr metadata files to specify bazel-contrib by @rickeylev in #2686
New Contributors
- @jimmyt857 made their first contribution in #2619
- @EdSchouten made their first contribution in #2626
- @Synss made their first contribution in #2609
- @255 made their first contribution in #2650
- @BurnzZ made their first contribution in #2607
- @samschlegel made their first contribution in #2662
- @andponlin-canva made their first contribution in #2654
Full Changelog: 1.2.0-rc0...1.3.0-rc1