From 4c877be5fc4075595e15b4a451f76e128376de00 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Mon, 19 Sep 2016 23:47:09 -0400 Subject: [PATCH] BUG: Assert fromfile ending earlier in pyx processing --- tools/cythonize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cythonize.py b/tools/cythonize.py index 4ab10a058323..2db0cbd52694 100755 --- a/tools/cythonize.py +++ b/tools/cythonize.py @@ -91,10 +91,10 @@ def process_tempita_pyx(fromfile, tofile): except ImportError: raise Exception('Building %s requires Tempita: ' 'pip install --user Tempita' % VENDOR) + assert fromfile.endswith('.pyx.in') with open(fromfile, "r") as f: tmpl = f.read() pyxcontent = tempita.sub(tmpl) - assert fromfile.endswith('.pyx.in') pyxfile = fromfile[:-len('.pyx.in')] + '.pyx' with open(pyxfile, "w") as f: f.write(pyxcontent)