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

Function process_tempita_pyx

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

Source from the content-addressed store, hash-verified

49
50
51def process_tempita_pyx(fromfile, tofile):
52 import npy_tempita as tempita
53
54 assert fromfile.endswith('.pyx.in')
55 with open(fromfile) as f:
56 tmpl = f.read()
57 pyxcontent = tempita.sub(tmpl)
58 pyxfile = fromfile[:-len('.pyx.in')] + '.pyx'
59 with open(pyxfile, "w") as f:
60 f.write(pyxcontent)
61 process_pyx(pyxfile, tofile)
62
63
64def process_tempita_pyd(fromfile, tofile):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected