Skip to content

Releases: bazelbuild/rules_python

1.1.0-rc1

13 Jan 02:21
1aa0d9f
Compare
Choose a tag to compare
1.1.0-rc1 Pre-release
Pre-release

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

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")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "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()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "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()

What's Changed

  • fix(gazelle): Fix the requirements arg to the gazelle python manifest generator. by @sputt in #2533
  • docs: note direct_pyi_files/transitive_pyi_files are usually build-time only by @rickeylev in #2555
  • refactor(pypi): rename config settings and improve docs by @aignas in #2556
  • fix(pypi): include pyi files in data attribute by @rickeylev in #2558

New Contributors

Full Changelog: 1.1.0-rc0...1.1.0-rc1

1.1.0-rc0

09 Jan 21:34
38135f7
Compare
Choose a tag to compare
1.1.0-rc0 Pre-release
Pre-release

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

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")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "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()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "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()

What's Changed

  • tests: skip workspace-specific examples for bazel 9 by @rickeylev in #2471
  • chore: ignore examples/pip_repository_annotations bazel-bin symlink by @rickeylev in #2472
  • chore: use per-rule loads in pip_compile.bzl by @rickeylev in #2473
  • tests: make multi_python_versions pass with Bazel 9 workspace by @rickeylev in #2474
  • fix: normalize argv0 so runfiles root can be found on windows with bazel 9 by @rickeylev in #2481
  • chore: load specific bzl files instead of generic defs.bzl by @rickeylev in #2483
  • feat(pypi): support freethreaded in experimental_index_url by @aignas in #2460
  • fix: Make sure wheelmaker uses the default shell env by @shs96c in #2477
  • chore: remove find_requirements re-export from bazel_tools by @rickeylev in #2484
  • feat(gazelle): Include types/stubs packages by @ewianda in #2425
  • build(deps): bump django from 4.2.16 to 4.2.17 in /examples/bzlmod_build_file_generation by @dependabot in #2486
  • build(deps): bump rich from 13.9.3 to 13.9.4 in /tools/publish by @dependabot in #2371
  • fix: define rules_python_internal earlier so Bazel 9 doesn't try to use PyInfo et al builtins by @rickeylev in #2485
  • chore: replace rules_proto with com_google_protobuf by @rickeylev in #2487
  • doc: freethreaded support changelog by @aignas in #2497
  • ci: fix CI after bazel 8 release by @aignas in #2492
  • fix: Strip trailing slash for repo url by @amartani in #2495
  • fix(pypi): pass requirements without env markers to the whl_library by @aignas in #2488
  • fix: make bazel 9 workspace recognize rules_python as the main module by @rickeylev in #2501
  • fix(gazelle): Support parsing files that use Python3.12 PEP 695 (Type Parameter Syntax) by using dougthor42's fork of go-tree-sitter by @dougthor42 in #2496
  • fix(pypi): Fix use_hub_alias_dependencies with WORKSPACE by @gholms in #2504
  • build(deps): bump astroid from 3.3.5 to 3.3.6 in /docs by @dependabot in #2490
  • docs: Fix toolchain implementation file name by @nicholasjng in #2512
  • doc: correct toolchain usage in repository_rule context docs by @aignas in #2510
  • fix: py_proto_library: external runfiles by @tpudlik in #2516
  • refactor(pypi): A better error message when the wheel select hits no_match by @aignas in #2519
  • refactor: consolidate py_executable_bazel, common_bazel by @rickeylev in #2523
  • feat(toolchain): Add support for Python 3.13.1. by @okin in #2482
  • refactor: stop warning if we don't find anything via SimpleAPI by @aignas in #2532
  • feat(pypi): only query SimpleAPI for pkgs that have shas by @aignas in #2527
  • refactor(pypi): further cleanup of pip.parse code by @aignas in #2534
  • feat: add pyi attributes/fields, original source fields by @rickeylev in #2538
  • fix(gazelle): Don't ignore setup.py files when running Gazelle by @dougthor42 in #2536
  • fix(pypi): change the parallelisation scheme for querying SimpleAPI by @aignas in #2531
  • refactor: fold per-target python version into base rules by @rickeylev in #2541
  • fix(whl_library): track sources in whl_library by @aignas in #2526
  • Updated pip and packaging versions to work with free-threading packages by @vfdev-5 in #2514
  • chore: add check for version_next markers by @rickeylev in #2542
  • feat: Add feature to expose whether the native rules are used by @jsharpe in #2549
  • chore: update changelog for 1.1.0 by @rickeylev in #2547
  • chore: update version strings in docs. by @rickeylev in #2546
  • feat: make pypi-generated targets include pyi files by @rickeylev in #2545
  • fix: _which_unchecked: don't watch PATH if binary exists. by @Ubehebe in #2552
  • chore: update release check to ignore VERSION_NEXT substring in CONTRIBUTING.md by @rickeylev in #2553

