parameters: (self, name, value)
docstring: Sets an option from an SConscript file.
docstring_summary: Sets an option from an SConscript file.
docstring_tokens: Sets an option from an SConscript file .
function: def set_option(self, name, value):
          """
          Sets an option from an SConscript file.
          """
          if name not in self.settable:
              raise SCons.Errors.UserError("This option is not settable from a SConscript file: %s"%name)
  
          if name == 'num_jobs':
              try:
                  value = int(value)
                  if value < 1:
                      raise ValueError
              except ValueError:
                  raise SCons.Errors.UserError("A positive integer is required: %s"%repr(value))
          elif name == 'max_drift':
              try:
                  value = int(value)
              except ValueError:
                  raise SCons.Errors.UserError("An integer is required: %s"%repr(value))
          elif name == 'duplicate':
              try:
                  value = str(value)
              except ValueError:
                  raise SCons.Errors.UserError("A string is required: %s"%repr(value))
              if value not in SCons.Node.FS.Valid_Duplicates:
                  raise SCons.Errors.UserError("Not a valid duplication style: %s" % value)
              # Set the duplicate style right away so it can affect linking
              # of SConscript files.
              SCons.Node.FS.set_duplicate(value)
          elif name == 'diskcheck':
              try:
                  value = diskcheck_convert(value)
              except ValueError as v:
                  raise SCons.Errors.UserError("Not a valid diskcheck value: %s"%v)
              if 'diskcheck' not in self.__dict__:
                  # No --diskcheck= option was specified on the command line.
                  # Set this right away so it can affect the rest of the
                  # file/Node lookups while processing the SConscript files.
                  SCons.Node.FS.set_diskcheck(value)
          elif name == 'stack_size':
              try:
                  value = int(value)
              except ValueError:
                  raise SCons.Errors.UserError("An integer is required: %s"%repr(value))
          elif name == 'md5_chunksize':
              try:
                  value = int(value)
              except ValueError:
                  raise SCons.Errors.UserError("An integer is required: %s"%repr(value))
          elif name == 'warn':
              if SCons.Util.is_String(value):
                  value = [value]
              value = self.__SConscript_settings__.get(name, []) + value
              SCons.Warnings.process_warn_strings(value)
  
          self.__SConscript_settings__[name] = value
function_tokens: def set_option ( self , name , value ) : if name not in self . settable : raise SCons . Errors . UserError ( "This option is not settable from a SConscript file: %s" % name ) if name == 'num_jobs' : try : value = int ( value ) if value < 1 : raise ValueError except ValueError : raise SCons . Errors . UserError ( "A positive integer is required: %s" % repr ( value ) ) elif name == 'max_drift' : try : value = int ( value ) except ValueError : raise SCons . Errors . UserError ( "An integer is required: %s" % repr ( value ) ) elif name == 'duplicate' : try : value = str ( value ) except ValueError : raise SCons . Errors . UserError ( "A string is required: %s" % repr ( value ) ) if value not in SCons . Node . FS . Valid_Duplicates : raise SCons . Errors . UserError ( "Not a valid duplication style: %s" % value ) # Set the duplicate style right away so it can affect linking # of SConscript files. SCons . Node . FS . set_duplicate ( value ) elif name == 'diskcheck' : try : value = diskcheck_convert ( value ) except ValueError as v : raise SCons . Errors . UserError ( "Not a valid diskcheck value: %s" % v ) if 'diskcheck' not in self . __dict__ : # No --diskcheck= option was specified on the command line. # Set this right away so it can affect the rest of the # file/Node lookups while processing the SConscript files. SCons . Node . FS . set_diskcheck ( value ) elif name == 'stack_size' : try : value = int ( value ) except ValueError : raise SCons . Errors . UserError ( "An integer is required: %s" % repr ( value ) ) elif name == 'md5_chunksize' : try : value = int ( value ) except ValueError : raise SCons . Errors . UserError ( "An integer is required: %s" % repr ( value ) ) elif name == 'warn' : if SCons . Util . is_String ( value ) : value = [ value ] value = self . __SConscript_settings__ . get ( name , [ ] ) + value SCons . Warnings . process_warn_strings ( value ) self . __SConscript_settings__ [ name ] = value