Package Yab :: Module Core :: Class BuildEnv
[show private | hide private]
[frames | no frames]

Class BuildEnv

Delegator --+
            |
           BuildEnv

Known Subclasses:
TargetBase, ToolsetBase

This class mantains the environment variables for a specific build step.
Method Summary
  __init__(self, parent, locate)
  __getattr__(self, attr)
  __setattr__(self, attr, value)
  calc_env(self)
  get_env(self)
This function will combine the environment variables with those of its delegate and return a dictionary containing the merged result.
  get_locate(self)
Locate can not be a build variable because it is needed when the build environment is constructed in order to specify where the targets reside.
  run_command(self, unparsed_command, in_dir, real_command, globals)
Parse the command, replacing $ expressions, and run it.
  subst_vars(self, cmd, globals)
Take a command string and replace the $ forms with evaluated pythod results.

Class Variable Summary
SRE_Pattern escape_re = \$\{([^\}]*)\}
SRE_Pattern escape_re2 = \$([_A-Za-z0-9]+)

Method Details

get_env(self)

This function will combine the environment variables with those of its delegate and return a dictionary containing the merged result.

get_locate(self)

Locate can not be a build variable because it is needed when the build environment is constructed in order to specify where the targets reside.

run_command(self, unparsed_command, in_dir=None, real_command=None, globals=None)

Parse the command, replacing $ expressions, and run it.

It in_dir is specified, switch to that directory first. It real_command is specified, print that to cout as a status message, otherwise print the parsed command. See subst_vars for a description of globals.

subst_vars(self, cmd, globals=None)

Take a command string and replace the $ forms with evaluated pythod results.

$ forms are evaluated as python expressions in which the local variables are the build environment and the globls are passed in as a dictionary. If no globals are specified, use the globals from where the target was constructed.

Class Variable Details

escape_re

Type:
SRE_Pattern
Value:
\$\{([^\}]*)\}                                                         

escape_re2

Type:
SRE_Pattern
Value:
\$([_A-Za-z0-9]+)                                                      

Generated by Epydoc 2.0 on Fri Aug 15 16:30:51 2003 http://epydoc.sf.net