From 405075a5b9603d5931754f3f349c7e141fa51f2c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 4 Jun 2020 23:24:48 +0300 Subject: [PATCH] Force `cheetah` to always run under Python 2.7 --- Makefile | 4 ++-- make-files | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 862279f..6cd9e82 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,10 @@ %.py: %.tmpl - umask 022; cheetah compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup $< && compyle $@ && chmod +x $@ + umask 022; python2.7 `which cheetah` compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup $< && compyle $@ && chmod +x $@ %.html: %.tmpl - umask 022; PYTHONPATH=. PYTHONIOENCODING=koi8-r:replace cheetah fill --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup --stdout $< | iconv -c -f utf-8 -t koi8-r >$@ + umask 022; PYTHONPATH=. PYTHONIOENCODING=koi8-r:replace python2.7 `which cheetah` fill --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup --stdout $< | iconv -c -f utf-8 -t koi8-r >$@ .PHONY: fast diff --git a/make-files b/make-files index ca1ac09..a43d782 100755 --- a/make-files +++ b/make-files @@ -6,7 +6,7 @@ PYTHONIOENCODING=koi8-r:replace export PYTHONPATH PYTHONIOENCODING if [ \! -e phd_site.py -o phd_site.tmpl -nt phd_site.py ]; then - cheetah compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup phd_site.tmpl && + python2.7 `which cheetah` compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup phd_site.tmpl && compyle phd_site.py fi && @@ -14,7 +14,7 @@ for tmpl in "$@"; do dir="`dirname \"$tmpl\"`" outfile="`basename \"$tmpl\" .tmpl`.html" echo "$tmpl => $dir/$outfile" - cheetah fill --encoding=koi8-r --settings='encoding="koi8-r"' \ + python2.7 `which cheetah` fill --encoding=koi8-r --settings='encoding="koi8-r"' \ --nobackup --stdout "$tmpl" | iconv -c -f utf-8 -t koi8-r >"$dir/$outfile" || exit 1 done -- 2.39.5