commit | 18380a283d73060db856c2f3d105a0290143971a | [log] [tgz] |
---|---|---|
author | Richard Levasseur <rlevasseur@google.com> | Fri Sep 27 09:08:17 2024 -0700 |
committer | GitHub <noreply@github.com> | Fri Sep 27 16:08:17 2024 +0000 |
tree | f9dee3e90b37e2b9ef2ece2b8c1d8af5152b5d05 | |
parent | 9a98e8c1f18fb8b1c41e1d409088da9c72cee352 [diff] |
refactor: add builders to make creating PyInfo/depset/runfiles easier (#2251) This add some builders "classes" to make constructing PyInfo, depsets, and runfiles a bit cleaner. Previously, building such objects required creating multiple local variables for each arg/attribute of the object (e.g. list_of_files and list_of_depsets for building a depset). Keeping track of all the variables was verbose and tedious. To make it easier, encapsulate that bookkeeping in some objects. Accumulating parts is now much easier: builders have an `add()` method that looks at the input and stores it in the appropriate place. This builders will be exposed to users in an upcoming PR to make building and merging PyInfo objects easier. Work towards https://github.com/bazelbuild/rules_python/issues/1647
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.