add env inheritance back to SCons (as discussed with artem to enable finding libraries and programs in custom locations)

This commit is contained in:
Dane Springmeyer 2009-07-08 18:40:10 +00:00
parent 723588d782
commit 22647f3068

View file

@ -35,7 +35,7 @@ except:
HAS_DISTUTILS = False HAS_DISTUTILS = False
#### SCons build options and initial setup #### #### SCons build options and initial setup ####
env = Environment() env = Environment(ENV=os.environ)
def color_print(color,text,newline=True): def color_print(color,text,newline=True):
# 1 - red # 1 - red
@ -537,7 +537,7 @@ if not preconfigured:
# but if the default is overridden and the file is not found, give warning # but if the default is overridden and the file is not found, give warning
color_print(1,"SCons CONFIG not found: '%s'" % conf) color_print(1,"SCons CONFIG not found: '%s'" % conf)
# Recreate the base environment using modified `opts` # Recreate the base environment using modified `opts`
env = Environment(options=opts) env = Environment(ENV=os.environ,options=opts)
env['USE_CONFIG'] = True env['USE_CONFIG'] = True
else: else:
color_print(4,'SCons USE_CONFIG specified as false, will not inherit variables python config file...') color_print(4,'SCons USE_CONFIG specified as false, will not inherit variables python config file...')