NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1384 most downloaded on PyPI
Last release 3 days ago
01 Oct 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
117 releases · first in 2023
One column per quarter.
chore: print zipapp deprecation for non-windows platforms by @rickeylev in https://github.com/bazel-contrib/rules_python/pull/3591
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.0.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "e91c374f6821fb963abb674cfd3780cd3310a62c54d8990e22d66571df5d7ed0",
strip_prefix = "rules_python-2.0.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc0/rules_python-2.0.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "e91c374f6821fb963abb674cfd3780cd3310a62c54d8990e22d66571df5d7ed0",
strip_prefix = "rules_python-2.0.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc0/rules_python-2.0.0-rc0.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()
_py_toolchain_type py_binary attribute by @rickeylev in https://github.com/bazel-contrib/rules_python/pull/3560versionadded details to some Gazelle directives.md by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3624py_zipapp_binary target by @nate-england in https://github.com/bazel-contrib/rules_python/pull/3653Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.0-rc1...2.0.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.9.2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "98880e2942e66fbe23202bd4174c089a54a203c32fc1cbc1c6c86df9f97ad7e3",
strip_prefix = "rules_python-1.9.2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.2/rules_python-1.9.2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()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 = "98880e2942e66fbe23202bd4174c089a54a203c32fc1cbc1c6c86df9f97ad7e3",
strip_prefix = "rules_python-1.9.2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.2/rules_python-1.9.2.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()Full Changelog: 1.9.1...1.9.2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.9.1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "4a02240a4a6a8b04077a7e49921949d2e6879d6f047be1e870d222de6709c7d1",
strip_prefix = "rules_python-1.9.1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.1/rules_python-1.9.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "4a02240a4a6a8b04077a7e49921949d2e6879d6f047be1e870d222de6709c7d1",
strip_prefix = "rules_python-1.9.1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.1/rules_python-1.9.1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.9.0...1.9.1
{#v1-9-1-added}
3.13.12, 3.14.3 Python toolchain from [20260325] release.3.10.20, 3.11.15, 3.12.13, 3.13.13 3.14.4, 3.15.0a8{#v1-9-0}
fix: Updating setuptools to patch CVE-2025-47273 by @aaronmaxlevy in https://github.com/bazel-contrib/rules_python/pull/2955
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.9.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "098ba13578e796c00c853a2161f382647f32eb9a77099e1c88bc5299333d0d6e",
strip_prefix = "rules_python-1.9.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.0/rules_python-1.9.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "098ba13578e796c00c853a2161f382647f32eb9a77099e1c88bc5299333d0d6e",
strip_prefix = "rules_python-1.9.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.0/rules_python-1.9.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()
--no_legacy_external_runfiles by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2772METADATA correctly if given empty requires_file by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2771pip_compile generate a *.test target; deprecate *_test by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/2812python.ParserOutput are now all public by @yushan26 in https://github.com/bazel-contrib/rules_python/pull/2959include_pytest_conftest annotation by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3080python_proto_naming_convention directive controls py_proto_library naming by @shaldengeki in https://github.com/bazel-contrib/rules_python/pull/3093has_py3_only_sources in the PyInfo constructor by @oprypin in https://github.com/bazel-contrib/rules_python/pull/3315py_console_script_binary compatible with symbolic macros by @janwinkler1 in https://github.com/bazel-contrib/rules_python/pull/3195pip.default arguments in multi-platform example by @hartikainen in https://github.com/bazel-contrib/rules_python/pull/3358lock rule has no implicit test target by @martis42 in https://github.com/bazel-contrib/rules_python/pull/3411_py_toolchain_type py_binary attribute by @rickeylev in https://github.com/bazel-contrib/rules_python/pull/3560versionadded details to some Gazelle directives.md by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3624Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.3.0...1.9.0
{#v1-9-0-removed}
{#v1-9-0-changed}
py_binary/py_test has been deprecated and
replaced by separate {obj}py_zipapp_binary and {obj}py_zipapp_test
rules. See
#3567
for a detailed migration guide.//python/config_setting/... and the @platforms package instead.PYTHONBREAKPOINT environment variable is automatically inheritedstamp attribute now transitions the Bazel builtin
{flag}--stamp flag.pytorch and friends easier to patch.py_wheel no longer expands the input depset during analysis,
improving analysis performance for targets with large dependency trees.--enable_runfiles=true is the default for
py_binary/py_test. Prior behavior can be restored by adding
@rules_python//command_line_option:enable_runfiles=false or
@rules_python//command_line_option:enable_runfiles=INHERIT to the
config_settings attribute. NOTE: enable_runfiles=true will
soon become required for Windows.{#v1-9-0-fixed}
conftest.py files are added in addition to sibling conftest.py.
(#3497) Note
that this behavior can be reverted to the pre-1.9.0 behavior by setting the new
python_include_ancestor_conftest directive to false.{#v1-9-0-added}
--debugger: allows specifying an extra dependency
to add to binaries/tests for custom debuggers.bazel_binary_info module to access it. The {flag}--stamp flag will
add {obj}--workspace_status_command information.python_generate_pyi_srcs has been added. When
true, a py_* target's pyi_srcs attribute will be set if any .pyi files
that are associated with the target's srcs are present.
(#3354).py_zipapp_binary and {obj}py_zipapp_test rules added. These
will replace --build_python_zip and the zip output group of
py_binary/py_test. The zipapp rules support more functionality, correctness,
and have better build performance.PyExecToolsInfo.exec_runtime for more easily
getting an RBE-compatible runtime to use for build actions.PyExecutableInfo has several new fields to aid packaging
of binaries: {obj}PyExecutableInfo.app_runfiles,
{obj}PyExecutableInfo.interpreter_args,
{obj}PyExecutableInfo.stage2_bootstrap, and
{obj}PyExecutableInfo.venv_python_exe.python_include_ancestor_conftest has been added.
When false, ancestor conftest targets are not automatically added to
{bzl:obj}py_test target dependencies. This false behavior is how things
were in rules_python before 1.9.0. The default is true, as the prior behavior
was technically incorrect.
(#3596){#v1-8-5}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.9.0-rc1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f4e65a01b6eca51f107d285c8d60869f42cbf4eac32711530399c704e9ba417a",
strip_prefix = "rules_python-1.9.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.0-rc1/rules_python-1.9.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "f4e65a01b6eca51f107d285c8d60869f42cbf4eac32711530399c704e9ba417a",
strip_prefix = "rules_python-1.9.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.0-rc1/rules_python-1.9.0-rc1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.9.0-rc0...1.9.0-rc1
chore: print zipapp deprecation for non-windows platforms by @rickeylev in https://github.com/bazel-contrib/rules_python/pull/3591
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.9.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "e7159a7365501365469ec9e812b14b3c5933587b7993fea26e63d395f01daa1a",
strip_prefix = "rules_python-1.9.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.0-rc0/rules_python-1.9.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "e7159a7365501365469ec9e812b14b3c5933587b7993fea26e63d395f01daa1a",
strip_prefix = "rules_python-1.9.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.0-rc0/rules_python-1.9.0-rc0.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()
_py_toolchain_type py_binary attribute by @rickeylev in https://github.com/bazel-contrib/rules_python/pull/3560versionadded details to some Gazelle directives.md by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3624Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.0-rc1...1.9.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.5")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "8964aa1e7525fea5244ba737458694a057ada1be96a92998a41caa1983562d00",
strip_prefix = "rules_python-1.8.5",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.5/rules_python-1.8.5.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "8964aa1e7525fea5244ba737458694a057ada1be96a92998a41caa1983562d00",
strip_prefix = "rules_python-1.8.5/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.5/rules_python-1.8.5.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.4...1.8.5
{#v1-8-5-fixed}
CurrentRepository() raising ValueError on Windows.
(#3579)pip_parse no longer silently drops PEP 508 URL-based requirements
(pkg @ https://...) when extract_url_srcs=False (the default for
pip_repository).sqlalchemy[postgresql-psycopg2binary]).
(#3587){#v1-8-4}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.4")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "c85d5db38d3eac06167a13b10c9dba54b003a986cd4f1ebc00806b74e7c12f06",
strip_prefix = "rules_python-1.8.4",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.4/rules_python-1.8.4.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "c85d5db38d3eac06167a13b10c9dba54b003a986cd4f1ebc00806b74e7c12f06",
strip_prefix = "rules_python-1.8.4/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.4/rules_python-1.8.4.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.3...1.8.4
{#v1-8-4-fixed}
"1.2" ~= "1.2.0")
has been fixed improving compatibility with the PEP440 standard.
Fixes #3580.whl file is missing them.
Fixes #3554.{#v1-8-3}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "94a2b4c5d9c45323a9737f8de8f841923bb628cace1e8e51fec5525ed9ccfb2d",
strip_prefix = "rules_python-1.8.3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.3/rules_python-1.8.3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "94a2b4c5d9c45323a9737f8de8f841923bb628cace1e8e51fec5525ed9ccfb2d",
strip_prefix = "rules_python-1.8.3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.3/rules_python-1.8.3.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.2...1.8.3
{#v1-8-3-fixed}
{#v1-8-2}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "6810ff4b137b62e86ce3cedfebeeb2c988d8c5a16c4fc8081da21ad8f998a141",
strip_prefix = "rules_python-1.8.2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.2/rules_python-1.8.2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "6810ff4b137b62e86ce3cedfebeeb2c988d8c5a16c4fc8081da21ad8f998a141",
strip_prefix = "rules_python-1.8.2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.2/rules_python-1.8.2.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.1...1.8.2
{#v1-8-2-fixed}
{#v1-8-1}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "7ae25c0d3b52124fffe199a34520f43e496f4027d59452df70184eced23b96ef",
strip_prefix = "rules_python-1.8.1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.1/rules_python-1.8.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "7ae25c0d3b52124fffe199a34520f43e496f4027d59452df70184eced23b96ef",
strip_prefix = "rules_python-1.8.1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.1/rules_python-1.8.1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.0...1.8.1
{#v1-8-1-fixed}
{#v1-8-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "0558021abbd244f3e2b51120a7ec4bded37c6cb02c372aaa188da9ba375560d8",
strip_prefix = "rules_python-1.8.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0/rules_python-1.8.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "0558021abbd244f3e2b51120a7ec4bded37c6cb02c372aaa188da9ba375560d8",
strip_prefix = "rules_python-1.8.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0/rules_python-1.8.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()
lock rule has no implicit test target by @martis42 in https://github.com/bazel-contrib/rules_python/pull/3411Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.7.0...1.8.0
{#v1-8-0-known-issues}
{#v1-8-0-removed}
(toolchain) Remove all of the python 3.8 toolchain support out of the box. Users need
to pass the TOOL_VERSIONS that include 3.8 toolchains or use the bzlmod APIs to add
them back. This means any hub pip.parse calls that target 3.8 will be ignored from
now on. (#2704)
{bzl:obj}python.single_version_override, like:
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.single_version_override(
python_version = "3.8.20",
sha256 = {
"aarch64-apple-darwin": "2ddfc04bdb3e240f30fb782fa1deec6323799d0e857e0b63fa299218658fd3d4",
"aarch64-unknown-linux-gnu": "9d8798f9e79e0fc0f36fcb95bfa28a1023407d51a8ea5944b4da711f1f75f1ed",
"x86_64-apple-darwin": "68d060cd373255d2ca5b8b3441363d5aa7cc45b0c11bbccf52b1717c2b5aa8bb",
"x86_64-pc-windows-msvc": "41b6709fec9c56419b7de1940d1f87fa62045aff81734480672dcb807eedc47e",
"x86_64-unknown-linux-gnu": "285e141c36f88b2e9357654c5f77d1f8fb29cc25132698fe35bb30d787f38e87",
},
urls = ["https://github.com/astral-sh/python-build-standalone/releases/download/20241002/cpython-{python_version}+20241002-{platform}-{build}.tar.gz"],
)
(toolchain) Remove all of the python 3.9 toolchain versions except for the 3.9.25.
This version has reached EOL and will no longer receive any security fixes, please update to
3.10 or above. (#2704)
(toolchain) ignore_root_user_error has now been flipped to be always enabled and
the chmod of the python toolchain directories have been removed. From now on rules_python
always adds the pyc files to the glob excludes and in order to avoid any problems when using
the toolchains in the repository phase, ensure that you pass -B to the python interpreter.
(#2016)
{#v1-8-0-changed}
pipstar has been enabled for all whl_library instances where the whl
is passed through a label or downloaded using the bazel downloader
(#2949).pipstar flag default has been flipped to be on by default.
It can be disabled through RULES_PYTHON_ENABLE_PIPSTAR=0 environment variable.
If you do need to disable it, please add a comment to
#2949.{#v1-8-0-fixed}
py_binary targets with invalid srcs. This includes files
that are not generated or regular files.
#3046sys.abiflags value of the
underlying runtime.python_headers target is now compatible with
layering_check.gazelle_python_manifest.test so that it accesses manifest files via runfile path handling rather than directly (#3397)..serve target is now compatible with Bazel's --symlink_prefix
flag (#3410).{#v1-8-0-added}
3.9.25 Python toolchain from 20251031 release.3.13.10, 3.14.1 Python toolchain from 20251202 release.3.13.11, 3.14.2, 3.15.0a2 Python toolchains from 20251209 release.pip.parse which platforms users care about. This is very useful to ensure
that when users do bazel query for their deps, they don't have to download all of the
dependencies for all of the available wheels. Torch wheels can be up of 1GB and it takes a lot
of time to download those, which is unnecessary if only the host platform builds are necessary
to be performed. This is mainly for backwards/forwards compatibility whilst rolling out
RULES_PYTHON_ENABLE_PIPSTAR=1 by default. Users of experimental_index_url that perform
cross-builds should add {obj}target_platforms to their pip.parse invocations, which will
become mandatory if any cross-builds are required from the next release.namespace_package_files added. It is a hint for
optimizing venv creation.{#v1-7-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.0-rc4")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "fd9317dfb618a822b65ed348e70d4fdc792a0a517d83e4b187a6e44114f00764",
strip_prefix = "rules_python-1.8.0-rc4",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc4/rules_python-1.8.0-rc4.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "fd9317dfb618a822b65ed348e70d4fdc792a0a517d83e4b187a6e44114f00764",
strip_prefix = "rules_python-1.8.0-rc4/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc4/rules_python-1.8.0-rc4.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.0-rc3...1.8.0-rc4
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.0-rc3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "ba4016696c347574847feac1ee808ba503d1396325ed25c93507b7cb4da4cb07",
strip_prefix = "rules_python-1.8.0-rc3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc3/rules_python-1.8.0-rc3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "ba4016696c347574847feac1ee808ba503d1396325ed25c93507b7cb4da4cb07",
strip_prefix = "rules_python-1.8.0-rc3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc3/rules_python-1.8.0-rc3.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.0-rc2...1.8.0-rc3
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.0-rc2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "c707a3cad27f95adaf860df32f410e7ca27bb2d0d5a84507027e6286a8be3656",
strip_prefix = "rules_python-1.8.0-rc2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc2/rules_python-1.8.0-rc2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "c707a3cad27f95adaf860df32f410e7ca27bb2d0d5a84507027e6286a8be3656",
strip_prefix = "rules_python-1.8.0-rc2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc2/rules_python-1.8.0-rc2.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.0-rc1...1.8.0-rc2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.0-rc1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "a8d24cb0d53d8df4ef08741d70157f19481bb577a956b7de2cd445bc393e625b",
strip_prefix = "rules_python-1.8.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc1/rules_python-1.8.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "a8d24cb0d53d8df4ef08741d70157f19481bb577a956b7de2cd445bc393e625b",
strip_prefix = "rules_python-1.8.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc1/rules_python-1.8.0-rc1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.0-rc0...1.8.0-rc1
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "7cd5bab76de50f35e2050b6171f3ea8a341d80a562f7b47ef549f6c174cee0af",
strip_prefix = "rules_python-1.8.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc0/rules_python-1.8.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "7cd5bab76de50f35e2050b6171f3ea8a341d80a562f7b47ef549f6c174cee0af",
strip_prefix = "rules_python-1.8.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc0/rules_python-1.8.0-rc0.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()
has_py3_only_sources in the PyInfo constructor by @oprypin in https://github.com/bazel-contrib/rules_python/pull/3315py_console_script_binary compatible with symbolic macros by @janwinkler1 in https://github.com/bazel-contrib/rules_python/pull/3195pip.default arguments in multi-platform example by @hartikainen in https://github.com/bazel-contrib/rules_python/pull/3358lock rule has no implicit test target by @martis42 in https://github.com/bazel-contrib/rules_python/pull/3411Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.6.0-rc0...1.8.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.7.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f609f341d6e9090b981b3f45324d05a819fd7a5a56434f849c761971ce2c47da",
strip_prefix = "rules_python-1.7.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0/rules_python-1.7.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "f609f341d6e9090b981b3f45324d05a819fd7a5a56434f849c761971ce2c47da",
strip_prefix = "rules_python-1.7.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0/rules_python-1.7.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()
has_py3_only_sources in the PyInfo constructor by @oprypin in https://github.com/bazel-contrib/rules_python/pull/3315py_console_script_binary compatible with symbolic macros by @janwinkler1 in https://github.com/bazel-contrib/rules_python/pull/3195pip.default arguments in multi-platform example by @hartikainen in https://github.com/bazel-contrib/rules_python/pull/3358Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.6.3...1.7.0
{#v1-7-0-removed}
{#v1-7-0-changed}
0.1.5.--bootstrap_impl=system_python, PYTHONPATH is no
longer used to add import paths. The sys.path order has changed from
[app paths, stdlib, runtime site-packages] to [stdlib, app paths, runtime site-packages].--bootstrap_impl=system_python, the sys.path order has
changed from [app paths, stdlib, runtime site-packages] to [stdlib, app paths, runtime site-packages].experimental_index_url.
(#2937).py_runtime and PyRuntimeInfo reject Python 2 settings.
Setting py_runtime.python_version = "PY2" or non-None
PyRuntimeInfo.py2_runtime is an error.pipstar flag has been implemented for WORKSPACE and can be flipped to be enabled using RULES_PYTHON_ENABLE_PIPSTAR=1 environment variable. If you do, please
add a comment to
#2949 if you run into any
problems.
With this release we are deprecating {obj}pip.parse.experimental_target_platforms and
pip_repository.experimental_target_platforms. For users using WORKSPACE and
vendoring the requirements.bzl file, please re-vendor so that downstream is unaffected
when the APIs get removed. If you need to customize the way the dependencies get
evaluated, see our docs on customizing Requires-Dist resolution.bazel-skylib version
1.8.2{#v1-7-0-fixed}
PyInfo constructor was setting the wrong value for
has_py3_only_sources - this is now fixed.RUNFILES_DIR
environments, fixing issues where a py_binary calls another py_binary
(#3187).--bootstrap_impl=script now supports the -S interpreter
setting.--venvs_site_packages=yes no longer errors when packages with
overlapping files or directories are used together.
(#3204).--venvs_site_packages=yes works for packages that dynamically
link to shared libraries
(#3228).--venvs_site_packages=yes includes pth files at the root of the
site-packages folder
(#3339).//python/uv:lock.bzl%lock now works with a local platform
runtime.linux_riscv64 is added to the platforms list in _pip_repository_impl,
which fixes a build issue for tensorflow on riscv64.--py_linux_libc=musl and --py_freethreaded=yes now
activate them, respectively.
(#3262).py_console_script_binary is now compatible with symbolic macros
(#3195).{#v1-7-0-added}
--incompatible_compact_repo_mapping_manifest flag.--bootstrap_impl=system_python now supports the
{obj}main_module attribute.--bootstrap_impl=system_python now supports the
{any}RULES_PYTHON_ADDITIONAL_INTERPRETER_ARGS environment variable.py_binary, py_test, and py_wheel rules now have a
{obj}config_settings attribute to control build flags within the build graph.
Custom settings can be added using {obj}config.add_transition_setting in
MODULE.bazel files, or {obj}py_repositories(transition_settings=...) in
WORKSPACE files. See the
{ref}common-deps-with-multiple-pypi-versions guide on using common
dependencies with multiple PyPI versions` for an example.//python/cc:current_py_cc_headers_abi3. This allows Windows builds
a way to depend on headers without the potentially Python unstable ABI
objects from the regular {obj}//python/cc:current_py_cc_headers target
being included.
//python/cc:current_py_cc_headers_abi3,
{obj}py_cc_toolchain.headers_abi3, and {obj}PyCcToolchainInfo.headers_abi3.//python:features.bzl%features.headers_abi3 can be used to
feature-detect the presense of the above.experimental_index_url handling for
Windows ARM64 for Python 3.11 and later
(#2276).{#v1-6-3}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.7.0-rc6")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "df04602e341fe0414d3774b5297c34cbcd8d9e0a525d28a87c25adae4588c11d",
strip_prefix = "rules_python-1.7.0-rc6",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc6/rules_python-1.7.0-rc6.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "df04602e341fe0414d3774b5297c34cbcd8d9e0a525d28a87c25adae4588c11d",
strip_prefix = "rules_python-1.7.0-rc6/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc6/rules_python-1.7.0-rc6.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.7.0-rc5...1.7.0-rc6
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.7.0-rc5")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "6b9185460d11d57a32139b103363fce39d81889206561ef582678273b74372ac",
strip_prefix = "rules_python-1.7.0-rc5",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc5/rules_python-1.7.0-rc5.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "6b9185460d11d57a32139b103363fce39d81889206561ef582678273b74372ac",
strip_prefix = "rules_python-1.7.0-rc5/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc5/rules_python-1.7.0-rc5.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.7.0-rc4...1.7.0-rc5
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.7.0-rc4")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "e7d0a548ce2302b3186f4b0d2d7c7d39d68dd62955468e9b160746af1aa234d1",
strip_prefix = "rules_python-1.7.0-rc4",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc4/rules_python-1.7.0-rc4.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "e7d0a548ce2302b3186f4b0d2d7c7d39d68dd62955468e9b160746af1aa234d1",
strip_prefix = "rules_python-1.7.0-rc4/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc4/rules_python-1.7.0-rc4.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.7.0-rc2...1.7.0-rc4
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.7.0-rc3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "feb1d874c45fe21e15aecabb5c9925d77b3667f978ed1695b304b29afb1f3663",
strip_prefix = "rules_python-1.7.0-rc3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc3/rules_python-1.7.0-rc3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "feb1d874c45fe21e15aecabb5c9925d77b3667f978ed1695b304b29afb1f3663",
strip_prefix = "rules_python-1.7.0-rc3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc3/rules_python-1.7.0-rc3.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.7.0-rc1...1.7.0-rc3
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.7.0-rc2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "8a4910fc15f813846dce138099d6cb37ec327a49abded2b07da93eaae142c31c",
strip_prefix = "rules_python-1.7.0-rc2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc2/rules_python-1.7.0-rc2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "8a4910fc15f813846dce138099d6cb37ec327a49abded2b07da93eaae142c31c",
strip_prefix = "rules_python-1.7.0-rc2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc2/rules_python-1.7.0-rc2.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.7.0-rc1...1.7.0-rc2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.7.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "a3024b21888b8299da01e2567516e084629ae7e0c17e78b966a1c77397e87f97",
strip_prefix = "rules_python-1.7.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc0/rules_python-1.7.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "a3024b21888b8299da01e2567516e084629ae7e0c17e78b966a1c77397e87f97",
strip_prefix = "rules_python-1.7.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc0/rules_python-1.7.0-rc0.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()
has_py3_only_sources in the PyInfo constructor by @oprypin in https://github.com/bazel-contrib/rules_python/pull/3315py_console_script_binary compatible with symbolic macros by @janwinkler1 in https://github.com/bazel-contrib/rules_python/pull/3195Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.6.0-rc0...1.7.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.6.3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "2f5c284fbb4e86045c2632d3573fc006facbca5d1fa02976e89dc0cd5488b590",
strip_prefix = "rules_python-1.6.3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.3/rules_python-1.6.3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "2f5c284fbb4e86045c2632d3573fc006facbca5d1fa02976e89dc0cd5488b590",
strip_prefix = "rules_python-1.6.3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.3/rules_python-1.6.3.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.6.2...1.6.3
{#v1-6-3-fixed}
musllinux_1_1_x86_64 and musllinux_1_2_x86_64). If the user
wants to set the minimum version for the selection algorithm, use the
{obj}pip.default.whl_platform_tags attribute to configure that. If
musllinux_*_x86_64 is specified, we will choose the lowest available
wheel version. Fixes #3250.{#v1-6-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.6.1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f2e80f97f9c0b82e2489e61e725df1e6bdaf16c4dacf5e26b95668787164baff",
strip_prefix = "rules_python-1.6.1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.1/rules_python-1.6.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "f2e80f97f9c0b82e2489e61e725df1e6bdaf16c4dacf5e26b95668787164baff",
strip_prefix = "rules_python-1.6.1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.1/rules_python-1.6.1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.6.0...1.6.1
fix: Updating Python toolchains to patch CVE-2025-47273 by @aaronmaxlevy in https://github.com/bazel-contrib/rules_python/pull/3053
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.6.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "fa7dd2c6b7d63b3585028dd8a90a6cf9db83c33b250959c2ee7b583a6c130e12",
strip_prefix = "rules_python-1.6.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.0/rules_python-1.6.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "fa7dd2c6b7d63b3585028dd8a90a6cf9db83c33b250959c2ee7b583a6c130e12",
strip_prefix = "rules_python-1.6.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.0/rules_python-1.6.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()
python.ParserOutput are now all public by @yushan26 in https://github.com/bazel-contrib/rules_python/pull/2959include_pytest_conftest annotation by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3080python_proto_naming_convention directive controls py_proto_library naming by @shaldengeki in https://github.com/bazel-contrib/rules_python/pull/3093Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.0...1.6.0
{#v1-6-0-changed}
# gazelle:python_experimental_allow_relative_imports true directive ({gh-issue}2203).python.ParserOutput are now all public.__init__.py, __main__.py, or __test__.py files to be
present in a directory to generate a BUILD.bazel file.linux_x86_64, linux_aarch64,
osx_x86_64, osx_aarch64 and windows_x86_64. If you are on other platforms, you need to
use the pip.default to configure it yourself. If you are interested in graduating the
platform, consider helping set us up CI for them and update the documentation.#!/usr/bin/env bash is now used as a shebang in the stage1 bootstrap template.gazelle/README.md to
{gh-path}gazelle/docs and are now available on the primary documentation site
at https://rules-python.readthedocs.io/en/latest/gazelle/docs/index.html{#v1-6-0-fixed}
local_runtime_repo now respects changes to the DEVELOPER_DIR and XCODE_VERSION
repo env vars, fixing stale cache issues on macOS with system (i.e. Xcode-supplied) Python
(#3123).bazel vendor vendor directory
would fail if the constraints file contained environment markers. Fixes
#2996.py.typed to indicate it
supports type checking
(#2503).defaults configuration now supports any custom platform
name.2759) and should be much more efficient
when running bazel query due to fewer repositories being included
({gh-issue}2849).local_runtime_repo works with multiarch Debian with Python 3.8
(#3099).all_requirements
(#2921).REPL stub to make it possible to use the
default stub template from outside rules_python ({gh-issue}3101).absolute_import). Previous
behavior can be restored using the directive
# gazelle:python_resolve_sibling_imports true$PATH
(#3150).bazel vendor now works in bzlmod ({gh-issue}3079).local_runtime_repo now works on Windows
(#3055).local_runtime_repo supports more types of Python
installations (Mac frameworks, missing dynamic libraries, and other
esoteric cases, see
#3148 for details).requirements.txt files that use different versions of the same
package targeting different target platforms.
(#2797).{#v1-6-0-added}
readline support is available,
see (#3114).
(#3114).requirements.txt evaluation, use the newly added
developer preview of the pip.default tag class. Only rules_python and root modules can use
this feature. You can also configure custom config_settings using pip.default. It
can also be used to set the global netrc or auth_patterns variables.:extracted_whl_files filegroup target
of all the files extracted from the wheel. This can be used in lieu of
{obj}whl_filegroup to avoid copying/extracting wheel multiple times to
get a subset of their files.gazelle:python_generate_pyi_deps; when true,
dependencies added to satisfy type-only imports (if TYPE_CHECKING) and type
stub packages are added to pyi_deps instead of deps.gazelle:include_pytest_conftest. When not set (the
default) or true, gazelle will inject any conftest.py file found in the same
directory as a {obj}py_test target to that {obj}py_test target's deps.
This behavior is unchanged from previous versions. When false, the :conftest
dep is not added to the {obj}py_test target.gazelle:python_generate_proto; when true,
Gazelle generates py_proto_library rules for proto_library. false by default.
gazelle:python_proto_naming_convention; controls
naming of py_proto_library rules.{#v1-6-0-removed}
{#v1-5-4}
fix: Updating Python toolchains to patch CVE-2025-47273 by @aaronmaxlevy in https://github.com/bazel-contrib/rules_python/pull/3053
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.6.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "3664a03376fc2441e2dec357000b3a80119e2ea062ea1be41418daeb91451055",
strip_prefix = "rules_python-1.6.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.0-rc0/rules_python-1.6.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "3664a03376fc2441e2dec357000b3a80119e2ea062ea1be41418daeb91451055",
strip_prefix = "rules_python-1.6.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.0-rc0/rules_python-1.6.0-rc0.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()
python.ParserOutput are now all public by @yushan26 in https://github.com/bazel-contrib/rules_python/pull/2959include_pytest_conftest annotation by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3080python_proto_naming_convention directive controls py_proto_library naming by @shaldengeki in https://github.com/bazel-contrib/rules_python/pull/3093Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.0-rc0...1.6.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.4")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "13671d304cfe43350302213a60d93a5fc0b763b0a6de17397e3e239253b61b73",
strip_prefix = "rules_python-1.5.4",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.4/rules_python-1.5.4.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "13671d304cfe43350302213a60d93a5fc0b763b0a6de17397e3e239253b61b73",
strip_prefix = "rules_python-1.5.4/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.4/rules_python-1.5.4.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.3...1.5.4
{#v1-5-4-fixed}
local_runtime_repo now checks if the include directory exists
before attempting to watch it, fixing issues on macOS with system Python
(#3043).{#v1-5-3}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "0a1cefefb4a7b550fb0b43f54df67d6da95b7ba352637669e46c987f69986f6a",
strip_prefix = "rules_python-1.5.3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.3/rules_python-1.5.3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "0a1cefefb4a7b550fb0b43f54df67d6da95b7ba352637669e46c987f69986f6a",
strip_prefix = "rules_python-1.5.3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.3/rules_python-1.5.3.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.2...1.5.3
local_runtime_repo now checks if the include directory exists
before attempting to watch it, fixing issues on macOS with system Python
(#3043).{#v1-5-2}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "0e68f851a6fcf317eeab5f6dc79803cb183d30c0c65fb52e2c4b731d13b73349",
strip_prefix = "rules_python-1.5.2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.2/rules_python-1.5.2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "0e68f851a6fcf317eeab5f6dc79803cb183d30c0c65fb52e2c4b731d13b73349",
strip_prefix = "rules_python-1.5.2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.2/rules_python-1.5.2.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.1...1.5.2
{#v1-5-2-changed}
bazel-skylib version
1.8.1
to remove deprecation warnings.{#v1-5-2-fixed}
sdist distributions using pip
(#3131).7.x WORKSPACE configurations
(#3119).{#v1-5-1}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "fa532d635f29c038a64c8062724af700c30cf6b31174dd4fac120bc561a1a560",
strip_prefix = "rules_python-1.5.1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.1/rules_python-1.5.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "fa532d635f29c038a64c8062724af700c30cf6b31174dd4fac120bc561a1a560",
strip_prefix = "rules_python-1.5.1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.1/rules_python-1.5.1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.0...1.5.1
{#v1-5-1-fixed}
{#v1-5-0}
fix: Updating setuptools to patch CVE-2025-47273 by @aaronmaxlevy in https://github.com/bazel-contrib/rules_python/pull/2955
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "7b9039c31e909cf59eeaea8ccbdc54f09f7ebaeb9609b94371c7de45e802977c",
strip_prefix = "rules_python-1.5.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0/rules_python-1.5.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "7b9039c31e909cf59eeaea8ccbdc54f09f7ebaeb9609b94371c7de45e802977c",
strip_prefix = "rules_python-1.5.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0/rules_python-1.5.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()
pip_compile generate a *.test target; deprecate *_test by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/2812Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.4.0...1.5.0
{#v1-5-0-changed}
--bootstrap_impl=system_python is forced. This
allows setting --bootstrap_impl=script in bazelrc for mixed-platform
environments.compile_pip_requirements now generates a .test target. The
_test target is deprecated and will be removed in the next major release.
(#2794PyInfo.venv_symlinks replaces
PyInfo.site_packages_symlinkspip_parse.{#v1-5-0-fixed}
--bootstrap_impl=script:
compile_pip_requirements now works with itsys._base_executable value will reflect the underlying interpreter,
not venv interpreter.//python/runtime_env_toolchains:all toolchain now works with it.--hash parameter. Fixes
#2363.whl_library now infers file names from its urls attribute correctly.bazel test, be sure that temporary requirements file
remains writable.compile_pip_requirements test rule works behind the proxyreleaselevel and serial for pre-release hermetic toolchains ({gh-issue}2837).{#v1-5-0-added}
execute_unchecked, execute_checked, and execute_checked_stdout now
support log_stdout and log_stderr keyword arg booleans. When these are True
(the default), the subprocess's stdout/stderr will be logged.RULES_PYTHON_ENABLE_PIPSTAR=1 environment variable to enable it.rules_python target that returns
a PyInfo provider..netrc and auth_patterns auth when downloading uv. Work towards
#1975.single_version_platform_override() API docs for more
information.compile_pip_requirements.
Useful when an intermediate dependency needs to be upgraded to pull in
security patches.{#v1-5-0-removed}
{#v1-4-2}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.0-rc4")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "8b98bfab75cd469bd5f9b63dc48a2f652b0348880006e5cb8299f4ee04292a95",
strip_prefix = "rules_python-1.5.0-rc4",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc4/rules_python-1.5.0-rc4.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "8b98bfab75cd469bd5f9b63dc48a2f652b0348880006e5cb8299f4ee04292a95",
strip_prefix = "rules_python-1.5.0-rc4/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc4/rules_python-1.5.0-rc4.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.0-rc3...1.5.0-rc4
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.0-rc3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "9f04b942a09ef0a89066547fa06a94122e3f5e02fa640be2b44f985710b7fbdd",
strip_prefix = "rules_python-1.5.0-rc3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc3/rules_python-1.5.0-rc3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "9f04b942a09ef0a89066547fa06a94122e3f5e02fa640be2b44f985710b7fbdd",
strip_prefix = "rules_python-1.5.0-rc3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc3/rules_python-1.5.0-rc3.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.0-rc2...1.5.0-rc3
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.0-rc2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "4de9058c51b2b0f2494a38bd8630d8fb7f6d43278d10e95aa784b1f161f67e2b",
strip_prefix = "rules_python-1.5.0-rc2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc2/rules_python-1.5.0-rc2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "4de9058c51b2b0f2494a38bd8630d8fb7f6d43278d10e95aa784b1f161f67e2b",
strip_prefix = "rules_python-1.5.0-rc2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc2/rules_python-1.5.0-rc2.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.0-rc1...1.5.0-rc2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.0-rc1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "09f146ef40a831cc28865c2b0345698b8b9e3d75ca8c10ec21a4b26766169947",
strip_prefix = "rules_python-1.5.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc1/rules_python-1.5.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "09f146ef40a831cc28865c2b0345698b8b9e3d75ca8c10ec21a4b26766169947",
strip_prefix = "rules_python-1.5.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc1/rules_python-1.5.0-rc1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.5.0-rc0...1.5.0-rc1
fix: Updating setuptools to patch CVE-2025-47273 by @aaronmaxlevy in https://github.com/bazel-contrib/rules_python/pull/2955
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.5.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "5daabe07910d11b6d245134403a484d6d69813e7a237b85f6cac982c9e42a8ea",
strip_prefix = "rules_python-1.5.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc0/rules_python-1.5.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "5daabe07910d11b6d245134403a484d6d69813e7a237b85f6cac982c9e42a8ea",
strip_prefix = "rules_python-1.5.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0-rc0/rules_python-1.5.0-rc0.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()
--no_legacy_external_runfiles by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2772METADATA correctly if given empty requires_file by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2771pip_compile generate a *.test target; deprecate *_test by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/2812Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.3.0...1.5.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.4.2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "daf1c27517e8526c212195345b4f6f02dd8cad69aa099d3bdb11868458211829",
strip_prefix = "rules_python-1.4.2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.2/rules_python-1.4.2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "daf1c27517e8526c212195345b4f6f02dd8cad69aa099d3bdb11868458211829",
strip_prefix = "rules_python-1.4.2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.2/rules_python-1.4.2.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.4.1...1.4.2
local_runtime_repo now checks if the include directory exists
before attempting to watch it, fixing issues on macOS with system Python
(#3043).{#v1-4-1}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.4.1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "9f9f3b300a9264e4c77999312ce663be5dee9a56e361a1f6fe7ec60e1beef9a3",
strip_prefix = "rules_python-1.4.1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.1/rules_python-1.4.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "9f9f3b300a9264e4c77999312ce663be5dee9a56e361a1f6fe7ec60e1beef9a3",
strip_prefix = "rules_python-1.4.1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.1/rules_python-1.4.1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.4.0...1.4.1
{#v1-4-1-fixed}
{#v1-4-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.4.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "a837679f1382f26968c1ee6f839c7daf9079aa53128069a1f2815decaa637304",
strip_prefix = "rules_python-1.4.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0/rules_python-1.4.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "a837679f1382f26968c1ee6f839c7daf9079aa53128069a1f2815decaa637304",
strip_prefix = "rules_python-1.4.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0/rules_python-1.4.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()
--no_legacy_external_runfiles by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2772METADATA correctly if given empty requires_file by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2771Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.3.0...1.4.0
{#v1-4-0-changed}
exec configuration toolchain now has the forwarded
exec_interpreter now also forwards the ToolchainInfo provider. This is
for increased compatibility with the RBE setups where access to the exec
configuration interpreter is needed.xcrun xcodebuild --showsdks to find XCode root.3.8.20 versions of the Python 3.8 interpreter who has
reached EOL. If users still need other versions of the 3.8 interpreter, please supply
the URLs manually {bzl:obj}python.toolchain or {bzl:obj}python_register_toolchains calls.ignore_root_user_error from "ignore" to "warning". This is now
flipped back to ignoring the issue, and will only emit a warning when the attribute is set
False.py_binary.srcs and {attr}py_test.srcs is no longer mandatory when
main_module is specified (for --bootstrap_impl=script){#v1-4-0-fixed}
--bootstrap_impl=script) Follow symlinks when searching for runfiles.chmod when downloading non-windows hermetic toolchain
repositories on Windows. Fixes
#2660.FAIL via the RULES_PYTHON_REPO_DEBUG_VERBOSITY environment variable.python_version flag.
Fixes #2685.PYTHONPATH..pyc and .pyo files are also excluded from the interpreters repository files.PYTHONPATH.requires_file is treated as if it were omitted, resulting in a valid METADATA file.target_compatible_with to all targets they create.
PR #2788.METADATA entries when python_full_version is used in
the environment marker.
Fixes #2319.python_version parameter and transition the requirement
locking to the right interpreter version when using
{obj}compile_pip_requirements rule.
See #2819.{#v1-4-0-added}
sha256 values in the requirements.txt is no longer
mandatory when enabling {attr}pip.parse.experimental_index_url feature.
This means that rules_python will attempt to fetch metadata for all
packages through SimpleAPI unless they are pulled through direct URL
references. Fixes #2023.
In case you see issues with rules_python being too eager to fetch the SimpleAPI
metadata, you can use the newly added {attr}pip.parse.simpleapi_skip
to skip metadata fetching for those packages.lock rule that is the replacement for the
{obj}compile_pip_requirements. This may still have rough corners
so please report issues with it in the
#1975.
Main highlights - the locking can be done within a build action or outside
it, there is no more automatic test target (but it can be added on the user
side by using native_test). For customizing the uv version that is used,
please check the {obj}uv.configure tag class.PyInfo.site_packages_symlinks field added to
allow specifying links to create within the venv site packages (only
applicable with {obj}--bootstrap_impl=script)
(#2156).$(PYTHON2_ROOTPATH) and $(PYTHON3_ROOTPATH) which are runfiles
locations equivalents of $(PYTHON2) and `$(PYTHON3) respectively.{#v1-4-0-removed}
{#v1-3-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.4.0-rc4")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "c21b61d42c5f208cff59647d6a4ad23104c97612e67c117fe58f8c154b5b3821",
strip_prefix = "rules_python-1.4.0-rc4",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc4/rules_python-1.4.0-rc4.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "c21b61d42c5f208cff59647d6a4ad23104c97612e67c117fe58f8c154b5b3821",
strip_prefix = "rules_python-1.4.0-rc4/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc4/rules_python-1.4.0-rc4.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.4.0-rc3...1.4.0-rc4
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.4.0-rc3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "89510b9b8bb2689bc62bd08feb5f9220c1dbbd19e05a46de74518240f3da17f3",
strip_prefix = "rules_python-1.4.0-rc3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc3/rules_python-1.4.0-rc3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "89510b9b8bb2689bc62bd08feb5f9220c1dbbd19e05a46de74518240f3da17f3",
strip_prefix = "rules_python-1.4.0-rc3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc3/rules_python-1.4.0-rc3.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.4.0-rc2...1.4.0-rc3
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.4.0-rc2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "cfce686b22ea5d180a38ec76450229dc0872376685b896c9ccf54e1feda4c58b",
strip_prefix = "rules_python-1.4.0-rc2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc2/rules_python-1.4.0-rc2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "cfce686b22ea5d180a38ec76450229dc0872376685b896c9ccf54e1feda4c58b",
strip_prefix = "rules_python-1.4.0-rc2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc2/rules_python-1.4.0-rc2.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.4.0-rc1...1.4.0-rc2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.4.0-rc1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "379a1a0f66b3af3946f8a99f7578759564f80004ebbda8960685d3619b71fb28",
strip_prefix = "rules_python-1.4.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc1/rules_python-1.4.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "379a1a0f66b3af3946f8a99f7578759564f80004ebbda8960685d3619b71fb28",
strip_prefix = "rules_python-1.4.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc1/rules_python-1.4.0-rc1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.4.0-rc0...1.4.0-rc1
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.4.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "43071c4392c0e0c1bc95296b7e94e55328c760de9f805619861d7387fbc69257",
strip_prefix = "rules_python-1.4.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc0/rules_python-1.4.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "43071c4392c0e0c1bc95296b7e94e55328c760de9f805619861d7387fbc69257",
strip_prefix = "rules_python-1.4.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.0-rc0/rules_python-1.4.0-rc0.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()
--no_legacy_external_runfiles by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2772METADATA correctly if given empty requires_file by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2771Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.3.0...1.4.0-rc0
chore: remove internal usage of deprecated py_binary ad py_test by @aignas in https://github.com/bazel-contrib/rules_python/pull/2569
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.3.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "2cc26bbd53854ceb76dd42a834b1002cd4ba7f8df35440cf03482e045affc244",
strip_prefix = "rules_python-1.3.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.3.0/rules_python-1.3.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "2cc26bbd53854ceb76dd42a834b1002cd4ba7f8df35440cf03482e045affc244",
strip_prefix = "rules_python-1.3.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.3.0/rules_python-1.3.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()
sh_py_run_test by @philsc in https://github.com/bazel-contrib/rules_python/pull/2583Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.1.0...1.3.0
{#v1-3-0-changed}
py_library.pyi_srcs (.pyi files) in the wheel.py_library.pyi_srcs (.pyi files) in py_package.gazelle_python.yaml) will now include the
YAML document start --- line. Implemented in
#2656.{#v1-3-0-fixed}
ppc64le is now pointing to the right target in the platforms package.py_binary targets during partial updates in
file generation mode. Fixed in #2619.ignore_root_user_error=True
is now the default. Note that running as root may still cause spurious
Bazel cache invalidation
(#1169).python invocations in repository and module extension
evaluation contexts will invoke Python interpreter with -B to avoid
creating .pyc files.{#v1-3-0-added}
python.defaults has been added to allow users to
set the default python version in the root module by reading the
default version number from a file or an environment variable.//python/bin:python: convenience target for directly running an
interpreter. {obj}--//python/bin:python_src can be used to specify a
binary whose interpreter to use.bzlmod APIs without the
need to patch rules_python. The documentation has been added to rules_python
docs but usage of the extension may result in your setup breaking without any
notice. What is more, the URLs and SHA256 values will be retrieved from the
GitHub releases page metadata published by the uv project.LDFLAGS when
building wheels from sdist.experimental_index_url (bazel downloader).
Partially fixes #2363.RULES_PYTHON_ADDITIONAL_INTERPRETER_ARGS environment variable.
Only applicable for {obj}--bootstrap_impl=script.interpreter_args attribute to py_binary and py_test,
which allows pass arguments to the interpreter before the regular args.main_module attribute to py_binary and py_test,
which allows specifying a module name to run (i.e. python -m <module>).{#v1-3-0-removed}
{#v1-2-0}
refactor: stop using some deprecated Starlark APIs by @EdSchouten in https://github.com/bazel-contrib/rules_python/pull/2626
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.3.0-rc1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "069b14defc462c1382d4d8f00c25eb59dc468e38d6c932471312d466fdf7700b",
strip_prefix = "rules_python-1.3.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.3.0-rc1/rules_python-1.3.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "069b14defc462c1382d4d8f00c25eb59dc468e38d6c932471312d466fdf7700b",
strip_prefix = "rules_python-1.3.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.3.0-rc1/rules_python-1.3.0-rc1.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()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.2.0-rc0...1.3.0-rc1
Nothing published for this version
chore: remove internal usage of deprecated py_binary ad py_test by @aignas in https://github.com/bazelbuild/rules_python/pull/2569
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.2.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "2ef40fdcd797e07f0b6abda446d1d84e2d9570d234fddf8fcd2aa262da852d1c",
strip_prefix = "rules_python-1.2.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.2.0/rules_python-1.2.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "2ef40fdcd797e07f0b6abda446d1d84e2d9570d234fddf8fcd2aa262da852d1c",
strip_prefix = "rules_python-1.2.0/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.2.0/rules_python-1.2.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()
sh_py_run_test by @philsc in https://github.com/bazelbuild/rules_python/pull/2583Full Changelog: https://github.com/bazelbuild/rules_python/compare/1.1.0...1.2.0
{#v1-2-0-changed}
py_proto_library is deprecated in favour of the
implementation in https://github.com/protocolbuffers/protobuf. It will be
removed in the future release.pip.override will now be ignored instead of raising an error,
fixes #2550.RULES_PYTHON_DEPRECATION_WARNINGS
env var.pip from 24.3.2 to 24.0.0 and
packaging from 24.2 to 24.0.{#v1-2-0-fixed}
python_zip_file output with --bootstrap_impl=script works again
(#2596).python_version attribute for specifying python versions introduced in v1.1.0gazelle_python_manifest now works correctly.--bootstrap_impl=script is fixed
(#2572).tag_class does not have a populated doc value.
Fixes (#2579).--bootstrap_impl=script: set
{obj}--venvs_use_declare_symlink=no to have it not create symlinks at
build time (they will be created at runtime instead).
(Fixes #2489){#v1-2-0-added}
{#v1-2-0-removed}
{#v1-1-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.2.0-rc1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "5d346cc5730b8fd08d4c044715550f1b41584844cbbca297390bb3abf4b7dea5",
strip_prefix = "rules_python-1.2.0-rc1",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.2.0-rc1/rules_python-1.2.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "5d346cc5730b8fd08d4c044715550f1b41584844cbbca297390bb3abf4b7dea5",
strip_prefix = "rules_python-1.2.0-rc1/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.2.0-rc1/rules_python-1.2.0-rc1.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()
Full Changelog: https://github.com/bazelbuild/rules_python/compare/1.2.0-rc0...1.2.0-rc1
chore: remove internal usage of deprecated py_binary ad py_test by @aignas in https://github.com/bazelbuild/rules_python/pull/2569
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.2.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "4d0f8a02a670e03696860d2b08d790eeeb13473cfa582bb579e252dd9e079ae2",
strip_prefix = "rules_python-1.2.0-rc0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.2.0-rc0/rules_python-1.2.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "4d0f8a02a670e03696860d2b08d790eeeb13473cfa582bb579e252dd9e079ae2",
strip_prefix = "rules_python-1.2.0-rc0/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.2.0-rc0/rules_python-1.2.0-rc0.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()
sh_py_run_test by @philsc in https://github.com/bazelbuild/rules_python/pull/2583Full Changelog: https://github.com/bazelbuild/rules_python/compare/1.1.0...1.2.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.1.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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "9c6e26911a79fbf510a8f06d8eedb40f412023cf7fa6d1461def27116bff022c",
strip_prefix = "rules_python-1.1.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.1.0/rules_python-1.1.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "9c6e26911a79fbf510a8f06d8eedb40f412023cf7fa6d1461def27116bff022c",
strip_prefix = "rules_python-1.1.0/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.1.0/rules_python-1.1.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()
pip.parse code by @aignas in https://github.com/bazelbuild/rules_python/pull/2534setup.py files when running Gazelle by @dougthor42 in https://github.com/bazelbuild/rules_python/pull/2536Full Changelog: https://github.com/bazelbuild/rules_python/compare/1.0.0...1.1.0
{#v1-1-0-changed}
pip.parse) From now we will make fewer calls to indexes when
fetching the metadata from SimpleAPI. The calls will be done in parallel to
each index separately, so the extension evaluation time might slow down if
not using {bzl:obj}pip.parse.experimental_index_url_overrides.pip.parse) Only query SimpleAPI for packages that have
sha values in the requirements.txt file.python_version attribute is still used to specify the Python version.pip to 24.3.1 and
packaging to 24.2.{#v1-1-0-deprecations}
//python/config_settings:transitions.bzl and its py_binary and py_test
wrappers are deprecated. Use the regular rules instead.{#v1-1-0-fixed}
whl_library will now not have env
marker information allowing bazel query to work in cases where the whl is
available for all of the platforms and the sdist can be built. This fix is
for both WORKSPACE and bzlmod setups.
Fixes #2450.pip_parse.experimental_requirement_cycles and
{bzl:obj}pip_parse.use_hub_alias_dependencies together now works when
using WORKSPACE files.whl_library during the repository rule phase
change. Fixes #2468.setup.py files by default. To restore
this behavior, apply the # gazelle:python_ignore_files setup.py directive.PATH changes. Fixes
#2551.{#v1-1-0-added}
include_stub_packages flag to modules_mapping. When set to True, this
automatically includes corresponding stub packages for third-party libraries
that are present and used (e.g., boto3 → boto3-stubs), improving
type-checking support.experimental_index_url usage or the regular pip.parse usage.
To select the free-threaded interpreter in the repo phase, please use
the documented env variables.
Fixes #2386..pyi files) and type-checking
only dependencies added. See {obj}py_library.pyi_srcs and
py_library.pyi_deps (and the same named attributes for py_binary and
py_test).pyi_srcs to include *.pyi files.PyInfo has new fields to aid static analysis tools:
{obj}direct_original_sources, {obj}direct_pyi_files,
{obj}transitive_original_sources, {obj}transitive_pyi_files.{#v1-1-0-removed}
find_requirements in //python:defs.bzl has been removed.{#v1-0-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.1.0-rc1")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "7cd31b2ae3ad922c63a863916f4f45a2ea7cf7c8abd3ee20bd5019deade8bcbb",
strip_prefix = "rules_python-1.1.0-rc1",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.1.0-rc1/rules_python-1.1.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "7cd31b2ae3ad922c63a863916f4f45a2ea7cf7c8abd3ee20bd5019deade8bcbb",
strip_prefix = "rules_python-1.1.0-rc1/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.1.0-rc1/rules_python-1.1.0-rc1.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()
Full Changelog: https://github.com/bazelbuild/rules_python/compare/1.1.0-rc0...1.1.0-rc1
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.1.0-rc0")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "0a158f883fc494724f25e2ce6a5c3d31fd52163a92d4b7180aef0ff9a0622f70",
strip_prefix = "rules_python-1.1.0-rc0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.1.0-rc0/rules_python-1.1.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "0a158f883fc494724f25e2ce6a5c3d31fd52163a92d4b7180aef0ff9a0622f70",
strip_prefix = "rules_python-1.1.0-rc0/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.1.0-rc0/rules_python-1.1.0-rc0.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()
pip.parse code by @aignas in https://github.com/bazelbuild/rules_python/pull/2534setup.py files when running Gazelle by @dougthor42 in https://github.com/bazelbuild/rules_python/pull/2536Full Changelog: https://github.com/bazelbuild/rules_python/compare/1.0.0...1.1.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.0.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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "4f7e2aa1eb9aa722d96498f5ef514f426c1f55161c3c9ae628c857a7128ceb07",
strip_prefix = "rules_python-1.0.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0/rules_python-1.0.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "4f7e2aa1eb9aa722d96498f5ef514f426c1f55161c3c9ae628c857a7128ceb07",
strip_prefix = "rules_python-1.0.0/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0/rules_python-1.0.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()
zstd archives by @aignas in https://github.com/bazelbuild/rules_python/pull/2412--bootstrap_impl=script by @chowder in https://github.com/bazelbuild/rules_python/pull/2439libs/python3.lib to libpython target for SABI builds on Windows by @nicholasjng in https://github.com/bazelbuild/rules_python/pull/1820Full Changelog: https://github.com/bazelbuild/rules_python/compare/0.40.0...1.0.0
{#v1-0-0-changed}
Breaking:
//python/config_setting/... and the @platforms package instead.MACOS_NAME and the arch
attribute in the PLATFORMS list, please update your code to respect the new
values. The values now correspond to the values available in the
@platforms// package constraint values.host_platform and interpreter constants are no longer created
in the toolchain generated alias .bzl files. If you need to access the
host interpreter during the repository_rule evaluation, please use the
@python_{version}_host//:python targets created by
{bzl:obj}python_register_toolchains and
{bzl:obj}python_register_multi_toolchains macros or the {bzl:obj}python
bzlmod extension.pip.parse.parse_all_requirements_files attribute has been removed.
See notes in the previous versions about what to do.Other changes:
strip_prefix field for zstd archives.pip_parse.extra_hub_aliases now works in WORKSPACE files.--bootstrap_impl=script, a binary-specific (but
otherwise empty) virtual env is used to customize sys.path initialization.{#v1-0-0-fixed}
uname to get the value of the host platform.uv binary for aarch64-apple-darwin.
Fixes (2411).--bootstrap_impl=scipt) Using sys.executable will
use the same sys.path setup as the calling binary.
(2169).compile_pip_requirements no longer fails on Windows when --enable_runfiles is not enabled.compile_pip_requirements now correctly updates files in the source tree on Windows when --windows_enable_symlinks is not enabled.libpython target
defined by a repository template. This enables stable ABI builds of Python extensions
on Windows (by defining Py_LIMITED_API).py_test and py_binary targets no longer incorrectly remove the
first sys.path entry when using {obj}--bootstrap_impl=script{#v1-0-0-added}
RULES_PYTHON_GAZELLE_VERBOSE=1.RULES_PYTHON_REPO_TOOLCHAIN_{VERSION}_{OS}_{ARCH} env variable setting. For
example, this allows one to use freethreaded python interpreter in the
repository_rule to build a wheel from sdist.muslc libc have been added
for the latest toolchain versions for each minor Python version. You can control
the toolchain selection by using the
{bzl:obj}//python/config_settings:py_linux_libc build flag.PyRuntimeInfo.site_init_template and
{obj}PyRuntimeInfo.site_init_template for specifying the template to use to
initialize the interpreter via venv startup hooks.{#v1-0-0-removed}
pypi_install_dependencies macro that has been included in
{bzl:obj}py_repositories for a long time.DEFAULT_PYTHON_VERSION from interpreters.bzl file. If
you need the version, please use it from the versions.bzl file instead.{#v0-40-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.0.0-rc2")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "95496eb8b14a134b985844cbabe3d67a0caaff02ff07fe6d3aafe232e970bfae",
strip_prefix = "rules_python-1.0.0-rc2",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0-rc2/rules_python-1.0.0-rc2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "95496eb8b14a134b985844cbabe3d67a0caaff02ff07fe6d3aafe232e970bfae",
strip_prefix = "rules_python-1.0.0-rc2/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0-rc2/rules_python-1.0.0-rc2.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()
Full Changelog: https://github.com/bazelbuild/rules_python/compare/1.0.0-rc1...1.0.0-rc2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.0.0-rc1")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "cf2654855fbd8690344d3e4181a1b22608f950a98e5b5368505397942eda611b",
strip_prefix = "rules_python-1.0.0-rc1",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0-rc1/rules_python-1.0.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "cf2654855fbd8690344d3e4181a1b22608f950a98e5b5368505397942eda611b",
strip_prefix = "rules_python-1.0.0-rc1/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0-rc1/rules_python-1.0.0-rc1.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()
--bootstrap_impl=script by @chowder in https://github.com/bazelbuild/rules_python/pull/2439Full Changelog: https://github.com/bazelbuild/rules_python/compare/1.0.0-rc0...1.0.0-rc1
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.0.0-rc0")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "10efbf3b700a041190e3d7a782d80508296d46c618908e40ffa26f443cc3d15b",
strip_prefix = "rules_python-1.0.0-rc0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0-rc0/rules_python-1.0.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "10efbf3b700a041190e3d7a782d80508296d46c618908e40ffa26f443cc3d15b",
strip_prefix = "rules_python-1.0.0-rc0/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0-rc0/rules_python-1.0.0-rc0.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()
zstd archives by @aignas in https://github.com/bazelbuild/rules_python/pull/2412Full Changelog: https://github.com/bazelbuild/rules_python/compare/0.40.0...1.0.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "0.40.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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53",
strip_prefix = "rules_python-0.40.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
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 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53",
strip_prefix = "rules_python-0.40.0/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.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()
Full Changelog: https://github.com/bazelbuild/rules_python/compare/0.39.0...0.40.0
{#v0-40-changed}
{#v0-40-fixed}
{#v0-40-added}
{#v0-40-removed}
requirements.txt for the twine dependencies.
Please use requirements_linux.txt instead.zstd support and remove attributes
for customizing the zstd binary to be used for zstd archives in the
{bzl:obj}python_repository repository_rule. This affects the
{bzl:obj}python_register_toolchains and
{bzl:obj}python_register_multi_toolchains callers in the WORKSPACE.{#v0-39-0}
Your coding agent can read these notes before it upgrades. Set up the MCP server →