Module Expr Str Assign NameStore Str Assign NameStore ListLoad Str Import alias Import alias Import alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Str orelse Assign NameStore Str Raise Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Str Raise Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod NameLoad TupleLoad NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Str orelse Assign NameStore Str Raise Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Str Raise Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return TupleLoad NameLoad BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index Num NameLoad NameLoad NameLoad orelse Return TupleLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list Assign NameStore Call NameLoad
N/A N/A SCons.Variables.PathVariable

This file defines an option type for SCons implementing path settings.

To be used whenever a a user-specified path override should be allowed.

Arguments to PathVariable are:
  option-name  = name of this option on the command line (e.g. "prefix")
  option-help  = help string for option
  option-dflt  = default value for this option
  validator    = [optional] validator for option value.  Predefined
                 validators are:

                     PathAccept -- accepts any path setting; no validation
                     PathIsDir  -- path must be an existing directory
                     PathIsDirCreate -- path must be a dir; will create
                     PathIsFile -- path must be a file
                     PathExists -- path must exist (any type) [default]

                 The validator is a function that is called and which
                 should return True or False to indicate if the path
                 is valid.  The arguments to the validator function
                 are: (key, val, env).  The key is the name of the
                 option, the val is the path specified for the option,
                 and the env is the env to which the Otions have been
                 added.

Usage example:

  Examples:
      prefix=/usr/local

  opts = Variables()

  opts = Variables()
  opts.Add(PathVariable('qtdir',
                      'where the root of Qt is installed',
                      qtdir, PathIsDir))
  opts.Add(PathVariable('qt_includes',
                      'where the Qt includes are installed',
                      '$qtdir/includes', PathIsDirCreate))
  opts.Add(PathVariable('qt_libraries',
                      'where the Qt library is installed',
                      '$qtdir/lib'))

 N/A __revision__ src/engine/SCons/Variables/PathVariable.py  2014/07/05 09:42:21 garyo N/A __all__ N/A PathVariable N/A os N/A os.path N/A SCons.Errors _PathVariableClass N/A object N/A PathAccept N/A N/A self key val env N/A N/A N/A Accepts any path, no checking done. N/A N/A PathIsDir N/A N/A self key val env N/A N/A N/A Validator to check if Path is a directory. N/A N/A N/A N/A N/A os path isdir val N/A N/A N/A N/A N/A os path isfile val N/A N/A m Directory path for option %s is a file: %s N/A N/A m Directory path for option %s does not exist: %s N/A N/A N/A N/A SCons Errors UserError N/A m N/A key val N/A PathIsDirCreate N/A N/A self key val env N/A N/A N/A Validator to check if Path is a directory,
           creating it if it does not exist. N/A N/A N/A N/A os path isfile val N/A N/A m Path for option %s is a file, not a directory: %s N/A N/A N/A N/A SCons Errors UserError N/A m N/A key val N/A N/A N/A N/A N/A os path isdir val N/A N/A N/A N/A os makedirs val N/A PathIsFile N/A N/A self key val env N/A N/A N/A validator to check if Path is a file N/A N/A N/A N/A N/A os path isfile val N/A N/A N/A N/A N/A os path isdir val N/A N/A m File path for option %s is a directory: %s N/A N/A m File path for option %s does not exist: %s N/A N/A N/A N/A SCons Errors UserError N/A m N/A key val N/A PathExists N/A N/A self key val env N/A N/A N/A validator to check if Path exists N/A N/A N/A N/A N/A os path exists val N/A N/A m Path for option %s does not exist: %s N/A N/A N/A N/A SCons Errors UserError N/A m N/A key val N/A __call__ N/A N/A self key help default validator N/A None N/A N/A 
        The input parameters describe a 'path list' option, thus they
        are returned with the correct converter and validator appended. The
        result is usable for input to opts.Add() .

        The 'default' option specifies the default path to use if the
        user does not specify an override with this option.

        validator is a validator, see this file for examples
         N/A N/A validator None N/A N/A validator N/A self PathExists N/A N/A N/A N/A N/A SCons Util is_List key N/A N/A N/A SCons Util is_Tuple key N/A N/A N/A key N/A %s ( /path/to/%s ) N/A help N/A key N/A 0 default validator None N/A N/A N/A key N/A %s ( /path/to/%s ) N/A help key default validator None N/A N/A N/A PathVariable N/A _PathVariableClass