(fromfile, tofile)
| 84 | f.write(pyxcontent) |
| 85 | |
| 86 | def process_tempita_pxd(fromfile, tofile): |
| 87 | import npy_tempita as tempita |
| 88 | |
| 89 | assert fromfile.endswith('.pxd.in') |
| 90 | assert tofile.endswith('.pxd') |
| 91 | with open(fromfile) as f: |
| 92 | tmpl = f.read() |
| 93 | pyxcontent = tempita.sub(tmpl) |
| 94 | with open(tofile, "w") as f: |
| 95 | f.write(pyxcontent) |
| 96 | |
| 97 | rules = { |
| 98 | # fromext : function, toext |