Package SCons :: Package Variables :: Module PathVariable'
[hide private]
[frames] | no frames]

Module PathVariable'

source code


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

Usage example:


  opts = Variables()

  opts = Variables()
                      'where the root of Qt is installed',
                      qtdir, PathIsDir))
                      'where the Qt includes are installed',
                      '$qtdir/includes', PathIsDirCreate))
                      'where the Qt library is installed',

Classes [hide private]
Variables [hide private]
  PathVariable = SCons.Variables.PathVariable
  __package__ = 'SCons.Variables'
  __revision__ = 'src/engine/SCons/Variables/ iss...
Variables Details [hide private]


'src/engine/SCons/Variables/ issue-2856:2676:d23b7a2f45\
e8 2012/08/05 15:38:28 garyo'