Port SCons scripts to py3k (xantares/py3k PR)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7124 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2019-10-06 16:15:14 +00:00
parent 2b18e58040
commit d8eb1c60bb
4 changed files with 25 additions and 26 deletions

View file

@ -50,8 +50,8 @@ chapters = 5
appendices = 9
htmls = Split('IndexPage.html Contents.html') \
+ map(lambda ch: 'Chapter' + str(ch + 1) + '.html', range(chapters)) \
+ map(lambda ap: 'Appendix' + chr(ord('A') + ap) + '.html', range(appendices))
+ list(map(lambda ch: 'Chapter' + str(ch + 1) + '.html', range(chapters))) \
+ list(map(lambda ap: 'Appendix' + chr(ord('A') + ap) + '.html', range(appendices)))
docsdefault_install_basepath = 'Docs'
@ -137,7 +137,7 @@ def docs_fixer(target, source, env):
data = open(html.path,'rb').read()
for pat, repl in fixes.items():
data = re.sub(env.subst(pat), env.subst(repl), data)
data = re.sub(env.subst(pat).encode(), env.subst(repl).encode(), data)
open(html.path, 'wb').write(data)