File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed
Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ package with two python-based variants might look like this:
2323
2424 The current working directory is set to the *build path * during a build.
2525
26+ .. _the-build-environment :
27+
2628The Build Environment
2729=====================
2830
Original file line number Diff line number Diff line change @@ -121,8 +121,8 @@ removed**:
121121Build Environment Variables
122122===========================
123123
124- These are variables that rez generates within a build environment, in addition
125- to those listed :ref: `here <context-environment-variables >`.
124+ These are variables that rez generates within a :ref: ` build environment < the-build-environment >` , in addition
125+ to context environment variables listed :ref: `here <context-environment-variables >`.
126126
127127.. glossary ::
128128
Original file line number Diff line number Diff line change @@ -79,11 +79,19 @@ and *late binding* functions - and these are decorated using ``@early`` and ``@l
7979Early Binding Functions
8080+++++++++++++++++++++++
8181
82- Early 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.
84-
85- Here is an example of an :attr: `authors ` attribute that is automatically set to the contributors of the
86- package's git project:
82+ Early binding functions use the ``@early `` decorator. They are evaluated at
83+ *build time *, hence the 'early' in 'early binding' and their definition persists
84+ in the installed ``package.py ``. By 'build time', it is meant that they are
85+ evaluated before the resolve has occurred, and as such, before the
86+ :ref: `build environment <the-build-environment >` has been constructed. Therefore
87+ there are some important distinctions that set early-bound functions apart from
88+ other function attributes:
89+
90+ - The :attr: `this ` object only exposes package attributes. Nothing else is accessible when inside an early-bound function.
91+ - No rez-set :doc: `environment variables <environment >` can be accessed inside an early bound function.
92+
93+ Any package attribute can be implemented as an early binding function. Here is an example of an :attr: `authors `
94+ attribute that is automatically set to the contributors of the package's git project:
8795
8896.. code-block :: python
8997
You can’t perform that action at this time.
0 commit comments