commit | fcd1d5e9993306891a41b100a80ea407eb3802bc | [log] [tgz] |
---|---|---|
author | Richard Levasseur <rlevasseur@google.com> | Sun Sep 08 18:54:45 2024 -0700 |
committer | GitHub <noreply@github.com> | Mon Sep 09 01:54:45 2024 +0000 |
tree | 7ac158b9b4caeeadec1d0f860f7fdc57d73f319a | |
parent | c804a13fe918f1e820a829a73d5fb951d6788c46 [diff] |
feat: default `py_runtime` version info to `--python_version` (#2198) This changes `py_runtime` to get its interpreter version from the `--python_version` flag if it wasn't explicitly specified. This is useful in two contexts: For the runtime env toolchains, a local toolchain, or platform interpreter (basically any py_runtime without a known version), it allows getting some Python version into the analysis phase, which allows e.g. precompiling. For environments using embedded Python, it allows defining fewer (e.g. 1) `py_runtime` target instead of one for every Python version. This is because `py_runtime` serves a minor role in such builds.
This repository is the home of the core Python rules -- py_library
, py_binary
, py_test
, py_proto_library
, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.