Skip to content

Releases: aspect-build/rules_py

v2.0.0-alpha.4

Choose a tag to compare

@github-actions github-actions released this 26 Jun 21:52
8fa507f

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "2.0.0-alpha.4")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • fix(uv): evaluate version prefix markers by @tamird in #1112
  • test: add e2e regression test for disabling the anyio pytest plugin by @xangcastle in #1114
  • fix(uv): skip virtual workspace installs by @tamird in #1119
  • fix: resolve MPICC from PATH instead of defaulting to the Bazel C compiler by @xangcastle in #1115
  • fix(uv): consolidate per-wheel metadata + namespace/regular-span venv merge by @jbedard in #1092
  • test(uv): cover remaining PEP 508 marker variables by @jbedard in #1126
  • refactor(py): detect binaries by provider instead of rule kind in py_image_layer aspect by @jbedard in #1127
  • refactor: use bazel built zip extraction by @jbedard in #1128
  • refactor: detect and fail on unpack subprocess errors by @jbedard in #1129
  • fix(py): normalize wheel tree permissions by @jbedard in #1123
  • fix(uv): fail the build cleanly on patch errors and suppress .orig backups by @jbedard in #1121
  • fix: upgrade hermetic_launcher to 0.0.11 to fix py_binary execve failure by @jbedard in #1130
  • fix: quotes in RECORD entries by @jbedard in #1125
  • docs: fix misleading debugger support section in README by @xangcastle in #1132
  • fix(uv): keep inactive marker packages valid by @jbedard in #1122
  • revert(py): normalize wheel tree permissions (#1123) by @jbedard in #1137
  • test(py_venv): guard wheel-root .pth execution on the addsitedir fallback by @jbedard in #1138
  • test(py_venv): add snapshot tests of pth_install_tree_fallback by @jbedard in #1139
  • feat(uv): reserve wheel build resources via uv.override_package(resource_set) by @jbedard in #1133
  • test(uv): verify inactive marker packages resolve to empty targets by @xangcastle in #1141
  • fix(uv): overlay .data/{purelib,platlib} into site-packages by @jbedard in #1143
  • fix(uv): key wheel metadata by basename and decode %2B local versions by @jbedard in #1144
  • fix(uv): strip extras from console-script entry points by @jbedard in #1145
  • feat(uv): expose per-group deps by @jbedard in #1136
  • refactor(py): remove inert interpreter default by @tamird in #1156
  • fix(uv): retain anyarch validation by @tamird in #1163
  • fix(uv): isolate source-build Python by @tamird in #1148
  • fix(py): avoid ambiguous Linux exec tools by @tamird in #1177
  • fix(py_venv): link complete runfiles tree by @tamird in #1147
  • feat(uv): monitor wheel build memory by @tamird in #1174
  • fix(py): preserve per-version toolchain settings by @tamird in #1176
  • fix(py): preserve permissive collision order by @tamird in #1154
  • fix(py): validate interpreter inputs by @tamird in #1159
  • fix(py): support dotted console entry points by @tamird in #1150
  • refactor(py): use rules_python exec tools by @tamird in #1157
  • test(py): repair toolchain settings e2e by @tamird in #1180
  • test: add protobuf/rules_py example by @jbedard in #1186
  • chore: remove bazel/proto created and unused since b2abc99 by @jbedard in #1184
  • test: ensure all examples run on ci by @jbedard in #1185
  • fix(py): remove broken local interpreter tag by @tamird in #1158
  • fix: enforce format exclusions by @tamird in #1164
  • fix(py): detect execute-bit collisions by @tamird in #1165
  • fix: select native compilers from C++ for sdist wheel builds by @xangcastle in #1189
  • feat(uv): declare source-built scripts by @tamird in #1153
  • fix(py): describe PBS runtime metadata by @tamird in #1161
  • fix(uv): isolate PEP 517 runfiles by @tamird in #1168
  • fix(uv): align PEP 517 frontend platform by @tamird in #1167
  • fix(py_image_layer): don't rename source files that share the binary name by @acozzette in #1192
  • fix(py): register PBS C toolchains by @tamird in #1187
  • feat(uv): expose group dependency labels by @tamird in #1190
  • fix(py_venv): avoid duplicate wheel metadata by @tamird in #1191
  • refactor(py_venv): drop _wheels/ indirection to deduplicate runfiles by @jbedard in #1135
  • revert: enforce format exclusions (#1164) by @jbedard in #1195
  • perf: avoid reconstructing Labels in group_dep_labels by @jbedard in #1197
  • refactor(uv): rename group_dep_labels to group_deps_for by @jbedard in #1198
  • fix(uv): reject patched wheel topology changes by @tamird in #1200
  • fix(uv): reject ignored build overrides by @tamird in #1166
  • fix(uv): align C++ toolchain platform by @tamird in #1204
  • fix(py): expose POSIX libpython by @tamird in #1202
  • refactor: split py_venv binary vs lib rules by @jbedard in #980

Full Changelog: v2.0.0-alpha.3...v2.0.0-alpha.4

v2.0.0-alpha.3

Choose a tag to compare

@github-actions github-actions released this 15 Jun 19:10
be215b8

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "2.0.0-alpha.3")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • test(e2e): do not depend on dev-only parent pypi by @jbedard in #1046
  • refactor: replace dependency on shell awk+sort with gawk bcr module by @jbedard in #1044
  • feat(interpreter): add current_py_toolchain rule for Make variable support by @ctcjab in #897
  • test: bazel_env integration with the current Python toolchain by @xangcastle in #1050
  • chore: migrate to Aspect CLI AXL tasks on ephemeral GHA runners by @gregmagolan in #1051
  • docs: update IDE Integration section for v2.0 venv model by @gregmagolan in #1052
  • feat(py): expose_venv_link convenience attr for py_binary / py_test by @gregmagolan in #1053
  • chore: bump aspect-cli to v2026.22.15 by @gregmagolan in #1056
  • fix: Update Gazelle integration link in migrating.md by @hofbi in #952
  • chore: bump aspect-cli to v2026.22.17 by @gregmagolan in #1057
  • feat: add CI-gated py_binary startup benchmark by @xangcastle in #1029
  • chore: bump aspect-cli to v2026.22.23 by @gregmagolan in #1059
  • fix(ci): use 9.x not 9.* for the Bazel 9 test matrix version by @gregmagolan in #1061
  • chore: bump aspect-cli to v2026.22.29 by @gregmagolan in #1060
  • chore: bump Aspect CLI to 2026.22.39 by @gregmagolan in #1062
  • ci: adopt aspect-build/setup-aspect by @gregmagolan in #1063
  • fix: point pyvenv.cfg home= directly at PBS bin/ to fix sys.base_prefix on Python 3.11/3.12 by @xangcastle in #1058
  • chore: add benchmark to .bazelignore by @xangcastle in #1071
  • feat: replace Rust unpack binary with pure-Python stdlib wheel installer by @xangcastle in #1072
  • chore: align buildifier config with aspect-cli; bump CLI to 2026.22.44 by @gregmagolan in #1074
  • chore: residuals cleanup by @xangcastle in #1075
  • chore(ci): update BCR fork location after move to aspect-forks org by @jbedard in #1076
  • chore: fix benchmarks running directly in bazel outdir without defining RUNFILES_DIR by @jbedard in #1082
  • perf: migrate bash launcher to hermetic-build by @jbedard in #1045
  • test: add env tests for VIRTUAL_ENV by @jbedard in #1085
  • fix: providate data to py_venv and py_venv_exec for use in $(location) expansion by @jbedard in #1086
  • fix: write pyvenv.cfg home= as the interpreter bin dir for system (interpreter_path) toolchains by @jbedard in #1087
  • fix: merge wheels from duplicate uv.lock records instead of dropping them by @jbedard in #1089
  • feat: add support for additional deps in py_console_script_binary by @jbedard in #1080
  • fix(platform detection): detect Gentoo glibc by @13steinj in #1091
  • refactor: expose the main() function in pytest_main by @linzhp in #1094

New Contributors

Full Changelog: v2.0.0-alpha.1...v2.0.0-alpha.3

v1.11.7

Choose a tag to compare

@github-actions github-actions released this 13 Jun 02:05
9633720

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "1.11.7")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • fix: ensure wheels in lockfiles have hashes (#962) by @jbedard in #988
  • docs: add note about default venv and python_version to README by @jbedard in #992
  • ci: adopt Aspect CLI / GHA Workflows setup for 1.x by @jbedard in #1084
  • feat: add support for additional deps in py_console_script_binary by @jbedard in #1081
  • fix: handle variable tokens immediately followed by brackets in tokeizer by @xangcastle in #1100
  • fix: skip pycache dirs in walk_skip_venvs to prevent namespace package collisions by @xangcastle in #1109
  • fix: absolutize CC/CXX paths before chdir into extracted sdist source tree by @xangcastle in #1108
  • fix: skip pycache dirs when merging namespace packages by @xangcastle in #1101
  • feat: support packages in git monorepo subdirectories for sdist builds by @xangcastle in #1105
  • fix: evaluate extra == markers per-extra with OR semantics by @xangcastle in #1099
  • chore: account for changes in GHA release_ruleset, download-artifact changes by @jbedard in #1110

Full Changelog: v1.11.5...v1.11.7

v2.0.0-alpha.1

Choose a tag to compare

@github-actions github-actions released this 22 May 02:44
44bfb82

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "2.0.0-alpha.1")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • test: register llvm toolchains in e2e test module by @jbedard in #1040
  • chore: remove unused dep on rules_go by @jbedard in #1041
  • perf: route trusted rows through type=file contents= to skip awk readlink by @jbedard in #1043
  • perf: use pth paths instead of site.addsitedir by @jbedard in #1039

