def make_top_env(build_dir):
 os.environ['LC_ALL'] = 'C'
 top_env = SCons.Environment.Environment(ENV=os.environ)
 top_env.EnsureSConsVersion(2, 0)
 top_env.Decider('MD5-timestamp')
 top_env.SetOption('implicit_cache', 1)
 top_env.SetOption('max_drift', 1)
 top_env.VariantDir(build_dir, '.', duplicate=0)
 return top_env

def make_top_env ( build_dir ) : os . environ [ 'LC_ALL' ] = 'C' top_env = SCons . Environment . Environment ( ENV = os . environ ) top_env . EnsureSConsVersion ( 2 , 0 ) top_env . Decider ( 'MD5-timestamp' ) top_env . SetOption ( 'implicit_cache' , 1 ) top_env . SetOption ( 'max_drift' , 1 ) top_env . VariantDir ( build_dir , '.' , duplicate = 0 ) return top_env
make the top level scons envrionment object .