Releases: aspect-build/rules_py
v0.7.1
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_py", version = "0.7.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 = "6b47e3e20afef68c33fb0e103462d6ca35a33423c637429566c412ade555a778",
strip_prefix = "rules_py-0.7.1",
url = "https://github.com/aspect-build/rules_py/releases/download/v0.7.1/rules_py-v0.7.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()
# "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
- Publish binaries on releases by @alexeagle in #292
Full Changelog: v0.7.0...v0.7.1
v0.7.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_py", version = "0.7.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 = "75179b67f8c187916476c7861ff3453b437614b35cd20c763738b643f49e59f7",
strip_prefix = "rules_py-0.7.0",
url = "https://github.com/aspect-build/rules_py/releases/download/v0.7.0/rules_py-v0.7.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()
# "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
- feat: switch to creation of venv without Python or pip by @mattem in #233
- chore: BCR testing on Bazel 6 and 7 by @alexeagle in #247
- chore(deps): update dependency bazel_skylib to v1.5.0 by @renovate in #225
- chore(deps): update dependency pluggy to v1.4.0 by @renovate in #253
- chore(deps): update dependency io_bazel_rules_go to v0.46.0 by @renovate in #252
- chore(deps): update aspect_gcc_toolchain digest to ff3298d by @renovate in #208
- chore(deps): update io_bazel_rules_docker digest to 3040e1f by @renovate in #209
- chore(deps): update rules_python digest to c6941a8 by @renovate in #222
- chore: don't rebase renovate diffs by @mattem in #257
- chore(deps): update dependency django to v4.2.10 [security] by @renovate in #256
- chore(deps): update dependency exceptiongroup to v1.2.0 by @renovate in #251
- feat: detect prerelease, use source bins by @alexeagle in #258
- fix: move toolchain registration to different package by @mattem in #265
- feat: support Bazel 6 by @alexeagle in #266
- chore: green up main CI by @alexeagle in #267
- Remove openssl by @btobolaski in #269
- chore: add release rules for binaries by @mattem in #280
- Update rules_python dependency by @sfc-gh-dszot in #279
- chore: bump rules_python by @alexeagle in #282
- feat: GHA release automation for rust bins by @alexeagle in #281
- chore: rename release artifacts to match rust convention by @alexeagle in #285
- feat: remove checked-in Rust binaries by @alexeagle in #286
- feat: don't require users to build tools from source by @alexeagle in #287
- Add gazelle config note by @alexeagle in #288
New Contributors
- @btobolaski made their first contribution in #269
- @sfc-gh-dszot made their first contribution in #279
Full Changelog: v0.6.0...v0.7.0
v0.6.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_py", version = "0.6.0")
And also register a Python toolchain, see rules_python. For example:
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.27.1")
# NB: users need this as well, until a new version of rules_python is released
archive_override(
module_name = "rules_python",
urls = "https://github.com/bazelbuild/rules_python/archive/52381415be9d3618130f02a821aef50de1e3af09.tar.gz",
integrity = "sha256-pYfEFNWqygSEElDYgJsuIeDYn9oll/rZB0GcR+6rirA=",
strip_prefix = "rules_python-52381415be9d3618130f02a821aef50de1e3af09",
)
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 = "d60bb474069d77314532c3dd36ef162ab91ef3fe6e04d60836bd922a08e9fb4b",
strip_prefix = "rules_py-0.6.0",
url = "https://github.com/aspect-build/rules_py/releases/download/v0.6.0/rules_py-v0.6.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()
What's Changed
- fix: install transitive wheels reachable through resolutions by @alexeagle in #230
- fix: use original interpreter path as 'home' value in pyvenv.cfg by @mattem in #232
- chore(deps): update dependency bazel to v6.4.0 by @renovate in #224
- chore(deps): update dependency rules_python to v0.27.1 by @renovate in #211
- chore: minimal changes required to upgrade to Bazel 7 and bzlmod by @alexeagle in #234
- fix: handle py_binary#main like rules_python does by @alexeagle in #241
- fix: py_library add srcs to its runfiles by @alexeagle in #242
- chore: upgrade rules_python near HEAD by @alexeagle in #245
- chore(deps): update dependency bazel_skylib_gazelle_plugin to v1.5.0 by @renovate in #243
- chore(deps): update dependency bazel_gazelle to v0.35.0 by @renovate in #240
- chore(deps): update dependency aspect_bazel_lib to v1.40.0 by @renovate in #239
- chore: cancel previous GHA from the same PR by @gregmagolan in #254
- chore: upgrade to Bazel 7.0.2 by @gregmagolan in #249
Full Changelog: v0.5.0...v0.6.0
v0.5.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_py", version = "0.5.0")
And also register a Python toolchain, see rules_python. For example:
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.22.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
name = "python3",
configure_coverage_tool = True,
python_version = "3.11",
)
use_repo(python, "python3_toolchains")
register_toolchains(
"@python3_toolchains//:all",
)
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_py",
sha256 = "e1d1023bc9ba8545dc87c6df10508d9d7c20f489f5e5c5c1e16380b33c013485",
strip_prefix = "rules_py-0.5.0",
url = "https://github.com/aspect-build/rules_py/releases/download/v0.5.0/rules_py-v0.5.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()
What's Changed
- refactor: put 'git archive' config in .gitattributes by @alexeagle in #215
- feat: support 'virtual' dependencies by @mattem in #201
- chore(deps): update dependency bazel_gazelle to v0.34.0 by @renovate in #188
- chore(deps): update dependency rules_python_gazelle_plugin to v0.26.0 by @renovate in #192
- chore(deps): update dependency aspect_bazel_lib to v1.38.1 by @renovate in #187
- fix(py_library): don't return transitive srcs as defaultinfo by @alexeagle in #221
- chore(deps): update dependency io_bazel_rules_go to v0.42.0 by @renovate in #195
- build(deps): bump django from 4.2.0 to 4.2.7 in /py/tests/virtual/django by @dependabot in #220
- build(deps): bump django from 4.2.5 to 4.2.7 by @dependabot in #216
- fix: use original interpreter path as 'home' value in pyvenv.cfg by @mattem in #226
New Contributors
- @dependabot made their first contribution in #220
Full Changelog: v0.4.0...v0.5.0
v0.4.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_py", version = "0.4.0")
And also register a Python toolchain, see rules_python. For example:
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.22.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
name = "python3_9",
configure_coverage_tool = True,
python_version = "3.9",
)
use_repo(python, "python3_9_toolchains")
register_toolchains(
"@python3_9_toolchains//:all",
)
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_py",
sha256 = "50b4b43491cdfc13238c29cb159b7ccacf0a1e54bd27b65ff2d5fac69af4d46f",
strip_prefix = "rules_py-0.4.0",
url = "https://github.com/aspect-build/rules_py/releases/download/v0.4.0/rules_py-v0.4.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()
What's Changed
- chore(deps): update io_bazel_rules_docker digest to 8e70c6b by @renovate in #148
- chore(deps): update dependency bazel_gazelle to v0.32.0 by @renovate in #156
- chore(deps): update dependency aspect_bazel_lib to v1.33.0 by @renovate in #144
- chore: update .gitignore by @mattem in #166
- chore(deps): update aspect_gcc_toolchain digest to 4bd1f94 by @renovate in #145
- chore: bump Python dependencies by @mattem in #167
- Allow passing deps in py_pytest_main by @linzhp in #163
- fix: ensure coverage providers are output from both py_library and py_binary rules by @mattem in #168
- chore: update sqlparse by @mattem in #169
- chore: bump bazel version to 6.3.1 by @mattem in #170
- chore(deps): update aspect_gcc_toolchain digest to 70a8c93 by @renovate in #171
- chore(deps): update dependency bazel to v6.3.2 by @renovate in #177
- fix: use rlocation for interpreter location by @mattem in #182
- chore(deps): update dependency rules_python to v0.18.0 by @renovate in #134
- chore: update Python dependencies by @mattem in #183
- chore(deps): update dependency bazel_skylib to v1.4.2 by @renovate in #135
- chore(deps): update dependency io_bazel_rules_go to v0.41.0 by @renovate in #178
- feat: expose py_venv rule, allowing creation of virtual envs from multiple targets by @mattem in #181
- chore: skip examples in release artifact by @alexeagle in #185
- Update readme by @alexeagle in #186
- Add
testonly
anddata
parameters topy_pytest_main
rule by @kpark-hrp in #190 - chore: run pre-commit on all files by @alexeagle in #199
- docs: update README by @alexeagle in #197
- chore: update rules_python by @mattem in #200
- chore: dogfood our rules rather than rules_python by @alexeagle in #204
- docs: improve generated documentation by @alexeagle in #203
- chore: use modern helper from bazel-lib by @alexeagle in #207
New Contributors
- @linzhp made their first contribution in #163
- @kpark-hrp made their first contribution in #190
Full Changelog: v0.3.0...v0.4.0
v0.3.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_py", version = "0.3.0")
And also register a Python toolchain, see rules_python. For example:
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.22.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
name = "python3_9",
configure_coverage_tool = True,
python_version = "3.9",
)
use_repo(python, "python3_9_toolchains")
register_toolchains(
"@python3_9_toolchains//:all",
)
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_py",
sha256 = "d87463035d7df79b79e9a03247c463bda3623f26b7a24dd1ebee9ced2be38f4e",
strip_prefix = "rules_py-0.3.0",
url = "https://github.com/aspect-build/rules_py/releases/download/v0.3.0/rules_py-v0.3.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()
What's Changed
- chore: update django to resolve dependabot alert by @gregmagolan in #155
- chore: bzlmod by @alexeagle in #162
Full Changelog: v0.2.0...v0.3.0
v0.2.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_py",
sha256 = "c977cadb8703e325f02c1e6a3718e85f52b158e199654b1a28125c420588d720",
strip_prefix = "rules_py-0.2.0",
url = "https://github.com/aspect-build/rules_py/releases/download/v0.2.0/rules_py-v0.2.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()
What's Changed
- Remove EXPERIMENTAL by @alexeagle in #115
- Clean up all symlinks in venv by @mvukov in #112
- chore(deps): update io_bazel_rules_docker digest to 48ad6d6 by @renovate in #108
- chore(deps): update dependency io_bazel_rules_go to v0.37.0 by @renovate in #107
- chore(deps): update dependency aspect_bazel_lib to v1.19.1 by @renovate in #106
- chore(deps): update aspect_gcc_toolchain digest to ac745d4 by @renovate in #80
- chore: update Python dependencies by @mattem in #118
- chore(deps): update dependency bazel to v5.4.0 by @renovate in #120
- chore(deps): bump rules_python to 0.16.1 by @mattem in #119
- fix black and flake8 errors in generated pytest runner. by @tellett in #129
- chore(deps): update dependency bazel_gazelle to v0.29.0 by @renovate in #128
- chore(deps): update dependency aspect_bazel_lib to v1.23.3 by @renovate in #122
- chore(deps): update io_bazel_rules_docker digest to e48c7cc by @renovate in #124
- chore(deps): update dependency rules_python to v0.16.2 by @renovate in #126
- chore(deps): update dependency pytest to v7.2.1 by @renovate in #127
- chore(deps): update dependency packaging to v23 by @renovate in #125
- chore(deps): update dependency iniconfig to v2 by @renovate in #123
- chore: add workflows for new issues & PRs by @gregmagolan in #140
- chore: remove New PR workflows as it doesn't work on forks by @gregmagolan in #141
- release: publish release artifact by @alexeagle in #142
- Fix/repo relative imports by @mvukov in #113
- chore(deps): update aspect_gcc_toolchain digest to 4a03b37 by @renovate in #138
- chore(deps): update dependency aspect_bazel_lib to v1.24.2 by @renovate in #137
- chore(deps): update dependency io_bazel_rules_go to v0.38.1 by @renovate in #133
- chore(deps): update io_bazel_rules_docker digest to fc729d8 by @renovate in #132
- chore(deps): update dependency django to v4.0.9 [security] by @renovate in #139
- chore: update renovate config by @gregmagolan in #146
New Contributors
- @mvukov made their first contribution in #112
- @tellett made their first contribution in #129
- @gregmagolan made their first contribution in #140
Full Changelog: v0.1.0...v0.2.0
v0.1.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_py",
sha256 = "66da30b09cf47ee40f2ae1c46346cc9a412940965d04899bd68d06a9d3380085",
strip_prefix = "rules_py-0.1.0",
url = "https://github.com/aspect-build/rules_py/archive/refs/tags/v0.1.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()
What's Changed
- feat: py_* rules in Starlark by @mattem in #10
- fix: ensure transitive wheels are passed from py_library by @mattem in #11
- feat: create venv in a separate action by @mattem in #12
- fix: don't pass kwargs to py_venv rule by @mattem in #16
- fix: ensure all Python toolchain files are added to runfiles by @mattem in #20
- fix: ensure VIRTUAL_ENV var is set correctly, unset PYTHONHOME if set by @mattem in #23
- fix: check for setuptools before creating symlinks by @mattem in #24
- feat: support interpreter_path from py3_toolchain by @mattem in #22
- fix: remove check on missing interpreter or interpreter_path on the toolchain by @mattem in #27
- feat: add autodetecting toolchain compatible with rules_py venvs by @mattem in #26
- fix: don't treat all transitive py_library rules as external by @mattem in #29
- chore: tidy and add django example by @mattem in #28
- test: import from external non-wheel py_library by @mattem in #30
- fix: typo autodecting -> autodetecting by @mattem in #34
- fix: workspace import pathing on py_library by @mattem in #32
- chore: bump bazel version to 5.1.1 by @mattem in #35
- fix: don't add source files to requirements files from transitive native py_library rules by @mattem in #36
- chore: rename BUILD to BUILD.bazel by @mattem in #38
- chore: show errors by default for failed tests by @mattem in #41
- chore: update rules_python to 0.8.1 by @mattem in #42
- chore: simplify default import attrs on macros by @mattem in #40
- fix: symlink to python3 instead of python_real by @mattem in #37
- chore: update aspect_bazel_lib to 0.12.1 by @mattem in #44
- fix: don't set sibling directory for venvs output directory by @mattem in #45
- fix: add the runfiles root as a python package by @mattem in #39
- feat: add support for variable and location expansion on
env
attr by @mattem in #47 - chore: add configuration for the Aspect gcc toolchain by @mattem in #43
- feat: return PyInfo provider from py_binary rules by @mattem in #48
- chore: update aspect_bazel_lib to 1.0.0 by @mattem in #49
- tests: adds first party dependencies to the container test, add note about usage by @mattem in #54
- Configure Renovate by @renovate in #50
- chore(deps): update actions/checkout action to v3 by @renovate in #59
- chore(deps): update actions/cache action to v3 by @renovate in #58
- chore(deps): update dependency asgiref to v3.5.2 by @renovate in #55
- refactor: remove use of maybe() helper by @alexeagle in #60
- chore: have less strict testing dependency constraints by @mattem in #61
- chore(deps): update aspect_gcc_toolchain digest to 2feb7ad by @renovate in #64
- chore(deps): update dependency io_bazel_rules_go to v0.33.0 by @renovate in #67
- chore(deps): update dependency bazel_skylib to v1.2.1 by @renovate in #66
- chore(deps): update build_bazel_integration_testing digest to 7d3e9ae by @renovate in #62
- chore(deps): update aspect_gcc_toolchain digest to b15575d by @renovate in #68
- chore(deps): update dependency colorama to v0.4.5 by @renovate in #69
- chore(deps): update io_bazel_rules_docker digest to ed321b3 by @renovate in #71
- chore(deps): update aspect_gcc_toolchain digest to efc23c5 by @renovate in #70
- Remove duplicated comment line in venv.bzl by @dzbarsky in #73
- chore(deps): update aspect_gcc_toolchain digest to 60ac9bb by @renovate in #74
- chore(deps): update dependency bazel to v5.2.0 by @renovate in #72
- chore(deps): update aspect_gcc_toolchain digest to 01f4347 by @renovate in #75
- chore(deps): update dependency bazel_gazelle to v0.26.0 by @renovate in #65
- chore(deps): update aspect_gcc_toolchain digest to 0e00070 by @renovate in #76
- chore(deps): update dependency io_bazel_rules_go to v0.34.0 by @renovate in #79
- chore(deps): update io_bazel_rules_docker digest to a8aff40 by @renovate in #78
- chore(deps): update dependency io_bazel_stardoc to v0.5.2 by @renovate in #63
- chore(deps): update dependency bazel to v5.3.0 by @renovate in #82
- chore(deps): update dependency aspect_bazel_lib to v1.13.0 by @renovate in #89
- chore(deps): update dependency bazel_skylib to v1.3.0 by @renovate in #92
- fix: dependabot alerts by @f0rmiga in #98
- feat: py_pytest_main by @f0rmiga in #96
- chore(deps): update dependency bazel to v5.3.2 by @renovate in #86
- chore(deps): update dependency io_bazel_rules_go to v0.35.0 by @renovate in #83
- fix: skylib download warning by @f0rmiga in #101
- chore(deps): update io_bazel_rules_docker digest to 88fb10b by @renovate in #81
- chore(deps): update dependency bazel_gazelle to v0.28.0 by @renovate in #84
- chore(deps): update dependency io_bazel_stardoc to v0.5.3 by @renovate in #91
- chore(deps): update dependency aspect_bazel_lib to v1.16.1 by @renovate in #99
- fix: generated docs by @f0rmiga in #102
- chore(deps): update io_bazel_rules_docker digest to 6482756 by @renovate in #103
- chore(deps): update dependency rules_python to v0.14.0 by @renovate in #90
- build: set container related targets as manual by @mattem in #105
New Contributors
- @mattem made their first contribution in #10
- @renovate made their first contribution in #50
- @alexeagle made their first contribution in #60
- @dzbarsky made their first contribution in #73
- @f0rmiga made their first contribution in #98
Full Changelog: https://github.com/aspect-build/rules_py/commits/v0.1.0