Skip to content

0.28.0

Compare
Choose a tag to compare
@github-actions github-actions released this 08 Jan 23:43
· 408 commits to main since this release
231d3f6

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

For a human friendly overview of changes, see https://rules-python.readthedocs.io/en/latest/changelog.html

Below is a list of commits.

  • pystar: support builtin providers for compatibility by @rickeylev in #1573
  • feat: use rules_python implemented py_runtime, py_runtime_pair, PyRuntimeInfo by @rickeylev in #1574
  • feat(pip_repository): Support pip parse cycles by @arrdem in #1166
  • cleanup: delete extraneous report.txt file by @rickeylev in #1587
  • docs: fix crossrefs and allow function parameters to be referenced by @rickeylev in #1585
  • docs(pip_parse): Update docs about experimental_requirement_cycles by @mishazharov in #1588
  • docs: update docs deps to latest versions by @rickeylev in #1586
  • fix(gazelle): ensure that gazelle helper modules are on PYTHONPATH by @aignas in #1590
  • doc: add a py_proto_library example with well-known-types by @aignas in #1571
  • examples(pip_parse): fix circular deps with sphinx by breaking cycles by @rickeylev in #1596
  • ci(example): provide a specific requirements.txt on windows by @aignas in #1605
  • feat: Creating one py_binary per main module by @linzhp in #1584
  • feat(whl_library): generate platform-specific dependency closures by @aignas in #1593
  • feat: keep main module in py_library by @linzhp in #1608
  • fix(py_runtime): make py_runtime_pair return builtin PyRuntimeInfo under Bazel 6; make python_bootstrap_template public by @rickeylev in #1611
  • fix: use rules_python's py_runtime in generated toolchains by @rickeylev in #1604
  • chore: Update Bazel support: drop 5, minimum 6.2, current 7.0 by @rickeylev in #1613
  • docs: update pip.parse example in release notes by @keith in #1616
  • docs: include changelog and contributing page in generated docs. by @rickeylev in #1617
  • fix(pip.parse): allow absolute path for python_interpreter; skip hermetic toolchain lookup when used by @rickeylev in #1619
  • fix: trimming deps in py_binary by @linzhp in #1614
  • doc: switch to pypi.org by @aignas in #1622
  • refactor: extract auth.bzl out of repositories.bzl by @aignas in #1627
  • internal: support setting visibility when rendering aliases by @aignas in #1626
  • fix(bzlmod pip.parse): allow requirements with duplicate package lines by @rickeylev in #1620
  • pycross: Add patching support to py_wheel_library by @philsc in #1436
  • test(bzlmod): refactor tests to not depend on implementation details by @aignas in #1628
  • docs: use stardoc proto output to generate markdown docs by @rickeylev in #1629
  • doc: Updating doc on py_binary generation by @linzhp in #1635
  • fix(gazelle): init.py in per-file targets by @siddharthab in #1582
  • chore: fix sphinx requirements by @aignas in #1648
  • docs: document support policies by @rickeylev in #1640
  • fix(whl_library): actually apply patches and warn if RECORD file patch is needed by @aignas in #1637
  • fix: missing dependencies of py_binary by @linzhp in #1630
  • chore!: remove pip_install macro and cleanup docs by @aignas in #1570
  • chore: enable bzlmod by default (for Bazel 6) by @rickeylev in #1632
  • build(deps): bump pygments from 2.11.2 to 2.15.0 in /tests/integration/pip_repository_entry_points by @dependabot in #1650
  • fix(coverage): add test attributes in transition module by @tanan in #1649
  • refactor(whl_library): reimplement wheel platform parsing in starlark by @aignas in #1636
  • feat(runfiles): Added type hints to @rules_python//python/runfiles by @UebelAndre in #1654
  • fix(bzlmod): allow modules to register the same toolchain as rules_python's default by @rickeylev in #1642
  • build(deps): bump setuptools from 59.6.0 to 65.5.1 in /tests/integration/pip_repository_entry_points by @dependabot in #1652
  • build(deps): bump requests from 2.27.1 to 2.31.0 in /tests/integration/pip_repository_entry_points by @dependabot in #1651
  • cleanup(dev): remove remnants of old bazel_integration_test code by @rickeylev in #1668
  • chore: Migrate to rules_bazel_integration_test by @philsc in #1598
  • fix(toolchains): register py cc toolchain for workspace builds by @rickeylev in #1670
  • feat(py_runtime): Allow py_runtime to take an executable target as the interpreter by @mishazharov in #1621
  • docs: update changelog for 0.28.0 release by @rickeylev in #1672

New Contributors

Full Changelog: 0.27.0...0.28.0