Glossary
- common attributes
Every rule has a set of common attributes. See Bazel’sCommon attributesfor a complete listing.
- in-build runtime
An in-build runtime is one where the Python runtime, and all its files, areknown to the build system and a Python binary includes all the necessary partsof the runtime in its runfiles. Such runtimes may be remotely downloaded, partof your source control, or mapped in from local files by repositories.
The main advantage of in-build runtimes is they ensure you know what Pythonruntime will be used, since it’s part of the build itself and included inthe resulting binary. The main disadvantage is the additional work it adds tobuilding. The whole Python runtime is included in a Python binary’s runfiles,which can be a significant number of files.
- platform runtime
A platform runtime is a Python runtime that is assumed to be installed on thesystem where a Python binary runs, wherever that may be. For example, using
/usr/bin/python3as the interpreter is a platform runtime – it assumes that, wherever the binaryruns (your local machine, a remote worker, within a container, etc.), that pathis available. Such runtimes arenot part of a binary’s runfiles.
The main advantage of platform runtimes is they are lightweight insofar asbuilding the binary is concerned. All Bazel has to do is pass along a stringpath to the interpreter. The disadvantage is, if you don’t control the systemsbeing run on, you may get different Python installations than expected.
- rule callable
A function that behaves like a rule. This includes, but is not is notlimited to:
Accepts a
namearg and othercommon attributes.Has no return value (i.e. returns
None).Creates at least a target named
name
There is usually an implicit interface about what attributes and values areaccepted; refer to the respective API accepting this type.
simple labelAstr orLabel object but not adirectselect object. This usuallymeans a string manipulation is occurring, which can’t be done onselectobjects. Such attributes are usually still configurable if an alias is used,and a reference to the alias is passed instead.
- nonconfigurable
A nonconfigurable value cannot use
select. See Bazel’sconfigurable attributes documentation.