Skip to content

Commit

Permalink
make template generation python2 compatible #3
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed May 8, 2024
1 parent 81d5af4 commit b57591f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/build_config/templates.py
Expand Up @@ -28,6 +28,7 @@
import os
import re
import subprocess
import io
from os.path import dirname, join
from glob import glob

Expand Down Expand Up @@ -404,7 +405,7 @@ def main():
toolDir = join(dirname(__file__), '..')
if not os.path.exists("templates.h") or checkMod(toolDir, "templates.h"):
# write templates.h
with open("templates.h", 'w', encoding='utf8') as templateHeaderFile:
with io.open("templates.h", 'w', encoding='utf8') as templateHeaderFile:
buildTemplateToolHeader(templateHeaderFile)
is_debug = sys.argv[1].endswith("D") or sys.argv[1].endswith("D.exe")
print("const std::vector<TemplateTool> templateTools {\n", file=templateHeaderFile)
Expand Down

0 comments on commit b57591f

Please sign in to comment.