Made build with scons 3.0.0 work fixing issue #2093
This commit is contained in:
parent
07ec034031
commit
a180e09bb6
3 changed files with 9 additions and 9 deletions
|
@ -17,7 +17,7 @@ from os import access, F_OK
|
|||
# Warn user of current set of build options.
|
||||
AddOption('--option-cache', dest='option_cache', nargs=1, type = 'string', action = 'store', metavar = 'FILE', help='file with cached construction variables', default = '.scons-option-cache')
|
||||
if os.path.exists(GetOption("option_cache")):
|
||||
optfile = file(GetOption("option_cache"))
|
||||
optfile = open(GetOption("option_cache"))
|
||||
print("Saved options: {}".format(optfile.read().replace("\n", ", ")[:-2]))
|
||||
optfile.close()
|
||||
|
||||
|
@ -26,7 +26,7 @@ if os.path.exists(GetOption("option_cache")):
|
|||
#
|
||||
|
||||
config_h_re = re.compile(r"^.*#define\s*(\S*)\s*\"(\S*)\".*$", re.MULTILINE)
|
||||
build_config = dict( config_h_re.findall(File("src/wesconfig.h").get_contents()) )
|
||||
build_config = dict( config_h_re.findall(File("src/wesconfig.h").get_contents().decode("utf-8")) )
|
||||
try:
|
||||
version = build_config["VERSION"]
|
||||
print("Building Wesnoth version %s" % version)
|
||||
|
@ -231,7 +231,7 @@ specifying --option-cache=FILE command line argument. Current option values can
|
|||
|
||||
If you set CXXFLAGS and/or LDFLAGS in the environment, the values will
|
||||
be appended to the appropriate variables within scons.
|
||||
""" + opts.GenerateHelpText(env, sort=cmp))
|
||||
""" + opts.GenerateHelpText(env))
|
||||
|
||||
if GetOption("help"):
|
||||
Return()
|
||||
|
@ -619,7 +619,7 @@ def CopyFilter(fn):
|
|||
|
||||
env["copy_filter"] = CopyFilter
|
||||
|
||||
linguas = Split(File("po/LINGUAS").get_contents())
|
||||
linguas = Split(File("po/LINGUAS").get_contents().decode("utf-8"))
|
||||
|
||||
def InstallManpages(env, component):
|
||||
env.InstallData("mandir", component, os.path.join("doc", "man", component + ".6"), "man6")
|
||||
|
|
|
@ -4,7 +4,7 @@ from subprocess import Popen, PIPE
|
|||
import os, shutil
|
||||
import re
|
||||
from fnmatch import fnmatch
|
||||
from os.path import join, walk
|
||||
from os.path import join
|
||||
Import("env")
|
||||
|
||||
def remove_pot_cdate(path):
|
||||
|
@ -33,13 +33,13 @@ if "pot-update" in COMMAND_LINE_TARGETS:
|
|||
def fill_source_list(arg, dir, files):
|
||||
for file in files:
|
||||
if fnmatch(file, "*.[hc]pp"):
|
||||
match = re.search('^#define\\s+GETTEXT_DOMAIN\\s+"wesnoth(-.*)"', Dir(dir).File(file).get_contents(), re.MULTILINE)
|
||||
match = re.search('^#define\\s+GETTEXT_DOMAIN\\s+"wesnoth(-.*)"', Dir(dir).File(file).get_contents().decode("utf-8"), re.MULTILINE)
|
||||
if match:
|
||||
source_domain = match.group(1)
|
||||
else:
|
||||
source_domain = ""
|
||||
domain_sources[source_domain].append(Dir(dir).File(file).path)
|
||||
walk("../src", fill_source_list, None)
|
||||
os.walk("../src", fill_source_list, None)
|
||||
|
||||
for domain in textdomains:
|
||||
pot = File(join(domain, domain + ".pot"))
|
||||
|
@ -68,7 +68,7 @@ if "pot-update" in COMMAND_LINE_TARGETS:
|
|||
cfgs = []
|
||||
FINDCFG = join(domain, "FINDCFG")
|
||||
if os.path.exists(FINDCFG):
|
||||
cfgs = Split(Popen(["sh", join("po", FINDCFG)], stdout = PIPE, cwd = "..").communicate()[0])
|
||||
cfgs = Split(Popen(["sh", join("po", FINDCFG)], stdout = PIPE, cwd = "..").communicate()[0].decode("utf-8"))
|
||||
cfgs = [File(x, Dir("..")) for x in cfgs]
|
||||
if cfgs:
|
||||
wml_pot = env.Command(
|
||||
|
|
|
@ -3,7 +3,7 @@ from SCons.Script import File
|
|||
|
||||
def CheckIEEE754(context):
|
||||
context.Message("Checking if floating point numbers are in the IEEE 754 format... ")
|
||||
test_file = File(os.path.join("src", "compile_time_tests", "ieee_754.cpp")).get_contents()
|
||||
test_file = File(os.path.join("src", "compile_time_tests", "ieee_754.cpp")).get_contents().decode("utf-8")
|
||||
ret, _ = context.TryRun(test_file, ".cpp")
|
||||
context.Result(ret)
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue