@@ -278,29 +278,11 @@ def get_standard_vars(cls, context, variant, build_type, install,
278278 return vars_
279279
280280 @classmethod
281- def add_standard_build_actions (cls , executor , context , variant , build_type ,
282- install , build_path , install_path = None ):
283- """Perform build actions common to every build system.
284- """
285- # set env vars
286- env_vars = cls .get_standard_vars (
287- context = context ,
288- variant = variant ,
289- build_type = build_type ,
290- install = install ,
291- build_path = build_path ,
292- install_path = install_path
293- )
281+ def add_pre_build_commands (cls , executor , variant , build_type , install ,
282+ build_path , install_path = None ):
283+ """Execute pre_build_commands function if present."""
294284
295- for var , value in env_vars .items ():
296- executor .env [var ] = value
297-
298- @classmethod
299- def add_pre_build_commands (cls , executor , variant , build_type ,
300- install , build_path , install_path = None ):
301- """Execute pre_build_commands if present.
302- """
303- from rez .utils .data_utils import RO_AttrDictWrapper
285+ from rez .utils .data_utils import RO_AttrDictWrapper as ROA
304286
305287 # bind build-related values into a 'build' namespace
306288 build_ns = {
@@ -316,10 +298,27 @@ def add_pre_build_commands(cls, executor, variant, build_type,
316298 if pre_build_commands :
317299 with executor .reset_globals ():
318300 executor .bind ("this" , variant )
319- executor .bind ("build" , RO_AttrDictWrapper (build_ns ))
320-
301+ executor .bind ("build" , ROA (build_ns ))
321302 executor .execute_code (pre_build_commands )
322303
304+ @classmethod
305+ def add_standard_build_actions (cls , executor , context , variant , build_type ,
306+ install , build_path , install_path = None ):
307+ """Perform build actions common to every build system.
308+ """
309+ # set env vars
310+ env_vars = cls .get_standard_vars (
311+ context = context ,
312+ variant = variant ,
313+ build_type = build_type ,
314+ install = install ,
315+ build_path = build_path ,
316+ install_path = install_path
317+ )
318+
319+ for var , value in env_vars .items ():
320+ executor .env [var ] = value
321+
323322
324323# Copyright 2013-2016 Allan Johns.
325324#
0 commit comments