# Path: waflib/TaskGen.py
# def extension(*k):
# 	"""
# 	Decorator that registers a task generator method which will be invoked during
# 	the processing of source files for the extension given::
# 
# 		from waflib import Task
# 		class mytask(Task):
# 			run_str = 'cp ${SRC} ${TGT}'
# 		@extension('.moo')
# 		def create_maa_file(self, node):
# 			self.create_task('mytask', node, node.change_ext('.maa'))
# 		def build(bld):
# 			bld(source='foo.moo')
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for x in k:
# 			task_gen.mappings[x] = func
# 		return func
# 	return deco
# 
# def before_method(*k):
# 	"""
# 	Decorator that registera task generator method which will be executed
# 	before the functions of given name(s)::
# 
# 		from waflib.TaskGen import feature, before
# 		@feature('myfeature')
# 		@before_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[func.__name__].add(fun_name)
# 		return func
# 	return deco
# 
# 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


import os, sys
from waflib import Errors, Logs, Node, Options, Task, Utils
from waflib.TaskGen import extension, before_method, after_method, feature
from waflib.Configure import conf
		from distutils.msvccompiler import MSVCCompiler
		from distutils.version import LooseVersion
		if self.install_path:
			self.add_install_files(install_to=os.path.dirname(pyd), install_from=pyobj, cwd=node.parent.get_bld(), relative_trick=relative_trick)

class pyc(Task.Task):
	"""
	Byte-compiling python files
	"""
	color = 'PINK'
	def __str__(self):
		node = self.outputs[0]
		return node.path_from(node.ctx.launch_node())
	def run(self):
		cmd = [Utils.subst_vars('${PYTHON}', self.env), '-c', INST, self.inputs[0].abspath(), self.outputs[0].abspath(), self.pyd]
		ret = self.generator.bld.exec_command(cmd)
		return ret

class pyo(Task.Task):
	"""
	Byte-compiling python files
	"""
	color = 'PINK'
	def __str__(self):
		node = self.outputs[0]
		return node.path_from(node.ctx.launch_node())
	def run(self):
		cmd = [Utils.subst_vars('${PYTHON}', self.env), Utils.subst_vars('${PYFLAGS_OPT}', self.env), '-c', INST, self.inputs[0].abspath(), self.outputs[0].abspath(), self.pyd]
		ret = self.generator.bld.exec_command(cmd)
		return ret

@feature('pyext')

# Path: waflib/TaskGen.py
# def extension(*k):
# 	"""
# 	Decorator that registers a task generator method which will be invoked during
# 	the processing of source files for the extension given::
# 
# 		from waflib import Task
# 		class mytask(Task):
# 			run_str = 'cp ${SRC} ${TGT}'
# 		@extension('.moo')
# 		def create_maa_file(self, node):
# 			self.create_task('mytask', node, node.change_ext('.maa'))
# 		def build(bld):
# 			bld(source='foo.moo')
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for x in k:
# 			task_gen.mappings[x] = func
# 		return func
# 	return deco
# 
# def before_method(*k):
# 	"""
# 	Decorator that registera task generator method which will be executed
# 	before the functions of given name(s)::
# 
# 		from waflib.TaskGen import feature, before
# 		@feature('myfeature')
# 		@before_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[func.__name__].add(fun_name)
# 		return func
# 	return deco
# 
# 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/python.py
import os, sys
from waflib import Errors, Logs, Node, Options, Task, Utils
from waflib.TaskGen import extension, before_method, after_method, feature
from waflib.Configure import conf
		from distutils.msvccompiler import MSVCCompiler
		from distutils.version import LooseVersion

		if self.install_path:
			self.add_install_files(install_to=os.path.dirname(pyd), install_from=pyobj, cwd=node.parent.get_bld(), relative_trick=relative_trick)

class pyc(Task.Task):
	"""
	Byte-compiling python files
	"""
	color = 'PINK'
	def __str__(self):
		node = self.outputs[0]
		return node.path_from(node.ctx.launch_node())
	def run(self):
		cmd = [Utils.subst_vars('${PYTHON}', self.env), '-c', INST, self.inputs[0].abspath(), self.outputs[0].abspath(), self.pyd]
		ret = self.generator.bld.exec_command(cmd)
		return ret

class pyo(Task.Task):
	"""
	Byte-compiling python files
	"""
	color = 'PINK'
	def __str__(self):
		node = self.outputs[0]
		return node.path_from(node.ctx.launch_node())
	def run(self):
		cmd = [Utils.subst_vars('${PYTHON}', self.env), Utils.subst_vars('${PYFLAGS_OPT}', self.env), '-c', INST, self.inputs[0].abspath(), self.outputs[0].abspath(), self.pyd]
		ret = self.generator.bld.exec_command(cmd)
		return ret

@feature('pyext')

@before_method('propagate_uselib_vars', 'apply_link')