Full Changelog: v2.0.0-alpha.0...v2.0.0-alpha.1

v2.0.0-alpha.0

Choose a tag to compare

@github-actions github-actions released this 21 May 23:28
8266d02

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "2.0.0-alpha.0")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • refactor: starlark venv assembly engine by @xangcastle in #965
  • refactor: py_binary / py_test venv integration by @xangcastle in #972
  • test: add py_binary(interpreter_options) tests by @jbedard in #973
  • refactor: remove WORKSPACE support by @jbedard in #971
  • refactor: remove uv :whl alias by @jbedard in #970
  • Remove legacy Rust venv_bin / venv_shim tooling by @xangcastle in #975
  • refactor: rename venv attribute/flag to dep_group by @gregmagolan in #976
  • refactor: rename py_venv_exec external_venv attr to venv by @jbedard in #974
  • chore: add conventional-commits gha by @jbedard in #978
  • chore: remove unused rules_rust logic by @jbedard in #979
  • refactor: remove py_venv(venv_dir_basename) by @jbedard in #982
  • feat: remove legacy py_venv_binary / py_venv_test rules, migrate to py_binary / py_test with expose_venv by @xangcastle in #981
  • feat: graduate py/unstable and uv/unstable to stable API paths by @xangcastle in #985
  • fix: ensure wheels in lockfiles have hashes by @tsudol-plaid in #962
  • test: fix bad load of legacy unstable:defs.bzl by @jbedard in #986
  • chore: fix gazelle, enforce on ci by @jbedard in #984
  • docs: fixup venv/dep_group and py_venv api references and terminology by @jbedard in #983
  • refactor: mv py_binary.bzl to py_venv_exec.bzl by @jbedard in #987
  • docs: add WARNING to README while main is the the v2 alpha by @jbedard in #991
  • test: various config between py_venv() and py_venv_exec() targets by @jbedard in #989
  • test: add snapshot tests of generated BUILD,.bzl by @jbedard in #990
  • fix(uv): flush marker identifiers before parentheses by @jbedard in #999
  • fix(uv): add explicit default targets to wheel select by @jbedard in #995
  • fix(uv): recognize generic linux wheel platform tags by @jbedard in #996
  • fix(uv): treat abi3 wheels as compatible with newer CPython minors by @jbedard in #997
  • fix(uv): suppress nonfatal pyc compile warnings by @jbedard in #1000
  • fix(uv): always keep sdist fallbacks when sources exist by @jbedard in #998
  • fix(uv): normalize architecture aliases during marker by @jbedard in #1003
  • test: separate e2e test hubs by @jbedard in #1002
  • test: isolate e2e test setup within individual setup.MODULE.bazel files by @jbedard in #1006
  • feat: suppress repository-rule spam behind RULES_PY_UV_VERBOSE flag by @xangcastle in #1007
  • chore: update pre-commit buildifier version, ignore snapshots by @jbedard in #1012
  • fix: drop platform_libc from darwin/windows toolchain target_settings… by @jbedard in #1014
  • feat(sdist): generic toolchain env plumbing for pep517_native_whl by @jbedard in #1004
  • refactor: move BAZEL_* env vars into RunEnvironmentInfo by @jbedard in #1011
  • refactor: remove unnecessary use of itertools cargo dep by @jbedard in #1016
  • test: put oci image snapshots into /snapshots/ dir by @jbedard in #1015
  • test: restore snapshot testing in e2e uv-deps-650 test by @jbedard in #1017
  • test: add build_test for cross-platform testing in uv-deps-650 by @jbedard in #1018
  • chore: remove dead pre-commit comments and document adder fixture by @xangcastle in #1020
  • chore: rm unused test files by @jbedard in #1019
  • test: add verify_venv test util to run in venvs such as py_test or containers by @jbedard in #1025
  • test: reduce dependencies across e2e test cases by @jbedard in #1023
  • perf: make whl(src) attribute stricter by @jbedard in #1027
  • perf: remove py_venv use of to_list() by @jbedard in #1028
  • test: add snapshot tests for .pth files by @jbedard in #1026
  • docs: fix broken RAI Institute link and correct lazy downloads description by @xangcastle in #1031
  • fix(py_image_layer): resolve wheel symlinks inside OCI image layers by @jbedard in #1024
  • fix(sdist): prefer setup.py when pyproject metadata is incomplete by @jbedard in #1030
  • fix(uv): sanitize all chars invalid in Bazel repo names by @jbedard in #1032
  • feat(uv): add :pkg alias and return it from requirement() by @jbedard in #1033
  • feat(uv): expose :pkg/:whl aliases and populate requirements.bzl by @jbedard in #1034
  • refactor: move VIRTUAL_ENV declaration into bazel RunEnvironmentInfo by @jbedard in #1036
  • refactor(py_venv_exec): inline launcher runfiles, drop redundant _runfiles_lib by @jbedard in #1037
  • perf: index wheels by hash instead of index to avoid cache busts by @jbedard in #1038
  • feat: optimized py_image_layer by @thesayyn in #960

