commit | 03854a20c39e9e9bfebe91802102715cb027220a | [log] [tgz] |
---|---|---|
author | Richard Levasseur <rlevasseur@google.com> | Wed Jul 10 21:28:25 2024 -0700 |
committer | GitHub <noreply@github.com> | Thu Jul 11 04:28:25 2024 +0000 |
tree | 7969e8d2187169e3b1c0de1722dc1bb5561213bf | |
parent | 04f5798f7ad0827b33b8bd96d225820d4a91b0b2 [diff] |
refactor: don't load repo-phase objects from build-phase (#2056) As a general practice, the repo-phase and build-phase shouldn't load code from one another because they can't use each other's objects. It can also result in confusing behavior because the "starlark environment" is slightly different between the two phases. Additionally, Google's version of Bazel essentially disables repo-phase objects, so loading e.g. http_archive results in errors. This makes it more difficult to import rules_python into Google, as we have to maintain patches to cut out the code (and thus we spend more time trying to import the code than working on it).
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.