ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/build_utils/load_plat.py
(Generate patch)

Comparing ray/build_utils/load_plat.py (file contents):
Revision 1.17 by schorsch, Mon Mar 28 17:48:43 2016 UTC vs.
Revision 1.18 by schorsch, Tue Apr 19 21:21:23 2016 UTC

# Line 10 | Line 10 | import ConfigParser
10   _platdir = 'platform'
11  
12  
13 < def read_plat(env, args, fn):
13 > def read_plat(env, fn):
14          envdict = env.Dictionary().copy()
15          # can't feed ConfigParser the original dict, because it also
16          # contains non-string values.
# Line 94 | Line 94 | def subst_sconsvars(s, env,
94                  nl.append(ss)
95          return ''.join(nl)
96  
97 < def load_plat(env, args, arch=None):
97 > def load_plat(env):
98          memmodel, binformat = platform.architecture()
99 +        # XXX env['TARGET_ARCH'] --> memmodel
100          platsys = platform.system()
101          print('Detected platform "%s" (%s).' % (platsys, memmodel))
102          cfgname = platsys + '_' + memmodel[:2]
# Line 107 | Line 108 | def load_plat(env, args, arch=None):
108          cust_pfn = os.path.join(_platdir, cfgname + '_custom.cfg')
109          if os.path.isfile(cust_pfn):
110                  print('Reading configuration "%s"' % cust_pfn)
111 <                read_plat(env, args, cust_pfn)
111 >                read_plat(env, cust_pfn)
112                  return 1
113          pfn = os.path.join(_platdir, cfgname + '.cfg')
114          if os.path.isfile(pfn):
115                  print('Reading configuration "%s"' % pfn)
116 <                read_plat(env, args, pfn)
116 >                read_plat(env, pfn)
117                  return 1
118  
119          if os.name == 'posix':
# Line 120 | Line 121 | def load_plat(env, args, arch=None):
121                  if os.path.isfile(pfn):
122                          print('No platform specific configuration found.\n')
123                          print('Reading generic configuration "%s".' % pfn)
124 <                        read_plat(env, args, pfn)
124 >                        read_plat(env, pfn)
125                          return 1
126  
127          print('Platform "%s", system "%s" not supported yet'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines