summaryrefslogtreecommitdiff
path: root/sim/pyconfig/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'sim/pyconfig/SConscript')
-rw-r--r--sim/pyconfig/SConscript5
1 files changed, 3 insertions, 2 deletions
diff --git a/sim/pyconfig/SConscript b/sim/pyconfig/SConscript
index 95785d372..2799ef64f 100644
--- a/sim/pyconfig/SConscript
+++ b/sim/pyconfig/SConscript
@@ -147,6 +147,7 @@ def MakeEmbeddedPyFile(target, source, env):
def MakeDefinesPyFile(target, source, env):
target = file(str(target[0]), 'w')
+ print >>target, "import os"
defines = env['CPPDEFINES']
if isinstance(defines, list):
for var in defines:
@@ -158,11 +159,11 @@ def MakeDefinesPyFile(target, source, env):
if not isinstance(key, basestring):
panic("invalid type for define: %s" % type(key))
- print >>target, "env['%s'] = '%s'" % (key, val)
+ print >>target, "os.environ['%s'] = '%s'" % (key, val)
elif isinstance(defines, dict):
for key,val in defines.iteritems():
- print >>target, "env['%s'] = '%s'" % (key, val)
+ print >>target, "os.environ['%s'] = '%s'" % (key, val)
else:
panic("invalid type for defines: %s" % type(defines))