New Contributors

Full Changelog: 1.0.0...1.1.0-rc0

1.0.0

06 Dec 00:52
d24691f
Compare
Choose a tag to compare

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

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")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "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()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "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()

What's Changed

  • docs: fix refs to precompile source retention flag/attr in precompiling docs by @rickeylev in #2419
  • refactor: Add GAZELLE_VERBOSE env and log parser failures by @dougthor42 in #2420
  • refactor(toolchain): use bazel to extract zstd archives by @aignas in #2412
  • refactor!(toolchain): remove uname dep in the repository_rule stage by @aignas in #2406
  • fix(pypi): handle multiple versions of the same package when parsing requirements files by @ewianda in #2377
  • fix(uv): Fix sha256 for uv binary for aarch64-apple-darwin by @schultetwin in #2422
  • feat(musl): add musl toolchain by @aignas in #2402
  • chore: extra code removals before 1.0 by @aignas in #2421
  • feat(pypi): Add extra_hub_aliases to pip_repository too by @gholms in #2426
  • chore!(pip.parse): remove parse_all_requirements_files attribute by @aignas in #2407
  • chore(gazelle): Rename GAZELLE_VERBOSE env var; use idiomatic go; add comments by @dougthor42 in #2428
  • fix: make sys.executable work with script bootstrap by @rickeylev in #2409
  • tests: make workspace CI jobs enable workspace mode by @comius in #2435
  • fix: use com_google_protobuf in WORKSPACE by @comius in #2432
  • chore: add dougthor42 as one of the gazelle owners by @aignas in #2427
  • ci: rm the lock file testing by @aignas in #2430
  • tests: make some tests compatible with Bazel 9 fix various tests relying on Bazel builtin providers existing by @rickeylev in #2433
  • refactor(pypi): move config setting processing to the macro by @aignas in #2424
  • chore: rename the dev-only setup files to more clearly self-describe what they are by @rickeylev in #2436
  • fix: correctly obtain relative path required for the venv created by --bootstrap_impl=script by @chowder in #2439
  • fix: Propagate common kwargs to sphinx_run by @tpudlik in #2442
  • fix: upgrade to bazel_features 1.21.0 for Bazel 8 rc3 support by @rickeylev in #2440
  • fix(render_pkg_aliases): correctly render when we have target_platforms set by @aignas in #2447
  • deps: upgrade to stardoc 0.7.2 for Bazel 8 support by @rickeylev in #2451
  • chore: auto compute prelease setting by @rickeylev in #2452
  • feat(runfiles): add support for spaces and newlines in runfiles paths by @dizzy57 in #2456
  • fix: upgrade to rules_bazel_integration_test 0.27.0 for bazel 9 compatibility by @rickeylev in #2454
  • doc: improve alias error msg in pip hubs by @aignas in #2458
  • fix: Add libs/python3.lib to libpython target for SABI builds on Windows by @nicholasjng in #1820
  • fix: dependency resolver on windows only works when --enable_runfiles and --windows_enable_symlinks is used by @ChewyGumball in #2457
  • chore: remove defunct code from py_cc_link_params_info.bzl by @rickeylev in #2465
  • fix: add missing api distribution target by @rickeylev in #2464
  • docs: mention calling register_toolchains in custom toolchain docs by @rickeylev in #2463
  • test: Enable non-ABI3 libs linking test for Windows by @nicholasjng in #2461
  • fix: only delete first sys.path entry in the stage-2 bootstrap if PYTHONSAFEPATH is unset or unsupported by @chowder in #2418
  • fix(gazelle): empty list by @hunshcn in #2099
  • chore: bump the changelog to 1.0 by @aignas in #2470

New Contributors

Full Changelog: 0.40.0...1.0.0

1.0.0-rc2

29 Nov 01:19
29fdcc2
Compare
Choose a tag to compare
1.0.0-rc2 Pre-release
Pre-release

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

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")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "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()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "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()

What's Changed

  • fix(render_pkg_aliases): correctly render when we have target_platforms set by @aignas in #2447
  • deps: upgrade to stardoc 0.7.2 for Bazel 8 support by @rickeylev in #2451
  • chore: auto compute prelease setting by @rickeylev in #2452
  • feat(runfiles): add support for spaces and newlines in runfiles paths by @dizzy57 in #2456
  • fix: upgrade to rules_bazel_integration_test 0.27.0 for bazel 9 compatibility by @rickeylev in #2454

Full Changelog: 1.0.0-rc1...1.0.0-rc2

1.0.0-rc1

26 Nov 00:12
077eec6
Compare
Choose a tag to compare
1.0.0-rc1 Pre-release
Pre-release

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

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")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "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()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "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()

What's Changed

  • tests: make some tests compatible with Bazel 9 fix various tests relying on Bazel builtin providers existing by @rickeylev in #2433
  • refactor(pypi): move config setting processing to the macro by @aignas in #2424
  • chore: rename the dev-only setup files to more clearly self-describe what they are by @rickeylev in #2436
  • fix: correctly obtain relative path required for the venv created by --bootstrap_impl=script by @chowder in #2439
  • fix: Propagate common kwargs to sphinx_run by @tpudlik in #2442
  • fix: upgrade to bazel_features 1.21.0 for Bazel 8 rc3 support by @rickeylev in #2440

Full Changelog: 1.0.0-rc0...1.0.0-rc1

1.0.0-rc0

22 Nov 00:19
fe3f7a4
Compare
Choose a tag to compare
1.0.0-rc0 Pre-release
Pre-release

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

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")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "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()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "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()

What's Changed

  • docs: fix refs to precompile source retention flag/attr in precompiling docs by @rickeylev in #2419
  • refactor: Add GAZELLE_VERBOSE env and log parser failures by @dougthor42 in #2420
  • refactor(toolchain): use bazel to extract zstd archives by @aignas in #2412
  • refactor!(toolchain): remove uname dep in the repository_rule stage by @aignas in #2406
  • fix(pypi): handle multiple versions of the same package when parsing requirements files by @ewianda in #2377
  • fix(uv): Fix sha256 for uv binary for aarch64-apple-darwin by @schultetwin in #2422
  • feat(musl): add musl toolchain by @aignas in #2402
  • chore: extra code removals before 1.0 by @aignas in #2421
  • feat(pypi): Add extra_hub_aliases to pip_repository too by @gholms in #2426
  • chore!(pip.parse): remove parse_all_requirements_files attribute by @aignas in #2407
  • chore(gazelle): Rename GAZELLE_VERBOSE env var; use idiomatic go; add comments by @dougthor42 in #2428
  • fix: make sys.executable work with script bootstrap by @rickeylev in #2409
  • tests: make workspace CI jobs enable workspace mode by @comius in #2435
  • fix: use com_google_protobuf in WORKSPACE by @comius in #2432
  • chore: add dougthor42 as one of the gazelle owners by @aignas in #2427
  • ci: rm the lock file testing by @aignas in #2430

New Contributors

Full Changelog: 0.40.0...1.0.0-rc0

0.40.0

17 Nov 04:33
1944874
Compare
Choose a tag to compare

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

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")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "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()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "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()

What's Changed

  • refactor(pkg_aliases): create a macro for creating whl aliases by @aignas in #2391
  • chore: change bcr presubmit to drop bazel 6, add last_rc (bazel 8) by @rickeylev in #2404
  • deps: update to gazelle 0.40.0 by @rickeylev in #2403
  • chore!: remove requirements.txt for the twine publishing tool by @aignas in #2401
  • ci: add last_rc, remove extraneous pystar configs by @rickeylev in #2405
  • fix: upgrade to rules_proto 7.0.2 to pickup fix for Bazel 9 by @rickeylev in #2408
  • fix: keep import path values if Bazel-builtin PyInfo is removed by @rickeylev in #2415
  • docs: tell how to do pyc-only builds by @rickeylev in #2417
  • chore: update changelog for 0.40.0 by @rickeylev in #2416

Full Changelog: 0.39.0...0.40.0

0.39.0

13 Nov 01:48
0759322
Compare
Choose a tag to compare

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.39.0")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")

pip.parse(
    hub_name = "pip",
    python_version = "3.11",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "62ddebb766b4d6ddf1712f753dac5740bea072646f630eb9982caa09ad8a7687",
    strip_prefix = "rules_python-0.39.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.39.0/rules_python-0.39.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "62ddebb766b4d6ddf1712f753dac5740bea072646f630eb9982caa09ad8a7687",
    strip_prefix = "rules_python-0.39.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.39.0/rules_python-0.39.0.tar.gz",
)

# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.

load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()

What's Changed

  • chore: improve the CHANGELOG for the new release by @aignas in #2385
  • chore(deps): upgrade some dependencies that will eventually be required by Bazel 8 by @rickeylev in #2383
  • feat(toolchain): support freethreaded toolchains by @aignas in #2372
  • chore: change the parse_all_requirements_files default value by @aignas in #2389
  • feat: add attrs/fields for the runtime's ABI flags by @rickeylev in #2390
  • deps: updates for bazel 8 compatibility by @rickeylev in #2379
  • chore: remove references to @rules_cc//cc:defs.bzl by @comius in #2293
  • fix: Bazel version check by @comius in #2393
  • tests: use $(rootpaths) to get executable files paths for Bazel 8 compatibility by @rickeylev in #2395
  • fix: skip precompiling if using Bazel-builtin PyRuntimeInfo by @rickeylev in #2394
  • chore: remove Thulio from BCR app configs by @aignas in #2397
  • chore: update changelog for 0.39.0 by @rickeylev in #2398

