| 1 |
|
|
| 2 |
|
import os |
| 3 |
|
import sys |
| 4 |
+ |
import platform |
| 5 |
|
import ConfigParser |
| 6 |
|
|
| 7 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
def read_plat(env, args, fn): |
| 12 |
< |
cfig = ConfigParser.ConfigParser(env.Dictionary()) |
| 12 |
> |
envdict = env.Dictionary().copy() |
| 13 |
> |
# can't feed ConfigParser the original dict, because it also |
| 14 |
> |
# contains non-string values. |
| 15 |
> |
for k,v in envdict.items(): |
| 16 |
> |
if not isinstance(v, str): |
| 17 |
> |
del envdict[k] |
| 18 |
> |
cfig = ConfigParser.ConfigParser(envdict) |
| 19 |
|
cfig.read(fn) |
| 20 |
|
buildvars = [['CC', |
| 21 |
|
'TIFFINCLUDE', # where to find preinstalled tifflib headers |
| 64 |
|
env[k] = os.path.join(env['RAD_BASEDIR'],env[k]) |
| 65 |
|
|
| 66 |
|
|
| 67 |
< |
def load_plat(env, args, platform=None): |
| 68 |
< |
if platform == None: # override |
| 67 |
> |
def load_plat(env, args, ourplat=None): |
| 68 |
> |
if ourplat == None: # override |
| 69 |
|
p = sys.platform |
| 70 |
< |
else: p = platform |
| 70 |
> |
else: p = ourplat |
| 71 |
> |
# if p == 'win32' and platform.architecture()[0] == '64bit': |
| 72 |
> |
# p = 'win64' |
| 73 |
|
if p == 'win32' and 'gcc' in env['TOOLS']: |
| 74 |
|
# we don't really want to know this here... |
| 75 |
|
p = 'mingw' |