Skip to content

0.27.0

Compare
Choose a tag to compare
@github-actions github-actions released this 17 Nov 20:58
· 170 commits to main since this release
cde1b52

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.27.0")

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

pip.parse(
    name = "pip",
    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 = "9acc0944c94adb23fba1c9988b48768b1bacc6583b52a2586895c5b7491e2e31",
    strip_prefix = "rules_python-0.27.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.27.0/rules_python-0.27.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 = "9acc0944c94adb23fba1c9988b48768b1bacc6583b52a2586895c5b7491e2e31",
    strip_prefix = "rules_python-0.27.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.27.0/rules_python-0.27.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

See CHANGELOG 0.27.0 for
a human friendly description of what has changed. Below are an overview of commits.

  • chore: bump the CHANGELOG.md by @aignas in #1467
  • docs: document a breaking changes policy by @rickeylev in #1460
  • internal: add stub register_extension_name to make patching easier by @rickeylev in #1475
  • docs(gazelle): Update README.md for gazelle by @jsharpe in #1454
  • doc(bzlmod): bump stardoc to 0.6.2 and enable bzlmod docs building by @aignas in #1476
  • refactor(bzlmod): move bzlmod code to private/bzlmod by @aignas in #1477
  • test: use a custom rule instead of native.filegroup for testing that PyInfo is a required provider. by @rickeylev in #1479
  • docs: Fix a few typos in various docs and comments by @rickeylev in #1480
  • fix(repo setup): Skip aliases for unloaded toolchains by @kilian-funk in #1473
  • Disable Bzlmod explicitly in .bazelrc by @meteorcloudy in #1470
  • test(bzlmod): Make some tests bzlmod compatible with Bazel@HEAD by @rickeylev in #1482
  • docs: Fix URL in README.md by @dshahbaz in #1483
  • docs: allow manual edits to generated docs by @aignas in #1478
  • fix: allowing to import code generated from proto with strip_import_prefix by @linzhp in #1406
  • fix(examples): bump gazelle in examples/build_file_generation by @OliverFM in #1421
  • refactor(visibility)!: limit visibility of an internal library by @aignas in #1490
  • ci: pin pystar bazel version by @aignas in #1497
  • fix(py_wheel): produce deterministic wheel files by @dizzy57 in #1453
  • build(gazelle): embed Python zip file by @linzhp in #1485
  • refactor(whl_library): split wheel downloading and extraction into separate executions by @aignas in #1487
  • feat(whlmaker): introduce an internal _WhlFile class and stop sorting RECORD by @aignas in #1488
  • test: remove usage of deprecated method TestCase.assertEquals by @dizzy57 in #1494
  • docs: Fix typo in comment by @jjwatt in #1408
  • docs: initial doc generation using Sphinx by @rickeylev in #1489
  • test(bzlmod): support toolchain tests on bzlmod by @aignas in #1507
  • build(deps): bump urllib3 from 1.26.13 to 1.26.18 in /examples/bzlmod by @dependabot in #1505
  • build(deps): bump urllib3 from 1.26.7 to 1.26.18 in /tests/pip_repository_entry_points by @dependabot in #1500
  • build(deps): bump urllib3 from 1.26.14 to 1.26.18 in /tools/publish by @dependabot in #1499
  • build(deps): bump urllib3 from 1.26.13 to 1.26.18 in /examples/pip_parse by @dependabot in #1501
  • build(deps): bump urllib3 from 1.26.17 to 1.26.18 in /examples/pip_repository_annotations by @dependabot in #1502
  • chore!: disable pip_install and remove from examples and tests by @aignas in #1510
  • docs: make readthedocs render a bit nicer and port docs over to Sphinx by @rickeylev in #1511
  • feat(bzlmod): support patching 'whl' distributions by @aignas in #1393
  • chore!: switch py_wheel flags to True to start enforcing PEP440 by @aignas in #1513
  • refactor!: do not use a wrapper macro for pip_parse by @aignas in #1514
  • build(deps): bump requests from 2.28.2 to 2.31.0 in /docs/sphinx by @dependabot in #1512
  • build(deps): bump urllib3 from 1.26.15 to 1.26.18 in /docs/sphinx by @dependabot in #1508
  • build(deps): bump certifi from 2022.12.7 to 2023.7.22 in /docs/sphinx by @dependabot in #1509
  • internal(pystar): use rules_python PyCcLinkParamsProvider if pystar is enabled by @rickeylev in #1517
  • ci: don't run minimum bazel version tests as part of bazel downstream… by @rickeylev in #1522
  • docs: show PR warning banner and fix links doc source pages by @rickeylev in #1521
  • tests: make multi_python_verions example bzlmod compatible by @rickeylev in #1523
  • test: make compile_pip_requirements work with bzlmod enabled by @rickeylev in #1526
  • tests: explicitly disable bzlmod for pip_repository_entry_points test by @rickeylev in #1527
  • tests: explicitly disable bzlmod for pip_parse_vendored example by @rickeylev in #1529
  • chore(pip_parse, gazelle): generate/use hub repo aliases by default by @aignas in #1525
  • test: make compile_pip_requirements_test_from_external_workspace work with bzlmod by @rickeylev in #1528
  • tests: make pip_parse example work with bzlmod enabled by @rickeylev in #1524
  • refactor: use click in dependency_resolver.py by @cj81499 in #1071
  • cleanup(pystar): inline @bazel_tools and @platforms references by @rickeylev in #1531
  • cleanup: delete defunct load of bzlmod pip_repository by @rickeylev in #1533
  • feat(pip): provide pypi -> whl target mapping in requirements.bzl by @alexeagle in #1532
  • feat: support pyproject.toml in compile_pip_requirements by @aignas in #1519
  • cleanup: delete commented out line forgottenly left in by @rickeylev in #1535
  • fix(gazelle): generate a single py_test for coarse_grained setups by @aignas in #1538
  • tests: disable bzlmod for workspace-only pip_repository_annotations example by @rickeylev in #1540
  • tests: disable bzlmod for workspace-only build_file_generation example by @rickeylev in #1539
  • fix: always ignore .pyc.NNNN files from the hermetic runtime tree by @rickeylev in #1541
  • chore(wheelmaker): drop Python 2 support by @aignas in #1545
  • test(pystar): run pystar under Windows and Mac by @rickeylev in #1547
  • test(gazelle): have a go_test target for each gazelle test by @aignas in #1537
  • feat: expose 'pip_utils.normalize_name' function by @aignas in #1542
  • feat(gazelle): use relative paths for resolved imports by @adzenith in #1554
  • fix: Upgrade bazel_features to 1.1.1 by @linzhp in #1559
  • fix: py_proto_library: append to PYTHONPATH less by @tpudlik in #1553
  • fix: py_proto_library: transitive strip_import_prefix by @tpudlik in #1558
  • fix(bzlmod pip): ensure that sub-modules do not have invalid repos by @aignas in #1549
  • release: update changelog for 0.27.0 release by @rickeylev in #1565
  • feat(gazelle): allow per-file py_test generation by @adzenith in #1563
  • fix(toolchains): include tcl/** files in Windows interpreter by @th0masb in #1552
  • fix(gazelle): make cmd.Wait more idiomatic by @aignas in #1550

New Contributors

Full Changelog: 0.26.0...0.27.0