Skip to content

Releases: aspect-build/rules_py

v1.0.0

13 Nov 22:00
b9a2c70
Compare
Choose a tag to compare

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "2ce48e0f3eaaf73204b623f99f23d45690b862a994b5b3c2464a2e361b0fc4ae",
    strip_prefix = "rules_py-1.0.0",
    url = "https://github.com/aspect-build/rules_py/releases/download/v1.0.0/rules_py-v1.0.0.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • fix: include default layer groups. by @thesayyn in #410
  • fix: Handle single-file module pypi-deps in py_pex_binary by @ekfeet in #392
  • fix: split on site-packages path segment when reporting conflicts by @mattem in #413
  • chore: bump bazel to 7.4.0 by @mattem in #416
  • chore: test on Bazel 8 rather than Bazel 6 by @alexeagle in #421
  • chore: run CI for all pull requests by @mattem in #419
  • chore: bump rules_rust to 0.53.0 by @mattem in #417
  • chore: trigger PRs on synchronize by @mattem in #422
  • chore: bump rust version to 1.81.0 by @mattem in #418
  • feat: drop rattler_installs_packages for uv crates by @mattem in #412
  • chore: disable broken test by @alexeagle in #429
  • Add types to file generated by test.py by @antspy in #428
  • fix: flip unused_inputs=1 by default by @thesayyn in #432

New Contributors

Full Changelog: v0.9.1...v1.0.0

v1.0.0-rc1

01 Nov 19:28
b81f63c
Compare
Choose a tag to compare

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "1.0.0-rc1")

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "6be8d57082ee3e89cf0d97055ba8388d8618f00fd86e86cc597d8a91824fb7d4",
    strip_prefix = "rules_py-1.0.0-rc1",
    url = "https://github.com/aspect-build/rules_py/releases/download/v1.0.0-rc1/rules_py-v1.0.0-rc1.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • fix: split on site-packages path segment when reporting conflicts by @mattem in #413
  • chore: bump bazel to 7.4.0 by @mattem in #416
  • chore: test on Bazel 8 rather than Bazel 6 by @alexeagle in #421
  • chore: run CI for all pull requests by @mattem in #419
  • chore: bump rules_rust to 0.53.0 by @mattem in #417
  • chore: trigger PRs on synchronize by @mattem in #422
  • chore: bump rust version to 1.81.0 by @mattem in #418
  • feat: drop rattler_installs_packages for uv crates by @mattem in #412
  • chore: disable broken test by @alexeagle in #429

Full Changelog: v1.0.0-rc0...v1.0.0-rc1

v1.0.0-rc0

10 Oct 20:32
781650c
Compare
Choose a tag to compare

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "1.0.0-rc0")

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "bea028cfac6d963e92b6dee1ca84898be058dea0f986b2bffc9cde03f36330fb",
    strip_prefix = "rules_py-1.0.0-rc0",
    url = "https://github.com/aspect-build/rules_py/releases/download/v1.0.0-rc0/rules_py-v1.0.0-rc0.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • fix: include default layer groups. by @thesayyn in #410
  • fix: Handle single-file module pypi-deps in py_pex_binary by @ekfeet in #392

New Contributors

Full Changelog: v0.9.1...v1.0.0-rc0

v0.9.1

04 Oct 19:28
50dbd34
Compare
Choose a tag to compare

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "a032348de4508b94d30a13bce39d24e9170036ad2a16911127409b9dae7d453c",
    strip_prefix = "rules_py-0.9.1",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.9.1/rules_py-v0.9.1.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • chore: bazel-lib 2.0 fixes the missing newline in hashes by @alexeagle in #403

Full Changelog: v0.9.0...v0.9.1

v0.8.2

02 Oct 17:27
c355f6b
Compare
Choose a tag to compare

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "f5ee6605d01dfc962e3f257595dfdcf9e3526e60562fc31f3fbc405d9ff0c42d",
    strip_prefix = "rules_py-0.8.2",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.8.2/rules_py-v0.8.2.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • refactor: py_venv macro improved defaults for usability by @alexeagle in #396
  • example: Bump versions in uv example by @hofbi in #374
  • chore(deps): update dependency org_chromium_sysroot_linux_x86_64 to v0.0.20 by @renovate in #387
  • chore(deps): update dependency org_chromium_sysroot_linux_arm64 to v0.0.20 by @renovate in #386
  • chore(BCR): drop Bazel 6 testing by @alexeagle in #397
  • chore(release): no longer creating prereleases by @alexeagle in #398
  • fix: add missing python version flag attr to pex by @mattem in #399

New Contributors

Full Changelog: v0.8.0...v0.8.2

v0.8.1

01 Oct 23:26
7a9e4b2
Compare
Choose a tag to compare

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "5cc40d71b87c0868b5703056cb37db91c27c177b2516490e61bd93f88ad252d3",
    strip_prefix = "rules_py-0.8.1",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.8.1/rules_py-v0.8.1.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • chore(deps): update dependency urllib3 to v1.26.19 [security] by @renovate in #352
  • chore(deps): update softprops/action-gh-release action to v2 by @renovate in #322
  • chore(deps): update dependency bazel_gazelle to v0.36.0 by @renovate in #326
  • chore(deps): update dependency aspect_bazel_lib to v1.42.2 by @renovate in #321
  • chore(deps): update dependency typing-extensions to v4.12.2 by @renovate in #327
  • chore(deps): update dependency sqlparse to v0.5.1 [security] by @renovate in #330
  • chore: add smoke test to e2e/use_release by @mattem in #370
  • chore(deps): update dependency certifi to v2024.7.4 [security] by @renovate in #364
  • chore(deps): update dependency django to v4.2.14 [security] by @renovate in #366
  • chore(deps): update dependency django to v4.2.15 [security] by @renovate in #378
  • fix: mark a 'testing only' python toolchain as dev_dep by @alexeagle in #385
  • chore(deps): update dependency aspect_bazel_lib to v1.42.3 by @renovate in #379
  • feat: implement --build_python_zip pex by @thesayyn in #324

