import addchecks
import sys, glob, os, shutil

mydir = os.path.split(sys.argv[0])[0]
libdir = os.path.split(glob.__file__)[0]
filenames = glob.glob(os.path.join(mydir, "..", "lib", "*.pyt"))

for name in filenames:
    shortname = os.path.split(name)[1]
    target = os.path.join(libdir, shortname)
    shutil.copy(name, target)
    assert target.endswith(".pyt")
    module = target[0:-1] # chop off 't' from '.pyt'
    addchecks.addchecks(module)    



