parameters: (self, **kw)
docstring: Instance of :py:class:`waflib.Options.opt_parser`
docstring_summary: Instance of :py:class:`waflib.Options.opt_parser`
docstring_tokens: Instance of : py : class : waflib . Options . opt_parser
function: def __init__(self, **kw):
  		super(OptionsContext, self).__init__(**kw)
  
  		self.parser = opt_parser(self)
  		"""Instance of :py:class:`waflib.Options.opt_parser`"""
  
  		self.option_groups = {}
  
  		jobs = self.jobs()
  		p = self.add_option
  		color = os.environ.get('NOCOLOR', '') and 'no' or 'auto'
  		if os.environ.get('CLICOLOR', '') == '0':
  			color = 'no'
  		elif os.environ.get('CLICOLOR_FORCE', '') == '1':
  			color = 'yes'
  		p('-c', '--color',    dest='colors',  default=color, action='store', help='whether to use colors (yes/no/auto) [default: auto]', choices=('yes', 'no', 'auto'))
  		p('-j', '--jobs',     dest='jobs',    default=jobs,  type='int', help='amount of parallel jobs (%r)' % jobs)
  		p('-k', '--keep',     dest='keep',    default=0,     action='count', help='continue despite errors (-kk to try harder)')
  		p('-v', '--verbose',  dest='verbose', default=0,     action='count', help='verbosity level -v -vv or -vvv [default: 0]')
  		p('--zones',          dest='zones',   default='',    action='store', help='debugging zones (task_gen, deps, tasks, etc)')
  		p('--profile',        dest='profile', default=0,     action='store_true', help=optparse.SUPPRESS_HELP)
  		p('--pdb',            dest='pdb',     default=0,     action='store_true', help=optparse.SUPPRESS_HELP)
  		p('-h', '--help',     dest='whelp',   default=0,     action='store_true', help="show this help message and exit")
  
  		gr = self.add_option_group('Configuration options')
  		self.option_groups['configure options'] = gr
  
  		gr.add_option('-o', '--out', action='store', default='', help='build dir for the project', dest='out')
  		gr.add_option('-t', '--top', action='store', default='', help='src dir for the project', dest='top')
  
  		gr.add_option('--no-lock-in-run', action='store_true', default='', help=optparse.SUPPRESS_HELP, dest='no_lock_in_run')
  		gr.add_option('--no-lock-in-out', action='store_true', default='', help=optparse.SUPPRESS_HELP, dest='no_lock_in_out')
  		gr.add_option('--no-lock-in-top', action='store_true', default='', help=optparse.SUPPRESS_HELP, dest='no_lock_in_top')
  
  		default_prefix = getattr(Context.g_module, 'default_prefix', os.environ.get('PREFIX'))
  		if not default_prefix:
  			if Utils.unversioned_sys_platform() == 'win32':
  				d = tempfile.gettempdir()
  				default_prefix = d[0].upper() + d[1:]
  				# win32 preserves the case, but gettempdir does not
  			else:
  				default_prefix = '/usr/local/'
  		gr.add_option('--prefix', dest='prefix', default=default_prefix, help='installation prefix [default: %r]' % default_prefix)
  		gr.add_option('--bindir', dest='bindir', help='bindir')
  		gr.add_option('--libdir', dest='libdir', help='libdir')
  
  		gr = self.add_option_group('Build and installation options')
  		self.option_groups['build and install options'] = gr
  		gr.add_option('-p', '--progress', dest='progress_bar', default=0, action='count', help= '-p: progress bar; -pp: ide output')
  		gr.add_option('--targets',        dest='targets', default='', action='store', help='task generators, e.g. "target1,target2"')
  
  		gr = self.add_option_group('Step options')
  		self.option_groups['step options'] = gr
  		gr.add_option('--files',          dest='files', default='', action='store', help='files to process, by regexp, e.g. "*/main.c,*/test/main.o"')
  
  		default_destdir = os.environ.get('DESTDIR', '')
  
  		gr = self.add_option_group('Installation and uninstallation options')
  		self.option_groups['install/uninstall options'] = gr
  		gr.add_option('--destdir', help='installation root [default: %r]' % default_destdir, default=default_destdir, dest='destdir')
  		gr.add_option('-f', '--force', dest='force', default=False, action='store_true', help='force file installation')
  		gr.add_option('--distcheck-args', metavar='ARGS', help='arguments to pass to distcheck', default=None, action='store')
