# Path: waflib/TaskGen.py
# def after_method(*k):
# 	"""
# 	Decorator that registers a task generator method which will be executed
# 	after the functions of given name(s)::
# 
# 		from waflib.TaskGen import feature, after
# 		@feature('myfeature')
# 		@after_method('fun2')
# 		def fun1(self):
# 			print('feature 1!')
# 		@feature('myfeature')
# 		def fun2(self):
# 			print('feature 2!')
# 		def build(bld):
# 			bld(features='myfeature')
# 
# 	:param k: method names
# 	:type k: list of string
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for fun_name in k:
# 			task_gen.prec[fun_name].add(func.__name__)
# 		return func
# 	return deco
# 
# def feature(*k):
# 	"""
# 	Decorator that registers a task generator method that will be executed when the
# 	object attribute ``feature`` contains the corresponding key(s)::
# 
# 		from waflib.Task import feature
# 		@feature('myfeature')
# 		def myfunction(self):
# 			print('that is my feature!')
# 		def build(bld):
# 			bld(features='myfeature')
# 
# 	:param k: feature names
# 	:type k: list of string
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for name in k:
# 			feats[name].update([func.__name__])
# 		return func
# 	return deco
# 
# Path: waflib/Configure.py
# def conf(f):
# 	"""
# 	Decorator: attach new configuration functions to :py:class:`waflib.Build.BuildContext` and
# 	:py:class:`waflib.Configure.ConfigurationContext`. The methods bound will accept a parameter
# 	named 'mandatory' to disable the configuration errors::
# 
# 		def configure(conf):
# 			conf.find_program('abc', mandatory=False)
# 
# 	:param f: method to bind
# 	:type f: function
# 	"""
# 	def fun(*k, **kw):
# 		mandatory = kw.pop('mandatory', True)
# 		try:
# 			return f(*k, **kw)
# 		except Errors.ConfigurationError:
# 			if mandatory:
# 				raise
# 
# 	fun.__name__ = f.__name__
# 	setattr(ConfigurationContext, f.__name__, fun)
# 	setattr(Build.BuildContext, f.__name__, fun)
# 	return f
# 
# Path: waflib/Tools/ccroot.py
# SYSTEM_LIB_PATHS = ['/usr/lib64', '/usr/lib', '/usr/local/lib64', '/usr/local/lib']
# USELIB_VARS = Utils.defaultdict(set)
# def create_compiled_task(self, name, node):
# def to_incnodes(self, inlst):
# def apply_incpaths(self):
# 	def add_target(self, target):
# 	def exec_command(self, *k, **kw):
# 	def exec_mf(self):
# def rm_tgt(cls):
# 	def wrap(self):
# def apply_skip_stlib_link_deps(self):
# def apply_link(self):
# def use_rec(self, name, **kw):
# def process_use(self):
# def accept_node_to_link(self, node):
# def add_objects_from_tgen(self, tg):
# def get_uselib_vars(self):
# def propagate_uselib_vars(self):
# def apply_implib(self):
# def apply_vnum(self):
# 	def keyword(self):
# 	def run(self):
# 	def runnable_status(self):
# 	def runnable_status(self):
# def read_shlib(self, name, paths=[], export_includes=[], export_defines=[]):
# def read_stlib(self, name, paths=[], export_includes=[], export_defines=[]):
# def process_lib(self):
# 	def runnable_status(self):
# def add_those_o_files(self, node):
# def process_objs(self):
# def read_object(self, obj):
# def set_full_paths_hpux(self):
# class link_task(Task.Task):
# class stlink_task(link_task):
# class vnum(Task.Task):
# class fake_shlib(link_task):
# class fake_stlib(stlink_task):
# class fake_o(Task.Task):


import os, sys, re, traceback
		import json
from waflib import Utils, Logs, Options, Errors
from waflib.TaskGen import after_method, feature
from waflib.Configure import conf
from waflib.Tools import ccroot, c, cxx, ar
	else:
		# assumes CL.exe
		compiler_name = 'CL'
		linker_name = 'LINK'
		lib_name = 'LIB'
	return compiler_name, linker_name, lib_name

@conf
def find_msvc(conf):
	"""Due to path format limitations, limit operation only to native Win32. Yeah it sucks."""
	if sys.platform == 'cygwin':
		conf.fatal('MSVC module does not work under cygwin Python!')

	# the autodetection is supposed to be performed before entering in this method
	v = conf.env
	path = v.PATH
	compiler = v.MSVC_COMPILER
	version = v.MSVC_VERSION

	compiler_name, linker_name, lib_name = _get_prog_names(conf, compiler)
	v.MSVC_MANIFEST = (compiler == 'msvc' and version >= 8) or (compiler == 'wsdk' and version >= 6) or (compiler == 'intel' and version >= 11)

	# compiler
	cxx = conf.find_program(compiler_name, var='CXX', path_list=path)

	# before setting anything, check if the compiler is really msvc
	env = dict(conf.environ)
	if path:
		env.update(PATH = ';'.join(path))
	if not conf.cmd_and_log(cxx + ['/nologo', '/help'], env=env):

