³ò ”,9Mc@sÇdZdZddkZddkZddkZddkZddkZddk Zddk Zddk l Z ddk l Z ddk l Z ddklZddklZd d d „ƒYZdS( sŠengine.SCons.Variables This file defines the Variables class that is used to add user-friendly customizable variables to an SCons build. sEsrc/engine/SCons/Variables/__init__.py 4629 2010/01/17 22:23:21 sconsiÿÿÿÿN(t BoolVariable(t EnumVariable(t ListVariable(tPackageVariable(t PathVariablet VariablescBsžeZdZghdd„Zddddd„Zd„Zddddd„Zd„Zdd„Z d„Z d „Z dd „Z d Z d Zgd „ZRS(icCs„g|_||_tii|ƒp|o |g}qCg}n||_h|_|o$ti}tip |t_q€ndS(sà files - [optional] List of option configuration files to load (backward compatibility) If a single string is passed it is automatically placed in a file list N( toptionstargstSConstUtiltis_ListtfilestunknownRtinstance(tselfR Rt is_global((s=install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.pyt__init__7s        tc Csõddd„ƒY}|ƒ}tii|ƒptii|ƒo|d|_|d|_n||_|g|_||_||_||_||_ |i i |ƒxEt |iƒ|igD]*}||i iƒjo|i |=qÃqÃWdS(NtVariablecBseZRS((t__name__t __module__(((s=install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.pyROsii((RR R tis_Tupletkeytaliasesthelptdefaultt validatort converterRtappendtlistR tkeys( RRRRRRRtoptiontalias((s=install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.pyt_do_addNs  &       cCstd„|iƒS(s6 Returns the keywords for the options cSs|iS((R(to((s=install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.pytos(tmapR(R((s=install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.pyRkscKs¦tii|ƒpt|ƒtdƒjot|i|ƒdSntii|ƒ ptii|ƒ oti i dt |ƒ‚n|i|||||ƒdS(sß Add an option. key - the name of the variable, or a list or tuple of arguments help - optional help text for the options default - optional default value validator - optional function that is called to validate the option's value Called with (key, value, environment) converter - optional function that is called to convert the option's value before putting it in the environment. Ns Illegal Variables.Add() key `%s'(( RR R ttypetapplyR!t is_Stringt Environmenttis_valid_construction_vartErrorst UserErrortstr(RRRRRRtkw((s=install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.pytAddqs ,cGs%x|D]}t|i|ƒqWdS(s‹ Add a list of options. Each list element is a tuple/list of arguments to be passed on to the underlying method for adding options. Example: opt.AddVariables( ('debug', '', 0), ('CC', 'The C compiler'), ('VALIDATE', 'An option for testing validation', 'notset', validator, None), ) N(R&R!(RtoptlistR"((s=install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.pyt AddVariablesˆsc Bsýh}x5|iD]*}|idj o|i||is