diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-02-02 01:06:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-02 01:06:55 (GMT) |
commit | 1e173918f5856ef0f45d291fa75c42bb4b0f51b9 (patch) | |
tree | ba03c06febee6333766bcb98c9693c83deb81ece | |
parent | 66add5594cbfad41024df938ab558e977264d9d4 (diff) | |
parent | 7b233fe50fb922fa8043d2f60d1469ba4ccab2cd (diff) | |
download | SCons-1e173918f5856ef0f45d291fa75c42bb4b0f51b9.zip SCons-1e173918f5856ef0f45d291fa75c42bb4b0f51b9.tar.gz SCons-1e173918f5856ef0f45d291fa75c42bb4b0f51b9.tar.bz2 |
Merge pull request #3281 from dmoody256/change_appendenvpath_default
Change appendenvpath default
-rwxr-xr-x | src/CHANGES.txt | 4 | ||||
-rw-r--r-- | src/engine/SCons/Environment.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 94592f5..b563593 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -11,6 +11,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Whatever John Doe did. + From Daniel Moody: + - Change the default for AppendENVPath to delete_existing=0, so path + order will not be changed, unless explicitly set (Issue #3276) + From Mats Wichmann: - Quiet open file ResourceWarnings on Python >= 3.6 caused by not using a context manager around Popen.stdout diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 81d0e5a..152f0bc 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1217,7 +1217,7 @@ class Base(SubstitutionEnvironment): return path def AppendENVPath(self, name, newpath, envname = 'ENV', - sep = os.pathsep, delete_existing=1): + sep = os.pathsep, delete_existing=0): """Append path elements to the path 'name' in the 'ENV' dictionary for this environment. Will only add any particular path once, and will normpath and normcase all paths to help diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 7cd6015..a72c173 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -1623,9 +1623,9 @@ def exists(env): env1.AppendENVPath('PATH',r'C:\dir\num\two', sep = ';') env1.AppendENVPath('PATH',r'C:\dir\num\three', sep = ';') env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';') - env1.AppendENVPath('MYPATH',r'C:\mydir\num\one','MYENV', sep = ';') + env1.AppendENVPath('MYPATH',r'C:\mydir\num\one','MYENV', sep = ';', delete_existing=1) # this should do nothing since delete_existing is 0 - env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';', delete_existing=0) + env1.AppendENVPath('MYPATH',r'C:\mydir\num\three','MYENV', sep = ';') assert(env1['ENV']['PATH'] == r'C:\dir\num\one;C:\dir\num\two;C:\dir\num\three') assert(env1['MYENV']['MYPATH'] == r'C:\mydir\num\two;C:\mydir\num\three;C:\mydir\num\one') |