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

Module ListVariable'

source code

engine.SCons.Variables.ListVariable

This file defines the option type for SCons implementing 'lists'.

A 'list' option may either be 'all', 'none' or a list of names separated by comma. After the option has been processed, the option value holds either the named list elements, all list elements or no list elements at all.

Usage example:

list_of_libs = Split('x11 gl qt ical')

opts = Variables()
opts.Add(ListVariable('shared',
                  'libraries to build as shared libraries',
                  'all',
                  elems = list_of_libs))
...
for lib in list_of_libs:
 if lib in env['shared']:
     env.SharedObject(...)
 else:
     env.Object(...)
Classes [hide private]
  _ListVariable
Functions [hide private]
 
ListVariable(key, help, default, names, map={})
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, allowedElems, mapdict) source code
Variables [hide private]
  __package__ = 'SCons.Variables'
  __revision__ = 'src/engine/SCons/Variables/ListVariable.py 74b...
Function Details [hide private]

ListVariable(key, help, default, names, map={})

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 (separated by space).


Variables Details [hide private]

__revision__

Value:
'src/engine/SCons/Variables/ListVariable.py 74b2c53bc42290e911b334a6b4\
4f187da698a668 2017/11/14 13:16:53 bdbaddog'