MCPcopy Create free account
hub / github.com/numpy/numpy / process_tempita_pxd

Function process_tempita_pxd

tools/cythonize.py:86–95  ·  view source on GitHub ↗
(fromfile, tofile)

Source from the content-addressed store, hash-verified

84 f.write(pyxcontent)
85
86def 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
97rules = {
98 # fromext : function, toext

Callers

nothing calls this directly

Calls 4

openFunction · 0.85
endswithMethod · 0.80
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected