Skip to content

Releases: bazelbuild/rules_python

0.12.0

29 Aug 03:09
cf6542d
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "b593d13bb43c94ce94b483c2858e53a9b811f6f10e1e0eedc61073bd90e58d9c",
    strip_prefix = "rules_python-0.12.0",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.12.0.tar.gz",
)

What's Changed

  • Added label to py_wheel progress message. by @UebelAndre in #791
  • Add option to use "pip download" instead of "pip wheel" to download wheels for other platforms by @jesseschalken in #773
  • Revert "Add option to use "pip download" instead of "pip wheel" to do… by @groodt in #808
  • Fix missing python includes for Unix hosts by @UebelAndre in #809
  • Fix ability to download windows toolchains on case sensitive unix systems by @UebelAndre in #797
  • Revert "pip_compile: remove external/workspace_name prefix from gener… by @alexeagle in #794
  • Revert "Revert "Add option to use "pip download" instead of "pip wheel" to do…" by @groodt in #811

Full Changelog: 0.11.0...0.12.0

0.11.0

15 Aug 09:44
a2b7f42
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "c03246c11efd49266e8e41e12931090b613e12a59e6f55ba2efd29a7cb8b4258",
    strip_prefix = "rules_python-0.11.0",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.11.0.tar.gz",
)

What's Changed

  • pip-tools: 6.6.2 -> 6.8.0 by @groodt in #762
  • Make hermetic interpreters compatible to disallow_empty_glob by @martis42 in #761
  • [gazelle] Use filepath.WalkDir instead of filepath.Walk by @dzbarsky in #770
  • Exclude static libraries and tests to reduce zipped Python executables by @tetsuok in #758
  • exec_compatible_with -> target_compatible_with #704 by @molar in #747
  • fix: fail if the user is root by @f0rmiga in #749
  • Simplify glob pattern to exclude static libraries by @tetsuok in #771
  • pip: 22.1.2 -> pip-22.2.1 by @groodt in #774
  • Fix download of Windows Python toolchain on Linux by @jesseschalken in #769
  • chore: remove pkginfo from bzlmod file by @alexeagle in #778
  • 709/from imports by @aptenodytes-forsteri in #760
  • Add a consistent python interpreter symlink by @mattyclarkson in #782
  • Exclude unused libpython{python_version}.so to reduce the size of zipped Python executables by @tetsuok in #772
  • Update Python minor toolchain versions to allow smaller Python binaries by @tetsuok in #779
  • Added importlib + reqs to pip-compile for python < 3.8 by @Faqa in #781
  • feat(gazelle_python_manifest): provide a target with the given name by @mattem in #787
  • fix(gazelle): handle purelib and platlib packages that don't set 'Root-Is-Purelib: true' by @mattem in #768
  • Ran black and isort to fix files missed by commit hook by @UebelAndre in #790
  • Fix leading forward slashes in RECORD files produced by py_wheel. by @UebelAndre in #789
  • Add type annotations to runfiles library by @dzbarsky in #764

New Contributors

Full Changelog: 0.10.2...0.11.0

0.10.2

14 Jul 22:35
834149d
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "a3a6e99f497be089f81ec082882e40246bfd435f52f4e82f37e89449b04573f6",
    strip_prefix = "rules_python-0.10.2",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.10.2.tar.gz",
)

What's Changed

  • Guard python_interpreter_target workspace name on None type check. by @hrfuller in #755
  • Fix for requirements_lock with PEP440 direct references by @groodt in #756

Full Changelog: 0.10.1...0.10.2

0.10.1

13 Jul 04:31
df308be
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "00b25b02dc4593d620fccdd6c6069a202b87ac56f8446fab1a8101da557da2c2",
    strip_prefix = "rules_python-0.10.1",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.10.1.tar.gz",
)

What's Changed

Full Changelog: 0.10.0...0.10.1

0.10.0

02 Jul 22:05
ab6940a
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "56dc7569e5dd149e576941bdb67a57e19cd2a7a63cc352b62ac047732008d7e1",
    strip_prefix = "rules_python-0.10.0",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.10.0.tar.gz",
)

What's Changed

  • feat: cc_import for libpython by @f0rmiga in #727
  • pip: 22.0.4 -> 22.1.2; pip-tools: 6.6.0 -> 6.6.2 by @groodt in #718
  • Fix #721. Remove self-link dependency pulled in sometimes by extras by @thundergolfer in #730
  • fix: versioned shared object for libpython on Linux by @f0rmiga in #729
  • Support configuration variables in py_wheel "version" attirbute. by @pstradomski in #640
  • Provide current_py_toolchain by @jheaff1 in #731
  • Validation to ensure requirements_lock is pinned. by @groodt in #732
  • Use PEP 508 rules when setting deps from extras by @mattoberle in #724
  • pip_compile: remove external/workspace_name prefix from generated requirements.txt by @BoleynSu in #690
  • chore: update to Bazel 5.2.0 by @alexeagle in #736
  • Remove //experimental by @groodt in #738
  • Use installer to remove custom unzip and spread code by @groodt in #715
  • More verbose 'fail' msgs. Don't rely on executed tools err msg by @thundergolfer in #737
  • refactor: move all re-exports to private/reexports.bzl by @mattem in #739
  • Patch pip environment with xcode sdk location. by @hrfuller in #697

New Contributors

Full Changelog: 0.9.0...0.10.0

0.9.0

12 Jun 00:15
4c961d9
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "5fa3c738d33acca3b97622a13a741129f67ef43f5fdfcec63b29374cc0574c29",
    strip_prefix = "rules_python-0.9.0",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.9.0.tar.gz",
)

What's Changed

New Contributors

Full Changelog: 0.8.1...0.9.0

0.8.1

22 Apr 14:19
ae7a267
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "cdf6b84084aad8f10bf20b46b77cb48d83c319ebe6458a18e9d2cebf57807cdd",
    strip_prefix = "rules_python-0.8.1",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.1.tar.gz",
)

What's Changed

New Contributors

Full Changelog: 0.8.0...0.8.1

0.8.0

20 Mar 20:43
fe30f15
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "9fcf91dbcc31fde6d1edb15f117246d912c33c36f44cf681976bd886538deba6",
    strip_prefix = "rules_python-0.8.0",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.0.tar.gz",
)

BREAKING CHANGES

In 0.7.0 we introduced the hermetic Python interpreter toolchain, with a repository rule python_register_toolchains that generated a "magically-named" repo with _resolved_interpreter as the suffix, like this:

python_register_toolchains(
    name = "python3_9",
    # Available versions are listed in @rules_python//python:versions.bzl.
    # We recommend using the same version your team is already standardized on.
    python_version = "3.9",
)
load("@python3_9_resolved_interpreter//:defs.bzl", "interpreter")

In 0.8.0 that suffix is removed, so the resolved toolchain is just named the same as you provide. In that example the last line would now be

load("@python3_9//:defs.bzl", "interpreter")

What's Changed

  • release: Fix release snippet by @alexeagle in #651
  • docs: avoid users on 3.10 by accident by @alexeagle in #653
  • fix: take custom tools versions into account when selecting Python interpreter by @mattem in #654
  • Allow for custom python versions in python_register_toolchains by @UebelAndre in #657
  • Update CODEOWNERS. remove andy scott as maintainer by @thundergolfer in #658
  • Document how to vendor a pip_parse requirements.bzl file by @alexeagle in #655
  • Expose defs.bzl form resolved_interpreter_os_alias as a target by @UebelAndre in #659
  • Allow python_register_toolchains.name to be the resolved interpreter repo by @UebelAndre in #656
  • Fix annotations_test on windows systems that don't support symlinks by @UebelAndre in #665
  • Added support for custom strip_prefix args in toolchains by @UebelAndre in #664
  • Updated pip, pkginfo, setuptools, and wheel. by @UebelAndre in #661