function_tokens: def __init__ ( self , * * kw ) : super ( OptionsContext , self ) . __init__ ( * * kw ) self . parser = opt_parser ( self ) self . option_groups = { } jobs = self . jobs ( ) p = self . add_option color = os . environ . get ( 'NOCOLOR' , '' ) and 'no' or 'auto' if os . environ . get ( 'CLICOLOR' , '' ) == '0' : color = 'no' elif os . environ . get ( 'CLICOLOR_FORCE' , '' ) == '1' : color = 'yes' p ( '-c' , '--color' , dest = 'colors' , default = color , action = 'store' , help = 'whether to use colors (yes/no/auto) [default: auto]' , choices = ( 'yes' , 'no' , 'auto' ) ) p ( '-j' , '--jobs' , dest = 'jobs' , default = jobs , type = 'int' , help = 'amount of parallel jobs (%r)' % jobs ) p ( '-k' , '--keep' , dest = 'keep' , default = 0 , action = 'count' , help = 'continue despite errors (-kk to try harder)' ) p ( '-v' , '--verbose' , dest = 'verbose' , default = 0 , action = 'count' , help = 'verbosity level -v -vv or -vvv [default: 0]' ) p ( '--zones' , dest = 'zones' , default = '' , action = 'store' , help = 'debugging zones (task_gen, deps, tasks, etc)' ) p ( '--profile' , dest = 'profile' , default = 0 , action = 'store_true' , help = optparse . SUPPRESS_HELP ) p ( '--pdb' , dest = 'pdb' , default = 0 , action = 'store_true' , help = optparse . SUPPRESS_HELP ) p ( '-h' , '--help' , dest = 'whelp' , default = 0 , action = 'store_true' , help = "show this help message and exit" ) gr = self . add_option_group ( 'Configuration options' ) self . option_groups [ 'configure options' ] = gr gr . add_option ( '-o' , '--out' , action = 'store' , default = '' , help = 'build dir for the project' , dest = 'out' ) gr . add_option ( '-t' , '--top' , action = 'store' , default = '' , help = 'src dir for the project' , dest = 'top' ) gr . add_option ( '--no-lock-in-run' , action = 'store_true' , default = '' , help = optparse . SUPPRESS_HELP , dest = 'no_lock_in_run' ) gr . add_option ( '--no-lock-in-out' , action = 'store_true' , default = '' , help = optparse . SUPPRESS_HELP , dest = 'no_lock_in_out' ) gr . add_option ( '--no-lock-in-top' , action = 'store_true' , default = '' , help = optparse . SUPPRESS_HELP , dest = 'no_lock_in_top' ) default_prefix = getattr ( Context . g_module , 'default_prefix' , os . environ . get ( 'PREFIX' ) ) if not default_prefix : if Utils . unversioned_sys_platform ( ) == 'win32' : d = tempfile . gettempdir ( ) default_prefix = d [ 0 ] . upper ( ) + d [ 1 : ] # win32 preserves the case, but gettempdir does not else : default_prefix = '/usr/local/' gr . add_option ( '--prefix' , dest = 'prefix' , default = default_prefix , help = 'installation prefix [default: %r]' % default_prefix ) gr . add_option ( '--bindir' , dest = 'bindir' , help = 'bindir' ) gr . add_option ( '--libdir' , dest = 'libdir' , help = 'libdir' ) gr = self . add_option_group ( 'Build and installation options' ) self . option_groups [ 'build and install options' ] = gr gr . add_option ( '-p' , '--progress' , dest = 'progress_bar' , default = 0 , action = 'count' , help = '-p: progress bar; -pp: ide output' ) gr . add_option ( '--targets' , dest = 'targets' , default = '' , action = 'store' , help = 'task generators, e.g. "target1,target2"' ) gr = self . add_option_group ( 'Step options' ) self . option_groups [ 'step options' ] = gr gr . add_option ( '--files' , dest = 'files' , default = '' , action = 'store' , help = 'files to process, by regexp, e.g. "*/main.c,*/test/main.o"' ) default_destdir = os . environ . get ( 'DESTDIR' , '' ) gr = self . add_option_group ( 'Installation and uninstallation options' ) self . option_groups [ 'install/uninstall options' ] = gr gr . add_option ( '--destdir' , help = 'installation root [default: %r]' % default_destdir , default = default_destdir , dest = 'destdir' ) gr . add_option ( '-f' , '--force' , dest = 'force' , default = False , action = 'store_true' , help = 'force file installation' ) gr . add_option ( '--distcheck-args' , metavar = 'ARGS' , help = 'arguments to pass to distcheck' , default = None , action = 'store' )