# Path: waflib/TaskGen.py
# def after_method(*k):
# 	"""
# 	Decorator that registers a task generator method which will be executed
# 	after the functions of given name(s)::
# 
# 		from waflib.TaskGen import feature, after
# 		@feature('myfeature')
# 		@after_method('fun2')
# 		def fun1(self):
# 			print('feature 1!')
# 		@feature('myfeature')
# 		def fun2(self):
# 			print('feature 2!')
# 		def build(bld):
# 			bld(features='myfeature')
# 
# 	:param k: method names
# 	:type k: list of string
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for fun_name in k:
# 			task_gen.prec[fun_name].add(func.__name__)
# 		return func
# 	return deco
# 
# def feature(*k):
# 	"""
# 	Decorator that registers a task generator method that will be executed when the
# 	object attribute ``feature`` contains the corresponding key(s)::
# 
# 		from waflib.Task import feature
# 		@feature('myfeature')
# 		def myfunction(self):
# 			print('that is my feature!')
# 		def build(bld):
# 			bld(features='myfeature')
# 
# 	:param k: feature names
# 	:type k: list of string
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for name in k:
# 			feats[name].update([func.__name__])
# 		return func
# 	return deco
# 
# Path: waflib/Configure.py
# def conf(f):
# 	"""
# 	Decorator: attach new configuration functions to :py:class:`waflib.Build.BuildContext` and
# 	:py:class:`waflib.Configure.ConfigurationContext`. The methods bound will accept a parameter
# 	named 'mandatory' to disable the configuration errors::
# 
# 		def configure(conf):
# 			conf.find_program('abc', mandatory=False)
# 
# 	:param f: method to bind
# 	:type f: function
# 	"""
# 	def fun(*k, **kw):
# 		mandatory = kw.pop('mandatory', True)
# 		try:
# 			return f(*k, **kw)
# 		except Errors.ConfigurationError:
# 			if mandatory:
# 				raise
# 
# 	fun.__name__ = f.__name__
# 	setattr(ConfigurationContext, f.__name__, fun)
# 	setattr(Build.BuildContext, f.__name__, fun)
# 	return f
# 
# Path: waflib/Tools/ccroot.py
# SYSTEM_LIB_PATHS = ['/usr/lib64', '/usr/lib', '/usr/local/lib64', '/usr/local/lib']
# USELIB_VARS = Utils.defaultdict(set)
# def create_compiled_task(self, name, node):
# def to_incnodes(self, inlst):
# def apply_incpaths(self):
# 	def add_target(self, target):
# 	def exec_command(self, *k, **kw):
# 	def exec_mf(self):
# def rm_tgt(cls):
# 	def wrap(self):
# def apply_skip_stlib_link_deps(self):
# def apply_link(self):
# def use_rec(self, name, **kw):
# def process_use(self):
# def accept_node_to_link(self, node):
# def add_objects_from_tgen(self, tg):
# def get_uselib_vars(self):
# def propagate_uselib_vars(self):
# def apply_implib(self):
# def apply_vnum(self):
# 	def keyword(self):
# 	def run(self):
# 	def runnable_status(self):
# 	def runnable_status(self):
# def read_shlib(self, name, paths=[], export_includes=[], export_defines=[]):
# def read_stlib(self, name, paths=[], export_includes=[], export_defines=[]):
# def process_lib(self):
# 	def runnable_status(self):
# def add_those_o_files(self, node):
# def process_objs(self):
# def read_object(self, obj):
# def set_full_paths_hpux(self):
# class link_task(Task.Task):
# class stlink_task(link_task):
# class vnum(Task.Task):
# class fake_shlib(link_task):
# class fake_stlib(stlink_task):
# class fake_o(Task.Task):


# Path: waflib/Tools/msvc.py
import os, sys, re, traceback
		import json
from waflib import Utils, Logs, Options, Errors
from waflib.TaskGen import after_method, feature
from waflib.Configure import conf
from waflib.Tools import ccroot, c, cxx, ar

	else:
		# assumes CL.exe
		compiler_name = 'CL'
		linker_name = 'LINK'
		lib_name = 'LIB'
	return compiler_name, linker_name, lib_name

@conf
def find_msvc(conf):
	"""Due to path format limitations, limit operation only to native Win32. Yeah it sucks."""
	if sys.platform == 'cygwin':
		conf.fatal('MSVC module does not work under cygwin Python!')

	# the autodetection is supposed to be performed before entering in this method
	v = conf.env
	path = v.PATH
	compiler = v.MSVC_COMPILER
	version = v.MSVC_VERSION

	compiler_name, linker_name, lib_name = _get_prog_names(conf, compiler)
	v.MSVC_MANIFEST = (compiler == 'msvc' and version >= 8) or (compiler == 'wsdk' and version >= 6) or (compiler == 'intel' and version >= 11)

	# compiler
	cxx = conf.find_program(compiler_name, var='CXX', path_list=path)

	# before setting anything, check if the compiler is really msvc
	env = dict(conf.environ)
	if path:
		env.update(PATH = ';'.join(path))
	if not conf.cmd_and_log(cxx + ['/nologo', '/help'], env=env):

		conf.fatal('the msvc compiler could not be identified')