Full Changelog: 0.7.0...0.8.0

0.7.0

11 Mar 16:04
4f826d1
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "15f84594af9da06750ceb878abbf129241421e3abbd6e36893041188db67f2fb",
    strip_prefix = "rules_python-0.7.0",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.7.0.tar.gz",
)

News

rules_python can now fetch a hermetic pre-built Python interpreter from the excellent https://github.com/indygreg/python-build-standalone project.
Thank you @indygreg for providing this resource!

To use it, see the docs for python_register_toolchains on https://github.com/bazelbuild/rules_python#getting-started

What's Changed

  • Fix buildozer command for substituting deps by @hrfuller in #596
  • Added .gitignore files to example directories by @UebelAndre in #599
  • Fix undefined name in purelib.py by @hrfuller in #604
  • changes to pip_repository source files now re-trigger the repo rule by @UebelAndre in #601
  • Added support for annotating rendered pip dependencies by @UebelAndre in #589
  • bump: go version from 1.16 to 1.17.6 by @f0rmiga in #610
  • Fixed extra_pip_arg parsing error in pip_repository rules. by @UebelAndre in #613
  • fix compile_pip_requirements on windows by @jheaff1 in #595
  • Use @rules_python//python/runfiles for examples and tests by @UebelAndre in #614
  • Make python only bzl_library target publicly visible by @UebelAndre in #611
  • restrict visibility on filegroup target only consumed in 1 place by @thundergolfer in #605
  • Added integration test for testing nuances of pip_repository macros by @UebelAndre in #615
  • Removed examples that are not platform agnostic by @UebelAndre in #620
  • Fixed buildifier defects by @UebelAndre in #621
  • Fix false positive tests in CI for Windows by @UebelAndre in #598
  • chore: bump local version of bazel used to 4.2.0 by @mattem in #616
  • Fixed incorrect custom compile commands from compile_pip_requirements by @UebelAndre in #627
  • conditionally log unused annotations by @UebelAndre in #629
  • Exclude dist-info data from pip_repository targets by @UebelAndre in #626
  • feat: concurrent parsing for Gazelle by @f0rmiga in #630
  • Updated pip_repository data ignore patterns by @UebelAndre in #632
  • Allow *.dist-info/WHEEL files into pip_repository generated targets by @UebelAndre in #634
  • feat: support pip_parse in Gazelle by @f0rmiga in #633
  • Allow METADATA files in pip_repository generated targets by @UebelAndre in #637
  • feat: cpython toolchains by @f0rmiga in #618
  • fix: lazy fetch checksums for toolchains by @f0rmiga in #648
  • feat: allow overriding tool versions and base url for predefined Python interpreters by @mattem in #647
  • chore: update GitHub archive url to produce stable SHA by @alexeagle in #650

New Contributors

Full Changelog: 0.6.0...0.7.0

0.6.0

05 Jan 00:06
b842276
Compare
Choose a tag to compare

WORKSPACE setup:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python",
    sha256 = "a30abdfc7126d497a7698c29c46ea9901c6392d6ed315171a6df5ce433aa4502",
    strip_prefix = "rules_python-0.6.0",
    url = "https://github.com/bazelbuild/rules_python/archive/0.6.0.tar.gz",
)

Breaking Changes

If you used the gazelle plugin, the workspace call to modules_mapping() should now be moved to a BUILD file as it is a regular rule. See the updates to examples/build_file_generation in https://github.com/bazelbuild/rules_python/pull/578/files

Users of pip_parse (or pip_repository(incremental=True)) will have the generated repositories change, e.g. from @pip_pypi__amqp//:pkg to @amqp//:pkg. If you use the requirements() helper, this won't affect you, but if you referred to the generated labels directly it will.
You can add the attribute repo_prefix = "pip_pypi__" on pip_parse to restore the previous default.

What's Changed

New Contributors

Full Changelog: 0.4.0...0.6.0