Full Changelog: v0.7.4...v0.8.1

v0.8.0

05 Sep 15:51
7a9e4b2
Compare
Choose a tag to compare

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "971e48f44e3a71430ddae340c262a71bccc604e4c43c5be827b8bb925ed43d19",
    strip_prefix = "rules_py-0.8.0",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.8.0/rules_py-v0.8.0.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • chore(deps): update dependency urllib3 to v1.26.19 [security] by @renovate in #352
  • chore(deps): update softprops/action-gh-release action to v2 by @renovate in #322
  • chore(deps): update dependency bazel_gazelle to v0.36.0 by @renovate in #326
  • chore(deps): update dependency aspect_bazel_lib to v1.42.2 by @renovate in #321
  • chore(deps): update dependency typing-extensions to v4.12.2 by @renovate in #327
  • chore(deps): update dependency sqlparse to v0.5.1 [security] by @renovate in #330
  • chore: add smoke test to e2e/use_release by @mattem in #370
  • chore(deps): update dependency certifi to v2024.7.4 [security] by @renovate in #364
  • chore(deps): update dependency django to v4.2.14 [security] by @renovate in #366
  • chore(deps): update dependency django to v4.2.15 [security] by @renovate in #378
  • fix: mark a 'testing only' python toolchain as dev_dep by @alexeagle in #385
  • chore(deps): update dependency aspect_bazel_lib to v1.42.3 by @renovate in #379
  • feat: implement --build_python_zip pex by @thesayyn in #324

Full Changelog: v0.7.4...v0.8.0

v0.7.4

22 Jul 15:12
90c6e09
Compare
Choose a tag to compare
v0.7.4 Pre-release
Pre-release

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "04278ce23cc5c91a24b62ea00ac04c553fe40ca390943acf6684d367a681a871",
    strip_prefix = "rules_py-0.7.4",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.7.4/rules_py-v0.7.4.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

Full Changelog: v0.7.3...v0.7.4

v0.7.3

01 May 00:56
d45e542
Compare
Choose a tag to compare
v0.7.3 Pre-release
Pre-release

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "59446563a724b1cb449a604c8fbcd85e18a7001e9bb230ef59d78154886ad8cc",
    strip_prefix = "rules_py-0.7.3",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.7.3/rules_py-v0.7.3.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • chore: bump rust to 1.77.2 by @mattem in #337
  • fix: ignore conflicting symlinks at site-packages root on venv creation by @mattem in #336

Full Changelog: v0.7.2...v0.7.3

v0.7.2

26 Apr 04:13
6c9aaca
Compare
Choose a tag to compare
v0.7.2 Pre-release
Pre-release

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

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

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

# Minimum version needs:
# feat: add interpreter_version_info to py_runtime by @mattem in #1671
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.29.0")

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

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_py",
    sha256 = "959b433fa19238d3d3644be2960c606cea27b83a9ea8a0f1f7bd6d3be4fc53e9",
    strip_prefix = "rules_py-0.7.2",
    url = "https://github.com/aspect-build/rules_py/releases/download/v0.7.2/rules_py-v0.7.2.tar.gz",
)
# Fetches the rules_py dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_py//py:repositories.bzl", "rules_py_dependencies")

rules_py_dependencies()

load("@aspect_rules_py//py:toolchains.bzl", "rules_py_toolchains")

rules_py_toolchains()

# "Installation" for rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
    name = "python_toolchain",
    python_version = "3.9",
)

py_repositories()

What's Changed

  • chore(deps): update dependency rules_python_gazelle_plugin to v0.31.0 by @renovate in #271
  • Remove BASH_BIN in favor of referencing bash via /usr/bin/env by @shinypb in #229
  • chore: flip no legacy external runfiles by @thesayyn in #193
  • renovate: don't update minimum bounds in MODULE.bazel by @alexeagle in #294
  • chore(deps): update actions/github-script action to v7 by @renovate in #296
  • fix: use correct runfiles path for venv import paths by @wade-arista in #299
  • chore: update presubmit.yml by @alexeagle in #293
  • chore: improve error message for py_runtime missing version info by @wade-arista in #301
  • chore(deps): update dependency aspect_bazel_lib to v1.40.3 by @renovate in #304
  • Fix for external deps that use repo root relative imports by @scasagrande in #310
  • fix: use PyInfo from rules_python by @mattem in #311
  • fix: don't allow files in deps attr by @mattem in #318
  • fix: handle a system interpreter path on the toolchain by @mattem in #313
  • site-packages symlink forest in venv by @siddharthab in #275
  • chore(deps): update dependency asgiref to v3.8.1 by @renovate in #319
  • refactor: split toolchains and repositories by @thesayyn in #323

New Contributors

Full Changelog: v0.7.1...v0.7.2