File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,15 @@ Early Binding Functions
8080+++++++++++++++++++++++
8181
8282Early binding functions use the ``@early `` decorator. They are evaluated at *build time *, hence the
83- 'early' in 'early binding'. Any package attribute can be implemented as an early binding function.
83+ 'early' in 'early binding'. By build time, we mean that they are evaluated before the resolve has happened and before
84+ the :ref: `build environment <the-build-environment >` is constructed. Therefore it's important to note a few important
85+ behaviors of early bound functions:
8486
85- Here is an example of an :attr: `authors ` attribute that is automatically set to the contributors of the
86- package's git project:
87+ - The :attr: `this ` object only exposes package attributes and nothing else when used inside an early bound function.
88+ - No Rez-set :ref: `environment variables <environment-variables >` can be accessed inside an early bound function.
89+
90+ Any package attribute can be implemented as an early binding function. Here is an example of an :attr: `authors `
91+ attribute that is automatically set to the contributors of the package's git project:
8792
8893.. code-block :: python
8994
@@ -113,12 +118,6 @@ implicit :attr:`this` object:
113118 Do not reference other early bound or late bound attributes in
114119 your early bound function. An error will be raised if you do.
115120
116- .. warning ::
117- Certain package attributes cannot be accessed inside of an early bound function such as :attr: `this.root `.
118-
119- Additionally, :ref: `build environment variables <build-environment-variables >` cannot be accessed inside
120- of early bound functions.
121-
122121Early binding functions are a convenience. You can always use an arbitrary function instead, like so:
123122
124123.. code-block :: python
You can’t perform that action at this time.
0 commit comments