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 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 Options 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/ rel...
Variables Details [hide private]


'src/engine/SCons/Variables/ rel_2.5.1:3735:9dc6cee5c16\
8 2016/11/03 14:02:02 bdbaddog'