#!/usr/bin/python

import os
import pprint
files = {}
for libfilename in os.listdir("."):
    if not( libfilename.endswith("cpp") or libfilename.endswith("hpp")):
        continue
    print("OK, Adding libfilename", libfilename)

    f = open(libfilename)
    source = f.read()
    f.close()
    files[libfilename]=source


template = """\
#!/usr/bin/python

#
# Note: This file is autogenerated from clib, using clib/mk_py_clib.py and the C++ files.
# Make edits there not here - changes here will be overwritten!
#
files = %s

"""

print("Deploying into ../pyxie/codegen/clib.py")
clib = template % repr(files)
d = open("../pyxie/codegen/clib.py","w")
d.write(clib)
d.close()