Commits

Anonymous committed 28f2dda

Documentation fixes.
Improve man page explanation of impact of not having external environment variables automatically imported. Fix cut-and-paste errors in descriptions of AppendENVPath() and Prepend(). Correct the __doc__ string for get_visualstudio_versions().

Comments (0)

Files changed (2)

 env = Environment(ENV = {'PATH' : os.environ['PATH']})
 .EE
 
+Similarly, if the commands use external environment variables
+like $PATH, $HOME, $JAVA_HOME, $LANG, $SHELL, $TERM, etc.,
+these variables can also be explicitly propagated:
+
+.ES
+import os
+env = Environment(ENV = {'PATH' : os.environ['PATH'],
+                         'HOME' : os.environ['HOME']})
+.EE
+
+Or you may explicitly propagate the invoking user's
+complete external environment:
+
+.ES
+import os
+env = Environment(ENV = os.environ['PATH'])
+.EE
+
+This comes at the expense of making your build
+dependent on the user's environment being set correctly,
+but it may be more convenient for many configurations.
+
 .B scons
 can scan known input files automatically for dependency
 information (for example, #include statements
 .ES
 print 'before:',env['ENV']['INCLUDE']
 include_path = '/foo/bar:/foo'
-env.PrependENVPath('INCLUDE', include_path)
+env.AppendENVPath('INCLUDE', include_path)
 print 'after:',env['ENV']['INCLUDE']
 
 yields:
 
 '\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 .TP
-.RI env.AppendUnique( key = val ", [...])"
+.RI env.PrependUnique( key = val ", [...])"
 Appends the specified keyword arguments
 to the beginning of construction variables in the environment.
 If the Environment does not have

src/engine/SCons/Tool/msvs.py

 
 def get_visualstudio_versions():
     """
-    Get list of visualstudio versions from the Windows registry.  Return a
-    list of strings containing version numbers; an exception will be raised
-    if we were unable to access the registry (eg. couldn't import
-    a registry-access module) or the appropriate registry keys weren't
-    found.
+    Get list of visualstudio versions from the Windows registry.
+    Returns a list of strings containing version numbers.  An empty list
+    is returned if we were unable to accees the register (for example,
+    we couldn't import the registry-access module) or the appropriate
+    registry keys weren't found.
     """
 
     if not SCons.Util.can_read_reg: