--- ray/build_utils/load_plat.py 2008/04/24 10:28:24 1.11 +++ ray/build_utils/load_plat.py 2016/03/06 01:13:17 1.14 @@ -1,6 +1,7 @@ import os import sys +import platform import ConfigParser @@ -8,9 +9,18 @@ _platdir = 'platform' def read_plat(env, args, fn): - cfig = ConfigParser.ConfigParser(env.Dictionary()) + envdict = env.Dictionary().copy() + # can't feed ConfigParser the original dict, because it also + # contains non-string values. + for k,v in envdict.items(): + if not isinstance(v, str): + del envdict[k] + cfig = ConfigParser.ConfigParser(envdict) cfig.read(fn) - buildvars = [['CC'], # replace + buildvars = [['CC', + 'TIFFINCLUDE', # where to find preinstalled tifflib headers + 'TIFFLIB', # where to find a preinstalled tifflib library + ], # replace ['CPPPATH', 'CPPDEFINES', 'CPPFLAGS', 'CCFLAGS', 'LIBPATH', 'LINKFLAGS', 'EZXML_CPPDEFINES', # build flags specific to ezxml.c @@ -20,7 +30,8 @@ def read_plat(env, args, fn): ['RAD_BASEDIR', 'RAD_BINDIR', 'RAD_RLIBDIR', 'RAD_MANDIR'], []], ['code', - [], # replace + [ # replace + ], [ # append 'RAD_COMPAT', # theoretically obsolete (src/common/strcmp.c) 'RAD_MATHCOMPAT', # erf.c floating point error function @@ -53,10 +64,12 @@ def read_plat(env, args, fn): env[k] = os.path.join(env['RAD_BASEDIR'],env[k]) -def load_plat(env, args, platform=None): - if platform == None: # override +def load_plat(env, args, ourplat=None): + if ourplat == None: # override p = sys.platform - else: p = platform + else: p = ourplat +# if p == 'win32' and platform.architecture()[0] == '64bit': +# p = 'win64' if p == 'win32' and 'gcc' in env['TOOLS']: # we don't really want to know this here... p = 'mingw'