# coding=utf-8

import shutil

def build(self):
    get_srcs = self.path.get_src().ant_glob
    env = self.all_envs[self.variant]
    if self.cmd.startswith('install'):
        try:
            shutil.rmtree(env.PYTHONDIR)
        except OSError:
            pass
    
    self(
        features = 'py',
            name = 'bibpyt',
          source = get_srcs('**/*.py'),
    install_from = '.',
    install_path = env.PYTHONDIR,
    )