Full Changelog: 0.38.0...0.39.0

0.38.0

08 Nov 00:37
251eb37
Compare
Choose a tag to compare

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.38.0")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")

pip.parse(
    hub_name = "pip",
    python_version = "3.11",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34",
    strip_prefix = "rules_python-0.38.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34",
    strip_prefix = "rules_python-0.38.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz",
)

# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.

load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()

What's Changed

  • docs: give user-friendly permalinks in changelog by @rickeylev in #2315
  • ci: upgrade to rbe_ubuntu2004 by @rickeylev in #2316
  • chore: set 7.x in bazelversion by @rickeylev in #2317
  • docs: rules_python bzlmod GA and 1.0 prep by @aignas in #2296
  • test(bzlmod): refactor pip_parse to make it more testable by @aignas in #2314
  • build(deps): bump sphinx from 8.0.2 to 8.1.3 in /docs by @dependabot in #2322
  • build(deps): bump charset-normalizer from 3.3.2 to 3.4.0 in /tools/publish by @dependabot in #2323
  • build(deps): bump charset-normalizer from 3.3.2 to 3.4.0 in /docs by @dependabot in #2321
  • docs: fix typo in precompiling docs by @rickeylev in #2324
  • fix(rules): remove rules_python --incompatible_python_disallow_native_rules checking by @rickeylev in #2327
  • fix: fix errors with bazel@head by @rickeylev in #2332
  • docs: update changelog for 0.37.1 by @rickeylev in #2330
  • docs: tell how to setup readthedocs integration with sphinxdocs by @rickeylev in #2331
  • deps: use rules_cc 0.0.13 to support newer bazel versions by @rickeylev in #2335
  • docs: link to main docs in generated release notes by @rickeylev in #2338
  • chore: bump twine dependencies and cleanup for 1.0 by @aignas in #2333
  • chore: remove an accidental file by @aignas in #2348
  • fix(bzlmod): generate config_setting values for all python toolchains by @aignas in #2350
  • docs: document the is_python config settings by @rickeylev in #2336
  • docs: tell how to create a release branch for patch releases by @rickeylev in #2329
  • chore: add aignas to the BCR maintainers by @aignas in #2352
  • fix: breakages in unused codepaths after recent refactors by @oprypin in #2353
  • refactor(pypi): use a macro to define whl_library targets by @aignas in #2347
  • feat: add features.version value by @rickeylev in #2357
  • refactor: fold bazel-specific code into main files by @rickeylev in #2358
  • fix: allow spaces in whl_librarys by @mark-thm in #2334
  • tests: don't restrict python versions in bzlmod example by @rickeylev in #2362
  • fix: Remove --no-build-isolation from pip install command by @mark-thm in #2360
  • docs: clarify that PyInfo.transitive_sources may not include py files by @rickeylev in #2367
  • fix(pypi): correctly pass extra_pip_args when building sdists by @aignas in #2368
  • fix(pypi): use local version specifiers for patched whl output by @aignas in #2365
  • fix(bzlmod): allow users to specify extra targets to be added to hub repos by @aignas in #2369
  • fix: make sphinxdocs support directory inputs by @rickeylev in #2375
  • feat(bzlmod): cross-platform builds without experimental_index_url by @aignas in #2325
  • chore: cleanup and fix some bzl_library deps in //python/private by @rickeylev in #2381
  • tests: fix the job name for the debian bzlmod gazelle job by @rickeylev in #2382
  • chore: move code out of WORKSPACE.bzlmod and into MODULE by @rickeylev in #2380
  • chore: prepare CHANGELOG for 0.38.0 release by @aignas in #2384

Full Changelog: 0.37.0...0.38.0

0.37.2

27 Oct 03:10
Compare
Choose a tag to compare

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.37.2")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")

pip.parse(
    hub_name = "pip",
    python_version = "3.11",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "c6fb25d0ba0246f6d5bd820dd0b2e66b339ccc510242fd4956b9a639b548d113",
    strip_prefix = "rules_python-0.37.2",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.37.2/rules_python-0.37.2.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "c6fb25d0ba0246f6d5bd820dd0b2e66b339ccc510242fd4956b9a639b548d113",
    strip_prefix = "rules_python-0.37.2/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.37.2/rules_python-0.37.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: 0.37.1...0.37.2