Skip to content

0.36.0

Compare
Choose a tag to compare
@github-actions github-actions released this 24 Sep 04:23
· 109 commits to main since this release
387c2f6

Using Bzlmod with Bazel 6

NOTE: bzlmod support is still beta. APIs subject to change.

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.36.0")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")

pip.parse(
    hub_name = "pip",
    python_version = "3.11",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

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 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
    strip_prefix = "rules_python-0.36.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.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 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
    strip_prefix = "rules_python-0.36.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.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

  • sphinxdocs: add docs; support sources from other directories by @rickeylev in #2128
  • build(deps): bump myst-parser from 3.0.1 to 4.0.0 in /docs/sphinx by @dependabot in #2109
  • refactor: move docs/sphinx -> docs by @rickeylev in #2130
  • fix: formatting directive bugs in test by @tokongs in #2134
  • feat(gazelle): Update resolve.go to provide more human-friendly error output by @alex-torok in #2120
  • fix: Exclude external directory when generating python report by @ewianda in #2136
  • fix(bzlmod): keep the lockfile platform independent when resolving python by @aignas in #2135
  • docs: turn a couple mentions of flags into cross references by @rickeylev in #2146
  • fix(whl_library): remove --no-index and add --no-build-isolation when build sdist by @ewianda in #2126
  • fix: Handle relative paths properly in _absolute_url by @WillMorrison in #2153
  • docs: docgen python apis by @rickeylev in #2149
  • build(deps): bump docutils from 0.20.1 to 0.21.2 in /docs by @dependabot in #2158
  • fix(gazelle): Correctly resolve deps that have top-level module overlap with a gazelle_python.yaml dep module by @alex-torok in #2160
  • docs: document the exec tools toolchain pieces by @rickeylev in #2163
  • fix: correctly check the arg count in precompiler.py by @oprypin in #2165
  • refactor: move bootstrap tests to their own directory by @rickeylev in #2168
  • refactor: allow py_library to accept additional fragments by @rickeylev in #2170
  • refactor(flags): return FeatureFlagInfo in --python_version flag by @rickeylev in #2167
  • fix(py_wheel): Avoid reliance on bash in py_wheel macro. by @UebelAndre in #2171
  • feat(rules): add PyExecutableInfo by @rickeylev in #2166
  • refactor(sphinxdocs): use bazel label format for internal object tracking by @rickeylev in #2174
  • docs: fix some doc warnings and xrefs by @rickeylev in #2176
  • refactor(precompiler): give optimize/invalidation_mode flags default values by @oprypin in #2180
  • build(deps): bump sphinx from 7.4.7 to 8.0.2 in /docs by @dependabot in #2137
  • build(deps): bump alabaster from 0.7.16 to 1.0.0 in /docs by @dependabot in #2138
  • doc: clarify the precompile attribute affects the local target by @rickeylev in #2179
  • build(bazelci): explicitly enable workspace where Bzlmod is disabled by @Wyverald in #2184
  • tests: move various supporting code under tests/support by @rickeylev in #2183
  • docs: add testing.* Bazel objects to Sphinx inventory and xref in docs by @rickeylev in #2185
  • fix: make bootstrap_impl=script compute correct directory when RUNFILES_MANIFEST_FILE set by @scasagrande in #2177
  • cleanup: remove commented out debug statement in precompile tests by @rickeylev in #2191
  • fix: allow detecting if --precompile_source_retention was specified on the command line by @rickeylev in #2192
  • docs: add module_ctx, repository_ctx and path for xref support by @aignas in #2188
  • chore: cleanup exposed python_repository symbols and add docs by @aignas in #2189
  • fix(bzlmod): use --lockfile_mode=update and add a separate job for lockfile testing by @aignas in #2154
  • feat(rules): add build_data_file field to PyExecutableInfo by @oprypin in #2181
  • build(deps): bump urllib3 from 2.0.7 to 2.2.2 in /tests/multiple_inputs by @dependabot in #2140
  • tests: use {package} instead of hard-coded path in precompile_tests by @rickeylev in #2193
  • fix: allow disabling exec_tools toolchain from looking up an interpreter by @rickeylev in #2194
  • docs: document py_cc_toolchain and py_runtime_pair by @rickeylev in #2196
  • feat: allow py_cc_toolchain libs to be optional by @rickeylev in #2197
  • fix: Fix incorrectly generated Required-Dist when specifying requirements with markers in extra_requires in py_wheel rule by @sfc-gh-wzhao in #2200
  • feat(toolchain): add patch_strip attr for python_repository by @aignas in #2201
  • feat: default py_runtime version info to --python_version by @rickeylev in #2198
  • fix(sphinx): Support python 3.9 in Sphinx rules by @imarban in #2208
  • build(deps): bump certifi from 2024.7.4 to 2024.8.30 in /docs by @dependabot in #2210
  • build(deps): bump mdit-py-plugins from 0.4.1 to 0.4.2 in /docs by @dependabot in #2209
  • tests: make precompile tests pass when other toolchains are defined by @rickeylev in #2213
  • test(bzlmod): add python.toolchain unit tests by @aignas in #2204
  • chore: cleanup unused attributes for the host_toolchain repo rule by @aignas in #2195
  • refactor(internal): make the usage of MINOR_MAPPING variable explicit in full_version by @aignas in #2219
  • refactor(internal): add a semver parsing utility function by @aignas in #2218
  • docs: give some general guidance on how to define custom toolchains by @rickeylev in #2220
  • refactor: move hermetic Python runtime setup into macro by @rickeylev in #2221
  • feat: add //python:none as public target to disable exec_interpreter by @rickeylev in #2226
  • chore: remove mandatory default values for python version flag by @aignas in #2217
  • fix: Prefix bootstrap file to prevent pytest reentrance by @mortenmj in #2230
  • refactor(toolchains): split the implementation of toolchain rules to separate files by @aignas in #2232
  • fix(ci): use --enable_workspace for bazel-in-bazel tests by @aignas in #2237
  • fix(platforms): include flag_values in config_settings by @aignas in #2236
  • feat(bzlmod): add python.override APIs by @aignas in #2222
  • chore: prepare 0.36.0 release by @aignas in #2245

New Contributors

Full Changelog: 0.35.0...0.36.0