# Path: waflib/TaskGen.py
# HEADER_EXTS = ['.h', '.hpp', '.hxx', '.hh']
# class task_gen(object):
# class subst_pc(Task.Task):
# class subst(subst_pc):
# 	def __init__(self, *k, **kw):
# 	def __str__(self):
# 	def __repr__(self):
# 	def get_cwd(self):
# 	def get_name(self):
# 	def set_name(self, name):
# 	def to_list(self, val):
# 	def post(self):
# 	def get_hook(self, node):
# 	def create_task(self, name, src=None, tgt=None, **kw):
# 	def clone(self, env):
# def declare_chain(name='', rule=None, reentrant=None, color='BLUE',
# 	ext_in=[], ext_out=[], before=[], after=[], decider=None, scan=None, install_path=None, shell=False):
# 	def x_file(self, node):
# def taskgen_method(func):
# def feature(*k):
# 	def deco(func):
# def before_method(*k):
# 	def deco(func):
# def after_method(*k):
# 	def deco(func):
# def extension(*k):
# 	def deco(func):
# def to_nodes(self, lst, path=None):
# def process_source(self):
# def process_rule(self):
# 			def chmod_fun(tsk):
# 			def scan(self):
# def sequence_order(self):
# 	def force_permissions(self):
# 	def run(self):
# 		def repl(match):
# 	def sig_vars(self):
# def add_pcfile(self, node):
# def process_subst(self):


import os, shutil
from waflib import Errors, Task, TaskGen, Utils, Node, Logs
#! /usr/bin/env python
# encoding: utf-8
# Calle Rosenquist, 2017 (xbreak)
"""
Create task that copies source files to the associated build node.
This is useful to e.g. construct a complete Python package so it can be unit tested
without installation.

Source files to be copied can be specified either in `buildcopy_source` attribute, or
`source` attribute. If both are specified `buildcopy_source` has priority.

Examples::

	def build(bld):
		bld(name             = 'bar',
			features         = 'py buildcopy',
			source           = bld.path.ant_glob('src/bar/*.py'))

		bld(name             = 'py baz',
			features         = 'buildcopy',
			buildcopy_source = bld.path.ant_glob('src/bar/*.py') + ['src/bar/resource.txt'])

"""

@TaskGen.before_method('process_source')

# Path: waflib/TaskGen.py
# HEADER_EXTS = ['.h', '.hpp', '.hxx', '.hh']
# class task_gen(object):
# class subst_pc(Task.Task):
# class subst(subst_pc):
# 	def __init__(self, *k, **kw):
# 	def __str__(self):
# 	def __repr__(self):
# 	def get_cwd(self):
# 	def get_name(self):
# 	def set_name(self, name):
# 	def to_list(self, val):
# 	def post(self):
# 	def get_hook(self, node):
# 	def create_task(self, name, src=None, tgt=None, **kw):
# 	def clone(self, env):
# def declare_chain(name='', rule=None, reentrant=None, color='BLUE',
# 	ext_in=[], ext_out=[], before=[], after=[], decider=None, scan=None, install_path=None, shell=False):
# 	def x_file(self, node):
# def taskgen_method(func):
# def feature(*k):
# 	def deco(func):
# def before_method(*k):
# 	def deco(func):
# def after_method(*k):
# 	def deco(func):
# def extension(*k):
# 	def deco(func):
# def to_nodes(self, lst, path=None):
# def process_source(self):
# def process_rule(self):
# 			def chmod_fun(tsk):
# 			def scan(self):
# def sequence_order(self):
# 	def force_permissions(self):
# 	def run(self):
# 		def repl(match):
# 	def sig_vars(self):
# def add_pcfile(self, node):
# def process_subst(self):


# Path: waflib/extras/buildcopy.py
import os, shutil
from waflib import Errors, Task, TaskGen, Utils, Node, Logs

#! /usr/bin/env python
# encoding: utf-8
# Calle Rosenquist, 2017 (xbreak)
"""
Create task that copies source files to the associated build node.
This is useful to e.g. construct a complete Python package so it can be unit tested
without installation.

Source files to be copied can be specified either in `buildcopy_source` attribute, or
`source` attribute. If both are specified `buildcopy_source` has priority.

Examples::

	def build(bld):
		bld(name             = 'bar',
			features         = 'py buildcopy',
			source           = bld.path.ant_glob('src/bar/*.py'))

		bld(name             = 'py baz',
			features         = 'buildcopy',
			buildcopy_source = bld.path.ant_glob('src/bar/*.py') + ['src/bar/resource.txt'])

"""

@TaskGen.before_method('process_source')

@TaskGen.feature('buildcopy')