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

Module PackageVariable'

source code

engine.SCons.Variables.PackageVariable

This file defines the option type for SCons implementing 'package
activation'.

To be used whenever a 'package' may be enabled/disabled and the
package path may be specified.

Usage example:

  Examples:
      x11=no   (disables X11 support)
      x11=yes  (will search for the package installation dir)
      x11=/usr/local/X11 (will check this path for existance)

  To replace autoconf's --with-xxx=yyy 

  opts = Variables()
  opts.Add(PackageVariable('x11',
                         'use X11 installed here (yes = search some places',
                         'yes'))
  ...
  if env['x11'] == True:
      dir = ... search X11 in some standard places ...
      env['x11'] = dir 
  if env['x11']:
      ... build with x11 ...

Functions [hide private]
 
PackageVariable(key, help, default, searchfunc=None)
The input parameters describe a 'package list' option, thus they are returned with the correct converter and validator appended. The result is usable for input to opts.Add() .
source code
 
_converter(val) source code
 
_validator(key, val, env, searchfunc) source code
Variables [hide private]
  __disable_strings = ('0', 'no', 'false', 'off', 'disable')
  __enable_strings = ('1', 'yes', 'true', 'on', 'enable', 'search')
  __package__ = 'SCons.Variables'
  __revision__ = 'src/engine/SCons/Variables/PackageVariable.py ...
Function Details [hide private]

PackageVariable(key, help, default, searchfunc=None)

source code 

The input parameters describe a 'package list' option, thus they are returned with the correct converter and validator appended. The result is usable for input to opts.Add() .

A 'package list' option may either be 'all', 'none' or a list of package names (seperated by space).


Variables Details [hide private]

__revision__

Value:
'src/engine/SCons/Variables/PackageVariable.py  2014/09/27 12:51:43 ga\
ryo'