New Contributors

Full Changelog: v1.11.5...v2.0.0-alpha.0

v1.11.5

Choose a tag to compare

@github-actions github-actions released this 05 May 20:55
0be5db3

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "1.11.5")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • test: add uv custom toolchain x86_64-apple-darwin hash by @jbedard in #968
  • test: ensure forward-compatible version of aspect_bazel_lib in e2e tests by @jbedard in #969

Full Changelog: v1.11.4...v1.11.5

v1.11.4

Choose a tag to compare

@github-actions github-actions released this 05 May 15:43
ea02ada

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "1.11.4")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • chore: define linux_gnu platform in e2e instead of via @aspect_rules_py by @jbedard in #966

Full Changelog: v1.11.3...v1.11.4

v1.11.3

Choose a tag to compare

@github-actions github-actions released this 05 May 06:42
5dda303

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "1.11.3")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • chore: upgrade bazelrc-preset.bzl to 1.9.2 by @jbedard in #916
  • Rewrite README with clearer structure and feature highlights by @xangcastle in #929
  • fix(toolchains): register native_build_toolchain per exec/target platform for sdist builds by @gregmagolan in #928
  • perf: reduce symlinks in third-party packages by @xangcastle in #931
  • refactor: simplify coalesce_symlinks logic by @xangcastle in #932
  • chore: split toolchain registration in root module to prod & dev by @gregmagolan in #933
  • deterministically resolve unconstrained dependencies when lockfile contains multiple versions by @xangcastle in #935
  • Updating Readme file by @xangcastle in #936
  • fix(uv): resolve per-group dependency versions from lockfile to prevent configuration conflicts by @xangcastle in #937
  • chore: upgrade llvm module to 0.7.1, fix macos 403s by @jbedard in #945
  • perf: set repo and module reproducible = True where possible by @jbedard in #946
  • refactor: do not duplicate site_packages into DefaultInfo+runfiles of py_binary by @jbedard in #949
  • fix: check main by resolved file basename, not label name by @jbedard in #950
  • refactor: upgrade toml2json to 0.0.26 by @jbedard in #955
  • ci: use aspect-large runner for tests by @jbedard in #958
  • chore: update cargo deps, remove unused by @jbedard in #956
  • docs: Update Gazelle section with pytest_main usage instructions by @hofbi in #953
  • chore: upgrade rules_rs to 0.0.64 by @jbedard in #915
  • refactor: cleanup unused bazel/platforms/* logic by @jbedard in #957
  • test: cherry-pick tests from #944 by @jbedard in #954
  • feat: add uv toolchain extension by @jbedard in #943
  • refactor(uv): remove dead lib_mode/whl_mode machinery by @jbedard in #951
  • refactor: extract pth file creation and imports depset into reusable pth.bzl helpers by @xangcastle in #961
  • chore: upgrade tar.bzl to 0.10.1 by @jbedard in #964

Full Changelog: v1.11.2...v1.11.3

v1.11.2

Choose a tag to compare

@github-actions github-actions released this 07 Apr 16:47
b8a2952

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "1.11.2")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • ci: replace github pre-commit workflow with aspect workflows buildifier by @jbedard in #922
  • feat(whl_install): expose install_dir via OutputGroupInfo by @gregmagolan in #926

Full Changelog: v1.11.1...v1.11.2

v1.11.1

Choose a tag to compare

@github-actions github-actions released this 06 Apr 19:55
08e6f3c

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "1.11.1")

And also register a Python toolchain, see rules_python. For example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    python_version = "3.13",
)

What's Changed

  • fix(interpreter): drop exec_compatible_with from Python interpreter toolchain by @gregmagolan in #924
  • fix(whl_install): use rules_python exec tools toolchain for pyc compilation by @gregmagolan in #903
  • fix(venv): handle internal package symlinks to prevent dangling references by @xangcastle in #904
  • feat(e2e): add pytest subdirectory imports example and test case by @xangcastle in #908
  • fix(whl_install): remove install_dir from DefaultInfo.files by @gregmagolan in #907
  • feat(whl_install): enable path mapping for remote cache deduplication by @gregmagolan in #906
  • refactor(whl_install): remove resolved_unpack_toolchain workaround by @gregmagolan in #905
  • fix(toolchain): build unpack binary in exec config to prevent ELF-on-macOS failure by @gregmagolan in #910
  • refactor(exec_tools): hoist py_exec_tools_toolchain from rules_python, drop min version to 1.0.0 by @gregmagolan in #913
  • refactor(toolchain): replace resolved_venv_toolchain with venv_exec_toolchain_type by @gregmagolan in #911
  • ci: do not run pre-commit when PRs come from forks by @jbedard in #914
  • chore: replace toolchains_llvm_bootstrapped with llvm 0.7.0 by @gregmagolan in #920
  • chore: remove dead would_create_symlink_cycle function by @gregmagolan in #919
  • feat: add scope = "universal" to @pypi//venv for Bazel 10 compatibility by @gregmagolan in #917
  • fix(uv): fix evaluation of PEP 508 specs involving nested parentheses by @acozzette in #901

New Contributors

Full Changelog: v1.10.1...v1.11.1