• Home
  • Raw
  • Download

Lines Matching +full:core +full:- +full:rules

1 # Python Rules for Bazel
3 …ba7a1205955a45b53e854.svg?branch=main)](https://buildkite.com/bazel/python-rules-python-postsubmit)
7 This repository is the home of the core Python rules -- `py_library`,
9 support in Bazel. It also contains package installation rules for integrating with PyPI and other i…
18 Currently, the core rules build into the Bazel binary, and the symbols in this
19rules to Starlark and removing them from the Bazel binary. Therefore, the future-proof way to depe…
21 The core rules are stable. Their implementation in Bazel is subject to Bazel's
22 [backward compatibility policy](https://docs.bazel.build/versions/master/backward-compatibility.htm…
30 - Status: Beta
31 - Full Feature Parity: No
53 Once added, you can load the rules and use them:
74 is used by the version-unaware rules (e.g. `//python:py_binary.bzl` et al). For
75 submodules, it's recommended to use the version-aware rules to pin your programs
83 silently ignored if a submodule does it. Similarly, using the version-unaware
84 rules (which always use the default Python version) should only be done by the
97 Then use the base rules from e.g. `//python:py_binary.bzl`.
106 2. To allow incremental, per-target, upgrading to newer Python versions,
107 typically in a mono-repo situation.
109 To configure a submodule with the version-aware rules, request the particular
110 version you need, then use the `@python_versions` repo to use the rules that
123 the rules that force that particular version. Multiple versions can be specified
158 strip_prefix = "rules_python-{}".format(VERSION),
159 …url = "https://github.com/bazelbuild/rules_python/releases/download/{}/rules_python-{}.tar.gz".for…
169 To register a hermetic Python toolchain rather than rely on a system-installed interpreter for runt…
192 …n targets will use the toolchain's interpreter during execution, but a system-installed interpreter
194 … this toolchain. Please refer to [python-build-standalone documentation's _Quirks_ section](https:…
196 ### Toolchain usage in other rules
198rules, such as `genrule()`, by adding the `toolchains=["@rules_python//python:current_py_toolchain…
203 methods, you can then load the core rules in your `BUILD` files with the following:
218 1. [Installing third_party packages](#installing-third_party-packages)
219 2. [Using third_party packages as dependencies](#using-third_party-packages-as-dependencies
236 For more documentation, including how the rules can update/create a requirements file, see the bzlm…
257 #### pip rules
259 Note that since `pip_parse` is a repository rule and therefore executes pip at WORKSPACE-evaluation…
270 re-executed to pick up a non-hermetic change to your environment (e.g.,
271 updating your system `python` interpreter), you can force it to re-execute by running
272 `bazel sync --only [pip_parse name]`.
274 …ve the same implementation. The name `pip_install` may be removed in a future version of the rules.
276 …nts.txt` with a fully resolved set of dependencies using a tool such as `pip-tools` or the `compil…
306 [this issue][requirements-drawbacks] for an enumeration. If you don't
316 Bazel label names (e.g. `-`, `.`) replaced with `_`. If you need to
330 [requirements-drawbacks]: https://github.com/bazelbuild/rules_python/issues/414
351 [Gazelle](https://github.com/bazelbuild/bazel-gazelle)
358 ## Migrating from the bundled rules
360 The core rules are currently available in Bazel as built-in symbols, but this
362 `WORKSPACE` file and load the Python rules from
370 # Also consider using the -r flag to modify an entire workspace.
371 buildifier --lint=fix --warnings=native-py <files>
375 started](#Getting-started) above.
377 Note that Starlark-defined bundled symbols underneath