use $(PYTHON) for running jinja2
use std's isnan/isinf