summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2019-08-16 11:59:20 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-21 17:27:49 +0000
commitd02941c18774c64442f6ac18b8b2a51abc53ad50 (patch)
tree3d388429f95b24ff15700f361759b5527ee8b809
parentca0dd2cb13aaabe7edd9c1ccb6cbbccfa2ea5356 (diff)
downloadmongo-d02941c18774c64442f6ac18b8b2a51abc53ad50.tar.gz
SERVER-50403 SERVER-39467 Upgrade vendored SCons to 3.1.1
(cherry picked from commit 364b08d9d8348a9bf93cbff8eff7181da1a8f336)
-rwxr-xr-xbuildscripts/scons.py2
-rwxr-xr-x[-rw-r--r--]src/third_party/scons-3.1.1/scons-3.1.1.bat (renamed from src/third_party/scons-3.0.4/scons-3.0.4.bat)76
-rw-r--r--src/third_party/scons-3.1.1/scons-LICENSE (renamed from src/third_party/scons-3.0.4/scons-LICENSE)0
-rw-r--r--src/third_party/scons-3.1.1/scons-README (renamed from src/third_party/scons-3.0.4/scons-README)57
-rwxr-xr-x[-rw-r--r--]src/third_party/scons-3.1.1/scons-configure-cache.py (renamed from src/third_party/scons-3.0.4/scons-configure-cache.py)10
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Action.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Action.py)41
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Builder.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Builder.py)22
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/CacheDir.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/CacheDir.py)107
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Conftest.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Conftest.py)22
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Debug.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Debug.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Defaults.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Defaults.py)11
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Environment.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Environment.py)78
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Errors.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Errors.py)6
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Executor.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Executor.py)25
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Job.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Job.py)36
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Memoize.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Memoize.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/Alias.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/Alias.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/FS.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/FS.py)185
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/Python.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/Python.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/__init__.py)86
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/PathList.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/PathList.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/__init__.py)21
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/aix.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/aix.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/cygwin.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/cygwin.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/darwin.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/darwin.py)13
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/hpux.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/hpux.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/irix.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/irix.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/mingw.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/mingw.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/os2.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/os2.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/posix.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/posix.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/sunos.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/sunos.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/virtualenv.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/virtualenv.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/win32.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/win32.py)18
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/SConf.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/SConf.py)69
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/SConsign.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/SConsign.py)17
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/C.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/C.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/D.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/D.py)4
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Dir.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Dir.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Fortran.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Fortran.py)38
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/IDL.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/IDL.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/LaTeX.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/LaTeX.py)18
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Prog.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Prog.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/RC.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/RC.py)8
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/SWIG.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/SWIG.py)4
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/__init__.py)4
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/Interactive.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/Interactive.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/Main.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/Main.py)38
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/SConsOptions.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/SConsOptions.py)53
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/SConscript.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/SConscript.py)13
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/__init__.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Subst.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Subst.py)8
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Taskmaster.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Taskmaster.py)10
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/386asm.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/386asm.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/DCommon.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/DCommon.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/FortranCommon.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/FortranCommon.py)5
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/GettextCommon.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/GettextCommon.py)58
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/JavaCommon.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/JavaCommon.py)144
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/__init__.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/arch.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/arch.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/common.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/common.py)11
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/netframework.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/netframework.py)4
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/sdk.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/sdk.py)12
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/vc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/vc.py)172
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/vs.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/vs.py)15
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/PharLapCommon.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/PharLapCommon.py)5
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/__init__.py)98
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixc++.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixc++.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixcc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixcc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixcxx.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixcxx.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixf77.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixf77.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixlink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixlink.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/applelink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/applelink.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ar.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ar.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/as.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/as.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/bcc32.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/bcc32.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/c++.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/c++.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clang.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clang.py)5
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clangCommon/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clangCommon/__init__.py)0
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clangxx.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clangxx.py)5
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cvf.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cvf.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cxx.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cxx.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cyglink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cyglink.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/default.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/default.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dmd.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dmd.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/docbook/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/docbook/__init__.py)182
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvi.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvi.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvipdf.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvipdf.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvips.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvips.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f03.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f03.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f08.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f08.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f77.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f77.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f90.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f90.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f95.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f95.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/filesystem.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/filesystem.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/fortran.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/fortran.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/g++.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/g++.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/g77.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/g77.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gas.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gas.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gcc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gcc.py)40
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gdc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gdc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gettext_tool.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gettext_tool.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gfortran.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gfortran.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gnulink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gnulink.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gs.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gs.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gxx.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gxx.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpc++.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpc++.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpcc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpcc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpcxx.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpcxx.py)5
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hplink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hplink.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/icc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/icc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/icl.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/icl.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ifl.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ifl.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ifort.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ifort.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ilink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ilink.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ilink32.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ilink32.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/install.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/install.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/intelc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/intelc.py)15
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ipkg.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ipkg.py)8
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/jar.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/jar.py)16
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/javac.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/javac.py)10
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/javah.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/javah.py)8
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/latex.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/latex.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ldc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ldc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/lex.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/lex.py)52
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/link.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/link.py)4
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/linkloc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/linkloc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/m4.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/m4.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/masm.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/masm.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/midl.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/midl.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mingw.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mingw.py)77
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msgfmt.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msgfmt.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msginit.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msginit.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msgmerge.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msgmerge.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mslib.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mslib.py)11
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mslink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mslink.py)15
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mssdk.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mssdk.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msvc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msvc.py)19
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msvs.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msvs.py)199
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mwcc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mwcc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mwld.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mwld.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/nasm.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/nasm.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/__init__.py)16
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/ipk.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/ipk.py)16
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/msi.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/msi.py)23
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/rpm.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/rpm.py)10
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_tarbz2.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_tarbz2.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_targz.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_targz.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_tarxz.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_tarxz.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_zip.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_zip.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/tarbz2.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/tarbz2.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/targz.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/targz.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/tarxz.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/tarxz.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/zip.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/zip.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdf.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdf.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdflatex.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdflatex.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdftex.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdftex.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/qt.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/qt.py)35
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rmic.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rmic.py)8
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpcgen.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpcgen.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpm.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpm.py)25
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpmutils.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpmutils.py)41
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgiar.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgiar.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgic++.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgic++.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgicc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgicc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgicxx.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgicxx.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgilink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgilink.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunar.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunar.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunc++.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunc++.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/suncc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/suncc.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/suncxx.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/suncxx.py)18
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf77.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf77.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf90.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf90.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf95.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf95.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunlink.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunlink.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/swig.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/swig.py)31
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tar.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tar.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tex.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tex.py)30
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/textfile.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/textfile.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tlib.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tlib.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/wix.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/wix.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/xgettext.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/xgettext.py)55
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/yacc.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/yacc.py)50
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/zip.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/zip.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Util.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Util.py)102
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/BoolVariable.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/BoolVariable.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/EnumVariable.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/EnumVariable.py)4
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/ListVariable.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/ListVariable.py)4
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/PackageVariable.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/PackageVariable.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/PathVariable.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/PathVariable.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/__init__.py)8
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Warnings.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Warnings.py)10
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/__init__.py)10
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/__main__.py4
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/compat/__init__.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/compat/__init__.py)27
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/compat/_scons_dbm.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/compat/_scons_dbm.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/cpp.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/cpp.py)34
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/dblite.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/dblite.py)7
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/exitfuncs.py (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/exitfuncs.py)2
-rw-r--r--src/third_party/scons-3.1.1/scons-local-3.1.1/scons-3.1.1.egg-info (renamed from src/third_party/scons-3.0.4/scons-local-3.0.4/scons-3.0.4.egg-info)2
-rwxr-xr-x[-rw-r--r--]src/third_party/scons-3.1.1/scons-time.py (renamed from src/third_party/scons-3.0.4/scons-time.py)97
-rwxr-xr-x[-rw-r--r--]src/third_party/scons-3.1.1/scons.bat (renamed from src/third_party/scons-3.0.4/scons.bat)76
-rwxr-xr-x[-rw-r--r--]src/third_party/scons-3.1.1/scons.py (renamed from src/third_party/scons-3.0.4/scons.py)12
-rwxr-xr-x[-rw-r--r--]src/third_party/scons-3.1.1/sconsign.py (renamed from src/third_party/scons-3.0.4/sconsign.py)110
204 files changed, 1937 insertions, 1455 deletions
diff --git a/buildscripts/scons.py b/buildscripts/scons.py
index 57f29a6b933..8dd61a03848 100755
--- a/buildscripts/scons.py
+++ b/buildscripts/scons.py
@@ -4,7 +4,7 @@
import os
import sys
-SCONS_VERSION = os.environ.get('SCONS_VERSION', "3.0.4")
+SCONS_VERSION = os.environ.get('SCONS_VERSION', "3.1.1")
MONGODB_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
SCONS_DIR = os.path.join(MONGODB_ROOT, 'src', 'third_party', 'scons-' + SCONS_VERSION,
diff --git a/src/third_party/scons-3.0.4/scons-3.0.4.bat b/src/third_party/scons-3.1.1/scons-3.1.1.bat
index 21ed3a876a2..a5b1b6e64ff 100644..100755
--- a/src/third_party/scons-3.0.4/scons-3.0.4.bat
+++ b/src/third_party/scons-3.1.1/scons-3.1.1.bat
@@ -1,38 +1,38 @@
-@REM Copyright (c) 2001 - 2019 The SCons Foundation
-@REM src/script/scons.bat 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan
-@echo off
-set SCONS_ERRORLEVEL=
-if "%OS%" == "Windows_NT" goto WinNT
-
-@REM for 9x/Me you better not have more than 9 args
-python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-3.0.4'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-3.0.4'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
-@REM no way to set exit status of this script for 9x/Me
-goto endscons
-
-@REM Credit where credit is due: we return the exit code despite our
-@REM use of setlocal+endlocal using a technique from Bear's Journal:
-@REM http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/
-
-:WinNT
-setlocal
-@REM ensure the script will be executed with the Python it was installed for
-pushd %~dp0..
-set path=%~dp0;%CD%;%path%
-popd
-@REM try the script named as the .bat file in current dir, then in Scripts subdir
-set scriptname=%~dp0%~n0.py
-if not exist "%scriptname%" set scriptname=%~dp0Scripts\%~n0.py
-@REM Handle when running from wheel where the script has no .py extension
-if not exist "%scriptname%" set scriptname=%~dp0%~n0
-python "%scriptname%" %*
-endlocal & set SCONS_ERRORLEVEL=%ERRORLEVEL%
-
-if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
-if errorlevel 9009 echo you do not have python in your PATH
-goto endscons
-
-:returncode
-exit /B %SCONS_ERRORLEVEL%
-
-:endscons
-call :returncode %SCONS_ERRORLEVEL%
+@REM Copyright (c) 2001 - 2019 The SCons Foundation
+@REM src/script/scons.bat 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan
+@echo off
+set SCONS_ERRORLEVEL=
+if "%OS%" == "Windows_NT" goto WinNT
+
+@REM for 9x/Me you better not have more than 9 args
+python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-3.1.1'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-3.1.1'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
+@REM no way to set exit status of this script for 9x/Me
+goto endscons
+
+@REM Credit where credit is due: we return the exit code despite our
+@REM use of setlocal+endlocal using a technique from Bear's Journal:
+@REM http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/
+
+:WinNT
+setlocal
+@REM ensure the script will be executed with the Python it was installed for
+pushd %~dp0..
+set path=%~dp0;%CD%;%path%
+popd
+@REM try the script named as the .bat file in current dir, then in Scripts subdir
+set scriptname=%~dp0%~n0.py
+if not exist "%scriptname%" set scriptname=%~dp0Scripts\%~n0.py
+@REM Handle when running from wheel where the script has no .py extension
+if not exist "%scriptname%" set scriptname=%~dp0%~n0
+python "%scriptname%" %*
+endlocal & set SCONS_ERRORLEVEL=%ERRORLEVEL%
+
+if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
+if errorlevel 9009 echo you do not have python in your PATH
+goto endscons
+
+:returncode
+exit /B %SCONS_ERRORLEVEL%
+
+:endscons
+call :returncode %SCONS_ERRORLEVEL%
diff --git a/src/third_party/scons-3.0.4/scons-LICENSE b/src/third_party/scons-3.1.1/scons-LICENSE
index e7268d5e2dc..e7268d5e2dc 100644
--- a/src/third_party/scons-3.0.4/scons-LICENSE
+++ b/src/third_party/scons-3.1.1/scons-LICENSE
diff --git a/src/third_party/scons-3.0.4/scons-README b/src/third_party/scons-3.1.1/scons-README
index 5b318068b0a..301b50684d1 100644
--- a/src/third_party/scons-3.0.4/scons-README
+++ b/src/third_party/scons-3.1.1/scons-README
@@ -44,13 +44,14 @@ scons-local package, or any SCons package, at the SCons download page:
EXECUTION REQUIREMENTS
======================
-Running SCons requires Python version 2.4 or later. There should be
-no other dependencies or requirements to run SCons.
+Running SCons requires either Python version 2.7.* or Python 3.5 or higher.
+There should be no other dependencies or requirements to run SCons.
The default SCons configuration assumes use of the Microsoft Visual C++
-compiler suite on WIN32 systems, and assumes a C compiler named 'cc',
-a C++ compiler named 'c++', and a Fortran compiler named 'g77' (such
-as found in the GNU C compiler suite) on any other type of system.
+compiler suite on WIN32 systems (either through the Visual Studio
+product, or through the separate Build Tools), and assumes a C compiler
+named 'cc', a C++ compiler named 'c++', and a Fortran compiler named 'g77'
+(such as found in the GNU Compiler Collection) on any other type of system.
You may, of course, override these default values by appropriate
configuration of Environment construction variables.
@@ -157,14 +158,23 @@ available at:
REPORTING BUGS
==============
-You can report bugs either by following the "Tracker - Bugs" link
-on the SCons project page:
+The SCons project welcomes bug reports and feature requests.
- http://sourceforge.net/projects/scons/
+Please make sure you send email with the problem or feature request to
+the SCons users mailing list, which you can join via the link below:
-or by sending mail to the SCons developers mailing list:
+ http://two.pairlist.net/mailman/listinfo/scons-users
+
+Once you have discussed your issue on the users mailing list and the
+community has confirmed that it is either a new bug or a duplicate of an
+existing bug, then please follow the instructions the community provides
+to file a new bug or to add yourself to the CC list for an existing bug
+
+You can explore the list of existing bugs, which may include workarounds
+for the problem you've run into, on GitHub:
+
+ https://github.com/SCons/scons/issues
- scons-devel@lists.sourceforge.net
MAILING LISTS
@@ -173,11 +183,34 @@ MAILING LISTS
A mailing list for users of SCons is available. You may send questions
or comments to the list at:
- scons-users@lists.sourceforge.net
+ scons-users@scons.org
You may subscribe to the scons-users mailing list at:
- http://lists.sourceforge.net/lists/listinfo/scons-users
+ http://two.pairlist.net/mailman/listinfo/scons-users
+
+An active mailing list for developers of SCons is available. You may
+send questions or comments to the list at:
+
+ scons-dev@scons.org
+
+You may subscribe to the developer's mailing list using form on this page:
+
+ http://two.pairlist.net/mailman/listinfo/scons-dev
+
+Subscription to the developer's mailing list is by approval. In practice, no
+one is refused list membership, but we reserve the right to limit membership
+in the future and/or weed out lurkers.
+
+There is also a low-volume mailing list available for announcements about
+SCons. Subscribe by sending email to:
+
+ announce-subscribe@scons.tigris.org
+
+There are other mailing lists available for SCons users, for notification of
+SCons code changes, and for notification of updated bug reports and project
+documents. Please see our mailing lists page for details.
+
FOR MORE INFORMATION
diff --git a/src/third_party/scons-3.0.4/scons-configure-cache.py b/src/third_party/scons-3.1.1/scons-configure-cache.py
index a9af1afee84..8bce553fe3f 100644..100755
--- a/src/third_party/scons-3.0.4/scons-configure-cache.py
+++ b/src/third_party/scons-3.1.1/scons-configure-cache.py
@@ -37,15 +37,15 @@ import glob
import json
import os
-__revision__ = "src/script/scons-configure-cache.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/script/scons-configure-cache.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
-__version__ = "3.0.4"
+__version__ = "3.1.1"
-__build__ = "3a41ed6b288cee8d085373ad7fa02894e1903864"
+__build__ = "72ae09dc35ac2626f8ff711d8c4b30b6138e08e3"
-__buildsys__ = "kufra"
+__buildsys__ = "octodog"
-__date__ = "2019-01-20 22:51:36"
+__date__ = "2019-08-08 14:50:06"
__developer__ = "bdeegan"
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Action.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Action.py
index d633327a4b8..be4a5ff90cc 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Action.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Action.py
@@ -98,7 +98,7 @@ way for wrapping up the functions.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Action.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Action.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import pickle
@@ -211,7 +211,7 @@ def _object_contents(obj):
def _code_contents(code, docstring=None):
- """Return the signature contents of a code object.
+ r"""Return the signature contents of a code object.
By providing direct access to the code object of the
function, Python makes this extremely easy. Hooray!
@@ -534,7 +534,7 @@ class ActionBase(object):
result = self.get_presig(target, source, env)
if not isinstance(result,(bytes, bytearray)):
- result = bytearray("",'utf-8').join([ SCons.Util.to_bytes(r) for r in result ])
+ result = bytearray(result, 'utf-8')
else:
# Make a copy and put in bytearray, without this the contents returned by get_presig
# can be changed by the logic below, appending with each call and causing very
@@ -767,16 +767,22 @@ def _subproc(scons_env, cmd, error = 'ignore', **kw):
it'll have to be tweaked to get the full desired functionality.
one special arg (so far?), 'error', to tell what to do with exceptions.
"""
- # allow std{in,out,err} to be "'devnull'"
- io = kw.get('stdin')
- if is_String(io) and io == 'devnull':
- kw['stdin'] = open(os.devnull)
- io = kw.get('stdout')
- if is_String(io) and io == 'devnull':
- kw['stdout'] = open(os.devnull, 'w')
- io = kw.get('stderr')
- if is_String(io) and io == 'devnull':
- kw['stderr'] = open(os.devnull, 'w')
+ # allow std{in,out,err} to be "'devnull'". This is like
+ # subprocess.DEVNULL, which does not exist for Py2. Use the
+ # subprocess one if possible.
+ # Clean this up when Py2 support is dropped
+ try:
+ from subprocess import DEVNULL
+ except ImportError:
+ DEVNULL = None
+
+ for stream in 'stdin', 'stdout', 'stderr':
+ io = kw.get(stream)
+ if is_String(io) and io == 'devnull':
+ if DEVNULL:
+ kw[stream] = DEVNULL
+ else:
+ kw[stream] = open(os.devnull, "r+")
# Figure out what shell environment to use
ENV = kw.get('env', None)
@@ -802,7 +808,7 @@ def _subproc(scons_env, cmd, error = 'ignore', **kw):
kw['env'] = new_env
try:
- pobj = subprocess.Popen(cmd, **kw)
+ pobj = subprocess.Popen(cmd, **kw)
except EnvironmentError as e:
if error == 'raise': raise
# return a dummy Popen instance that only returns error
@@ -820,9 +826,10 @@ def _subproc(scons_env, cmd, error = 'ignore', **kw):
finally:
# clean up open file handles stored in parent's kw
for k, v in kw.items():
- if hasattr(v, 'close'):
+ if inspect.ismethod(getattr(v, 'close', None)):
v.close()
- return pobj
+
+ return pobj
class CommandAction(_ActionAction):
@@ -1091,7 +1098,7 @@ class LazyAction(CommandGeneratorAction, CommandAction):
def get_parent_class(self, env):
c = env.get(self.var)
- if is_String(c) and not '\n' in c:
+ if is_String(c) and '\n' not in c:
return CommandAction
return CommandGeneratorAction
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Builder.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Builder.py
index 2a7ebb12953..c3bdf5c6782 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Builder.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Builder.py
@@ -98,7 +98,7 @@ There are the following methods for internal use within this module:
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Builder.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Builder.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import collections
@@ -274,7 +274,7 @@ def Builder(**kw):
result = BuilderBase(**kw)
- if not composite is None:
+ if composite is not None:
result = CompositeBuilder(result, composite)
return result
@@ -293,7 +293,7 @@ def _node_errors(builder, env, tlist, slist):
if t.has_explicit_builder():
# Check for errors when the environments are different
# No error if environments are the same Environment instance
- if (not t.env is None and not t.env is env and
+ if (t.env is not None and t.env is not env and
# Check OverrideEnvironment case - no error if wrapped Environments
# are the same instance, and overrides lists match
not (getattr(t.env, '__subject', 0) is getattr(env, '__subject', 1) and
@@ -309,7 +309,7 @@ def _node_errors(builder, env, tlist, slist):
else:
try:
msg = "Two environments with different actions were specified for the same target: %s\n(action 1: %s)\n(action 2: %s)" % (t,t_contents.decode('utf-8'),contents.decode('utf-8'))
- except UnicodeDecodeError as e:
+ except UnicodeDecodeError:
msg = "Two environments with different actions were specified for the same target: %s"%t
raise UserError(msg)
if builder.multi:
@@ -424,7 +424,7 @@ class BuilderBase(object):
if name:
self.name = name
self.executor_kw = {}
- if not chdir is _null:
+ if chdir is not _null:
self.executor_kw['chdir'] = chdir
self.is_explicit = is_explicit
@@ -554,8 +554,10 @@ class BuilderBase(object):
result = []
if target is None: target = [None]*len(source)
for tgt, src in zip(target, source):
- if not tgt is None: tgt = [tgt]
- if not src is None: src = [src]
+ if tgt is not None:
+ tgt = [tgt]
+ if src is not None:
+ src = [src]
result.extend(self._execute(env, tgt, src, overwarn))
return SCons.Node.NodeList(result)
@@ -565,13 +567,11 @@ class BuilderBase(object):
# If there is more than one target ensure that if we need to reset
# the implicit list to new scan of dependency all targets implicit lists
- # are cleared. (SERVER-33111)
+ # are cleared. (SCons GH Issue #2811 and MongoDB SERVER-33111)
if len(tlist) > 1:
- # print("Builder:_execute():Tlist > 1 -> %s"%[str(t) for t in tlist])
for t in tlist:
t.target_peers = tlist
-
# Check for errors with the specified target/source lists.
_node_errors(self, env, tlist, slist)
@@ -753,7 +753,7 @@ class BuilderBase(object):
for s in SCons.Util.flatten(source):
if SCons.Util.is_String(s):
match_suffix = match_src_suffix(env.subst(s))
- if not match_suffix and not '.' in s:
+ if not match_suffix and '.' not in s:
src_suf = self.get_src_suffix(env)
s = self._adjustixes(s, None, src_suf)[0]
else:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/CacheDir.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/CacheDir.py
index 4b30a73f2ef..a1133aed82b 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/CacheDir.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/CacheDir.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/CacheDir.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/CacheDir.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """
CacheDir support
@@ -33,8 +33,10 @@ import os
import stat
import sys
+import SCons
import SCons.Action
import SCons.Warnings
+from SCons.Util import PY3
cache_enabled = True
cache_debug = False
@@ -113,7 +115,7 @@ def CachePushFunc(target, source, env):
# has beaten us creating the directory.
if not fs.isdir(cachedir):
msg = errfmt % (str(target), cachefile)
- raise SCons.Errors.EnvironmentError(msg)
+ raise SCons.Errors.SConsEnvironmentError(msg)
try:
if fs.islink(t.get_internal_path()):
@@ -141,6 +143,14 @@ warned = dict()
class CacheDir(object):
def __init__(self, path):
+ """
+ Initialize a CacheDir object.
+
+ The cache configuration is stored in the object. It
+ is read from the config file in the supplied path if
+ one exists, if not the config file is created and
+ the default config is written, as well as saved in the object.
+ """
self.requests = 0
self.hits = 0
self.path = path
@@ -149,28 +159,81 @@ class CacheDir(object):
self.config = dict()
if path is None:
return
- # See if there's a config file in the cache directory. If there is,
- # use it. If there isn't, and the directory exists and isn't empty,
- # produce a warning. If the directory doesn't exist or is empty,
- # write a config file.
+
+ if PY3:
+ self._readconfig3(path)
+ else:
+ self._readconfig2(path)
+
+
+ def _readconfig3(self, path):
+ """
+ Python3 version of reading the cache config.
+
+ If directory or config file do not exist, create. Take advantage
+ of Py3 capability in os.makedirs() and in file open(): just try
+ the operation and handle failure appropriately.
+
+ Omit the check for old cache format, assume that's old enough
+ there will be none of those left to worry about.
+
+ :param path: path to the cache directory
+ """
+ config_file = os.path.join(path, 'config')
+ try:
+ os.makedirs(path, exist_ok=True)
+ except FileExistsError:
+ pass
+ except OSError:
+ msg = "Failed to create cache directory " + path
+ raise SCons.Errors.SConsEnvironmentError(msg)
+
+ try:
+ with open(config_file, 'x') as config:
+ self.config['prefix_len'] = 2
+ try:
+ json.dump(self.config, config)
+ except Exception:
+ msg = "Failed to write cache configuration for " + path
+ raise SCons.Errors.SConsEnvironmentError(msg)
+ except FileExistsError:
+ try:
+ with open(config_file) as config:
+ self.config = json.load(config)
+ except ValueError:
+ msg = "Failed to read cache configuration for " + path
+ raise SCons.Errors.SConsEnvironmentError(msg)
+
+
+ def _readconfig2(self, path):
+ """
+ Python2 version of reading cache config.
+
+ See if there is a config file in the cache directory. If there is,
+ use it. If there isn't, and the directory exists and isn't empty,
+ produce a warning. If the directory does not exist or is empty,
+ write a config file.
+
+ :param path: path to the cache directory
+ """
config_file = os.path.join(path, 'config')
if not os.path.exists(config_file):
- # A note: There is a race hazard here, if two processes start and
+ # A note: There is a race hazard here if two processes start and
# attempt to create the cache directory at the same time. However,
- # python doesn't really give you the option to do exclusive file
- # creation (it doesn't even give you the option to error on opening
- # an existing file for writing...). The ordering of events here
- # as an attempt to alleviate this, on the basis that it's a pretty
- # unlikely occurence (it'd require two builds with a brand new cache
+ # Python 2.x does not give you the option to do exclusive file
+ # creation (not even the option to error on opening an existing
+ # file for writing...). The ordering of events here is an attempt
+ # to alleviate this, on the basis that it's a pretty unlikely
+ # occurrence (would require two builds with a brand new cache
# directory)
- if os.path.isdir(path) and len(os.listdir(path)) != 0:
+ if os.path.isdir(path) and any(f != "config" for f in os.listdir(path)):
self.config['prefix_len'] = 1
# When building the project I was testing this on, the warning
# was output over 20 times. That seems excessive
global warned
if self.path not in warned:
msg = "Please upgrade your cache by running " +\
- " scons-configure-cache.py " + self.path
+ "scons-configure-cache.py " + self.path
SCons.Warnings.warn(SCons.Warnings.CacheVersionWarning, msg)
warned[self.path] = True
else:
@@ -181,23 +244,23 @@ class CacheDir(object):
# If someone else is trying to create the directory at
# the same time as me, bad things will happen
msg = "Failed to create cache directory " + path
- raise SCons.Errors.EnvironmentError(msg)
-
+ raise SCons.Errors.SConsEnvironmentError(msg)
+
self.config['prefix_len'] = 2
if not os.path.exists(config_file):
try:
with open(config_file, 'w') as config:
json.dump(self.config, config)
- except:
+ except Exception:
msg = "Failed to write cache configuration for " + path
- raise SCons.Errors.EnvironmentError(msg)
+ raise SCons.Errors.SConsEnvironmentError(msg)
else:
try:
with open(config_file) as config:
self.config = json.load(config)
except ValueError:
msg = "Failed to read cache configuration for " + path
- raise SCons.Errors.EnvironmentError(msg)
+ raise SCons.Errors.SConsEnvironmentError(msg)
def CacheDebug(self, fmt, target, cachefile):
@@ -211,8 +274,8 @@ class CacheDir(object):
self.current_cache_debug = cache_debug
if self.debugFP:
self.debugFP.write(fmt % (target, os.path.split(cachefile)[1]))
- self.debugFP.write("requests: %d, hits: %d, misses: %d, hit rate: %.2f%%\n" %
- (self.requests, self.hits, self.misses, self.hit_ratio))
+ self.debugFP.write("requests: %d, hits: %d, misses: %d, hit rate: %.2f%%\n" %
+ (self.requests, self.hits, self.misses, self.hit_ratio))
@property
def hit_ratio(self):
@@ -223,7 +286,7 @@ class CacheDir(object):
return self.requests - self.hits
def is_enabled(self):
- return cache_enabled and not self.path is None
+ return cache_enabled and self.path is not None
def is_readonly(self):
return cache_readonly
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Conftest.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Conftest.py
index 84aa9925e4b..1163aa36c09 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Conftest.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Conftest.py
@@ -354,7 +354,7 @@ def CheckHeader(context, header_name, header = None, language = None,
context.Display("Checking for %s header file %s... " % (lang, header_name))
ret = context.CompileProg(text, suffix)
- _YesNoResult(context, ret, "HAVE_" + header_name, text,
+ _YesNoResult(context, ret, "HAVE_" + header_name, text,
"Define to 1 if you have the <%s> header file." % header_name)
return ret
@@ -439,7 +439,7 @@ def CheckTypeSize(context, type_name, header = None, language = None, expect = N
Returns:
status : int
0 if the check failed, or the found size of the type if the check succeeded."""
-
+
# Include "confdefs.h" first, so that the header can use HAVE_HEADER_H.
if context.headerfilename:
includetext = '#include "%s"' % context.headerfilename
@@ -454,8 +454,8 @@ def CheckTypeSize(context, type_name, header = None, language = None, expect = N
context.Display("Cannot check for %s type: %s\n" % (type_name, msg))
return msg
- src = includetext + header
- if not expect is None:
+ src = includetext + header
+ if expect is not None:
# Only check if the given size is the right one
context.Display('Checking %s is %d bytes... ' % (type_name, expect))
@@ -477,7 +477,7 @@ int main(void)
st = context.CompileProg(src % (type_name, expect), suffix)
if not st:
context.Display("yes\n")
- _Have(context, "SIZEOF_%s" % type_name, expect,
+ _Have(context, "SIZEOF_%s" % type_name, expect,
"The size of `%s', as computed by sizeof." % type_name)
return expect
else:
@@ -541,7 +541,7 @@ def CheckDeclaration(context, symbol, includes = None, language = None):
Returns:
status : bool
True if the check failed, False if succeeded."""
-
+
# Include "confdefs.h" first, so that the header can use HAVE_HEADER_H.
if context.headerfilename:
includetext = '#include "%s"' % context.headerfilename
@@ -556,7 +556,7 @@ def CheckDeclaration(context, symbol, includes = None, language = None):
context.Display("Cannot check for declaration %s: %s\n" % (symbol, msg))
return msg
- src = includetext + includes
+ src = includetext + includes
context.Display('Checking whether %s is declared... ' % symbol)
src = src + r"""
@@ -677,7 +677,7 @@ return 0;
"Define to 1 if you have the `%s' library." % lib_name)
if oldLIBS != -1 and (ret or not autoadd):
context.SetLIBS(oldLIBS)
-
+
if not ret:
return ret
@@ -704,7 +704,7 @@ def CheckProg(context, prog_name):
#
def _YesNoResult(context, ret, key, text, comment = None):
- """
+ r"""
Handle the result of a test with a "yes" or "no" result.
:Parameters:
@@ -723,7 +723,7 @@ def _YesNoResult(context, ret, key, text, comment = None):
def _Have(context, key, have, comment = None):
- """
+ r"""
Store result of a test in context.havedict and context.headerfilename.
:Parameters:
@@ -751,7 +751,7 @@ def _Have(context, key, have, comment = None):
line = "#define %s %d\n" % (key_up, have)
else:
line = "#define %s %s\n" % (key_up, str(have))
-
+
if comment is not None:
lines = "\n/* %s */\n" % comment + line
else:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Debug.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Debug.py
index eee90158918..12d07fdbaf7 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Debug.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Debug.py
@@ -31,7 +31,7 @@ caller_trace()
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Debug.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Debug.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import sys
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Defaults.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Defaults.py
index e1a4ba193d3..63ba450b348 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Defaults.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Defaults.py
@@ -33,7 +33,7 @@ from distutils.msvccompiler.
#
from __future__ import division
-__revision__ = "src/engine/SCons/Defaults.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Defaults.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
@@ -193,7 +193,7 @@ def chmod_func(dest, mode):
SCons.Node.FS.invalidate_node_memos(dest)
if not SCons.Util.is_List(dest):
dest = [dest]
- if SCons.Util.is_String(mode) and not 0 in [i in digits for i in mode]:
+ if SCons.Util.is_String(mode) and 0 not in [i in digits for i in mode]:
mode = int(mode, 8)
if not SCons.Util.is_String(mode):
for element in dest:
@@ -210,7 +210,7 @@ def chmod_func(dest, mode):
else:
raise SyntaxError("Could not find +, - or =")
operation_list = operation.split(operator)
- if len(operation_list) is not 2:
+ if len(operation_list) != 2:
raise SyntaxError("More than one operator found")
user = operation_list[0].strip().replace("a", "ugo")
permission = operation_list[1].strip()
@@ -333,8 +333,8 @@ def touch_func(dest):
if os.path.exists(file):
atime = os.path.getatime(file)
else:
- open(file, 'w')
- atime = mtime
+ with open(file, 'w'):
+ atime = mtime
os.utime(file, (atime, mtime))
Touch = ActionFactory(touch_func,
@@ -582,6 +582,7 @@ ConstructionEnvironment = {
'__DSHLIBVERSIONFLAGS' : '${__libversionflags(__env__,"DSHLIBVERSION","_DSHLIBVERSIONFLAGS")}',
'TEMPFILE' : NullCmdGenerator,
+ 'TEMPFILEARGJOIN': ' ',
'Dir' : Variable_Method_Caller('TARGET', 'Dir'),
'Dirs' : Variable_Method_Caller('TARGET', 'Dirs'),
'File' : Variable_Method_Caller('TARGET', 'File'),
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Environment.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Environment.py
index 2d8f9bb6623..7a0954d38cc 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Environment.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Environment.py
@@ -31,7 +31,7 @@ Environment
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Environment.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Environment.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import copy
@@ -608,7 +608,7 @@ class SubstitutionEnvironment(object):
Removes the specified function's MethodWrapper from the
added_methods list, so we don't re-bind it when making a clone.
"""
- self.added_methods = [dm for dm in self.added_methods if not dm.method is function]
+ self.added_methods = [dm for dm in self.added_methods if dm.method is not function]
def Override(self, overrides):
"""
@@ -719,6 +719,12 @@ class SubstitutionEnvironment(object):
elif append_next_arg_to == '-isystem':
t = ('-isystem', arg)
dict['CCFLAGS'].append(t)
+ elif append_next_arg_to == '-iquote':
+ t = ('-iquote', arg)
+ dict['CCFLAGS'].append(t)
+ elif append_next_arg_to == '-idirafter':
+ t = ('-idirafter', arg)
+ dict['CCFLAGS'].append(t)
elif append_next_arg_to == '-arch':
t = ('-arch', arg)
dict['CCFLAGS'].append(t)
@@ -777,6 +783,7 @@ class SubstitutionEnvironment(object):
elif arg in ['-mno-cygwin',
'-pthread',
'-openmp',
+ '-fmerge-all-constants',
'-fopenmp']:
dict['CCFLAGS'].append(arg)
dict['LINKFLAGS'].append(arg)
@@ -791,7 +798,7 @@ class SubstitutionEnvironment(object):
elif arg[0] == '+':
dict['CCFLAGS'].append(arg)
dict['LINKFLAGS'].append(arg)
- elif arg in ['-include', '-isysroot', '-isystem', '-arch']:
+ elif arg in ['-include', '-isysroot', '-isystem', '-iquote', '-idirafter', '-arch']:
append_next_arg_to = arg
else:
dict['CCFLAGS'].append(arg)
@@ -858,18 +865,21 @@ class SubstitutionEnvironment(object):
return self
-def default_decide_source(dependency, target, prev_ni):
+def default_decide_source(dependency, target, prev_ni, repo_node=None):
f = SCons.Defaults.DefaultEnvironment().decide_source
- return f(dependency, target, prev_ni)
+ return f(dependency, target, prev_ni, repo_node)
-def default_decide_target(dependency, target, prev_ni):
+
+def default_decide_target(dependency, target, prev_ni, repo_node=None):
f = SCons.Defaults.DefaultEnvironment().decide_target
- return f(dependency, target, prev_ni)
+ return f(dependency, target, prev_ni, repo_node)
+
def default_copy_from_cache(src, dst):
f = SCons.Defaults.DefaultEnvironment().copy_from_cache
return f(src, dst)
+
class Base(SubstitutionEnvironment):
"""Base class for "real" construction Environments. These are the
primary objects used to communicate dependency and construction
@@ -1217,7 +1227,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
@@ -1342,7 +1352,7 @@ class Base(SubstitutionEnvironment):
dk = list(filter(lambda x, val=val: x not in val, dk))
self._dict[key] = dk + [val]
else:
- if not val in dk:
+ if val not in dk:
self._dict[key] = dk + [val]
else:
if key == 'CPPDEFINES':
@@ -1428,30 +1438,30 @@ class Base(SubstitutionEnvironment):
_warn_copy_deprecated = False
return self.Clone(*args, **kw)
- def _changed_build(self, dependency, target, prev_ni):
- if dependency.changed_state(target, prev_ni):
+ def _changed_build(self, dependency, target, prev_ni, repo_node=None):
+ if dependency.changed_state(target, prev_ni, repo_node):
return 1
- return self.decide_source(dependency, target, prev_ni)
+ return self.decide_source(dependency, target, prev_ni, repo_node)
- def _changed_content(self, dependency, target, prev_ni):
- return dependency.changed_content(target, prev_ni)
+ def _changed_content(self, dependency, target, prev_ni, repo_node=None):
+ return dependency.changed_content(target, prev_ni, repo_node)
- def _changed_source(self, dependency, target, prev_ni):
+ def _changed_source(self, dependency, target, prev_ni, repo_node=None):
target_env = dependency.get_build_env()
type = target_env.get_tgt_sig_type()
if type == 'source':
- return target_env.decide_source(dependency, target, prev_ni)
+ return target_env.decide_source(dependency, target, prev_ni, repo_node)
else:
- return target_env.decide_target(dependency, target, prev_ni)
+ return target_env.decide_target(dependency, target, prev_ni, repo_node)
- def _changed_timestamp_then_content(self, dependency, target, prev_ni):
- return dependency.changed_timestamp_then_content(target, prev_ni)
+ def _changed_timestamp_then_content(self, dependency, target, prev_ni, repo_node=None):
+ return dependency.changed_timestamp_then_content(target, prev_ni, repo_node)
- def _changed_timestamp_newer(self, dependency, target, prev_ni):
- return dependency.changed_timestamp_newer(target, prev_ni)
+ def _changed_timestamp_newer(self, dependency, target, prev_ni, repo_node=None):
+ return dependency.changed_timestamp_newer(target, prev_ni, repo_node)
- def _changed_timestamp_match(self, dependency, target, prev_ni):
- return dependency.changed_timestamp_match(target, prev_ni)
+ def _changed_timestamp_match(self, dependency, target, prev_ni, repo_node=None):
+ return dependency.changed_timestamp_match(target, prev_ni, repo_node)
def _copy_from_cache(self, src, dst):
return self.fs.copy(src, dst)
@@ -1568,12 +1578,12 @@ class Base(SubstitutionEnvironment):
"""
filename = self.subst(filename)
try:
- fp = open(filename, 'r')
+ with open(filename, 'r') as fp:
+ lines = SCons.Util.LogicalLines(fp).readlines()
except IOError:
if must_exist:
raise
return
- lines = SCons.Util.LogicalLines(fp).readlines()
lines = [l for l in lines if l[0] != '#']
tdlist = []
for line in lines:
@@ -1722,7 +1732,7 @@ class Base(SubstitutionEnvironment):
dk = [x for x in dk if x not in val]
self._dict[key] = [val] + dk
else:
- if not val in dk:
+ if val not in dk:
self._dict[key] = [val] + dk
else:
if delete_existing:
@@ -2299,7 +2309,20 @@ class OverrideEnvironment(Base):
# Methods that make this class act like a proxy.
def __getattr__(self, name):
- return getattr(self.__dict__['__subject'], name)
+ attr = getattr(self.__dict__['__subject'], name)
+ # Here we check if attr is one of the Wrapper classes. For
+ # example when a pseudo-builder is being called from an
+ # OverrideEnvironment.
+ #
+ # These wrappers when they're constructed capture the
+ # Environment they are being constructed with and so will not
+ # have access to overrided values. So we rebuild them with the
+ # OverrideEnvironment so they have access to overrided values.
+ if isinstance(attr, (MethodWrapper, BuilderWrapper)):
+ return attr.clone(self)
+ else:
+ return attr
+
def __setattr__(self, name, value):
setattr(self.__dict__['__subject'], name, value)
@@ -2372,6 +2395,7 @@ class OverrideEnvironment(Base):
kw = copy_non_reserved_keywords(kw)
self.__dict__['overrides'].update(semi_deepcopy(kw))
+
# The entry point that will be used by the external world
# to refer to a construction environment. This allows the wrapper
# interface to extend a construction environment for its own purposes
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Errors.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Errors.py
index 1797ea91f3e..d6e1d4a2727 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Errors.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Errors.py
@@ -28,7 +28,7 @@ and user errors in SCons.
"""
-__revision__ = "src/engine/SCons/Errors.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Errors.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import shutil
import SCons.Util
@@ -124,7 +124,7 @@ class UserError(Exception):
class StopError(Exception):
pass
-class EnvironmentError(Exception):
+class SConsEnvironmentError(Exception):
pass
class MSVCError(IOError):
@@ -184,7 +184,7 @@ def convert_to_BuildError(status, exc_info=None):
filename=filename,
exc_info=exc_info)
- elif isinstance(status, (EnvironmentError, OSError, IOError)):
+ elif isinstance(status, (SConsEnvironmentError, OSError, IOError)):
# If an IOError/OSError happens, raise a BuildError.
# Report the name of the file or directory that caused the
# error, which might be different from the target being built
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Executor.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Executor.py
index b6d2fb6c447..c3e22f5a103 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Executor.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Executor.py
@@ -28,7 +28,7 @@ Nodes.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import print_function
-__revision__ = "src/engine/SCons/Executor.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Executor.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import collections
@@ -36,15 +36,16 @@ import SCons.Debug
from SCons.Debug import logInstanceCreation
import SCons.Errors
import SCons.Memoize
+import SCons.Util
from SCons.compat import with_metaclass, NoSlotsPyPy
class Batch(object):
"""Remembers exact association between targets
and sources of executor."""
-
+
__slots__ = ('targets',
'sources')
-
+
def __init__(self, targets=[], sources=[]):
self.targets = targets
self.sources = sources
@@ -71,7 +72,7 @@ class TSList(collections.UserList):
return nl[i]
def __getslice__(self, i, j):
nl = self.func()
- i = max(i, 0); j = max(j, 0)
+ i, j = max(i, 0), max(j, 0)
return nl[i:j]
def __str__(self):
nl = self.func()
@@ -127,13 +128,13 @@ def execute_action_list(obj, target, kw):
status = act(*args, **kw)
if isinstance(status, SCons.Errors.BuildError):
status.executor = obj
- raise status
+ raise status # TODO pylint E0702: raising int not allowed
elif status:
msg = "Error %s" % status
raise SCons.Errors.BuildError(
- errstr=msg,
+ errstr=msg,
node=obj.batches[0].targets,
- executor=obj,
+ executor=obj,
action=act)
return status
@@ -572,7 +573,6 @@ def AddBatchExecutor(key, executor):
nullenv = None
-import SCons.Util
class NullEnvironment(SCons.Util.Null):
import SCons.CacheDir
_CacheDir_path = None
@@ -597,7 +597,7 @@ class Null(object, with_metaclass(NoSlotsPyPy)):
disassociate Builders from Nodes entirely, so we're not
going to worry about unit tests for this--at least for now.
"""
-
+
__slots__ = ('pre_actions',
'post_actions',
'env',
@@ -613,9 +613,10 @@ class Null(object, with_metaclass(NoSlotsPyPy)):
'action_list',
'_do_execute',
'_execute_str')
-
+
def __init__(self, *args, **kw):
- if SCons.Debug.track_instances: logInstanceCreation(self, 'Executor.Null')
+ if SCons.Debug.track_instances:
+ logInstanceCreation(self, 'Executor.Null')
self.batches = [Batch(kw['targets'][:], [])]
def get_build_env(self):
return get_NullEnvironment()
@@ -649,7 +650,7 @@ class Null(object, with_metaclass(NoSlotsPyPy)):
"""Morph this Null executor to a real Executor object."""
batches = self.batches
self.__class__ = Executor
- self.__init__([])
+ self.__init__([])
self.batches = batches
# The following methods require morphing this Null Executor to a
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Job.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Job.py
index 8029d43b5ac..a126d1c40fb 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Job.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Job.py
@@ -29,7 +29,7 @@ stop, and wait on jobs.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Job.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Job.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.compat
@@ -53,14 +53,14 @@ interrupt_msg = 'Build interrupted.'
class InterruptState(object):
- def __init__(self):
- self.interrupted = False
+ def __init__(self):
+ self.interrupted = False
- def set(self):
- self.interrupted = True
+ def set(self):
+ self.interrupted = True
- def __call__(self):
- return self.interrupted
+ def __call__(self):
+ return self.interrupted
class Jobs(object):
@@ -87,7 +87,7 @@ class Jobs(object):
stack_size = explicit_stack_size
if stack_size is None:
stack_size = default_stack_size
-
+
try:
self.job = Parallel(taskmaster, num, stack_size)
self.num_jobs = num
@@ -172,14 +172,14 @@ class Serial(object):
"""
def __init__(self, taskmaster):
- """Create a new serial job given a taskmaster.
+ """Create a new serial job given a taskmaster.
The taskmaster's next_task() method should return the next task
that needs to be executed, or None if there are no more tasks. The
taskmaster's executed() method will be called for each task when it
is successfully executed, or failed() will be called if it failed to
execute (e.g. execute() raised an exception)."""
-
+
self.taskmaster = taskmaster
self.interrupted = InterruptState()
@@ -188,7 +188,7 @@ class Serial(object):
and executing them, and return when there are no more tasks. If a task
fails to execute (i.e. execute() raises an exception), then the job will
stop."""
-
+
while True:
task = self.taskmaster.next_task()
@@ -199,7 +199,7 @@ class Serial(object):
task.prepare()
if task.needs_execute():
task.execute()
- except:
+ except Exception:
if self.interrupted():
try:
raise SCons.Errors.BuildError(
@@ -269,7 +269,7 @@ else:
def __init__(self, num, stack_size, interrupted):
"""Create the request and reply queues, and 'num' worker threads.
-
+
One must specify the stack size of the worker threads. The
stack size is specified in kilobytes.
"""
@@ -277,11 +277,11 @@ else:
self.resultsQueue = queue.Queue(0)
try:
- prev_size = threading.stack_size(stack_size*1024)
+ prev_size = threading.stack_size(stack_size*1024)
except AttributeError as e:
# Only print a warning if the stack size has been
# explicitly set.
- if not explicit_stack_size is None:
+ if explicit_stack_size is not None:
msg = "Setting stack size is unsupported by this version of Python:\n " + \
e.args[0]
SCons.Warnings.warn(SCons.Warnings.StackSizeWarning, msg)
@@ -322,7 +322,7 @@ else:
self.requestQueue.put(None)
# Wait for all of the workers to terminate.
- #
+ #
# If we don't do this, later Python versions (2.4, 2.5) often
# seem to raise exceptions during shutdown. This happens
# in requestQueue.get(), as an assertion failure that
@@ -339,7 +339,7 @@ else:
self.workers = []
class Parallel(object):
- """This class is used to execute tasks in parallel, and is somewhat
+ """This class is used to execute tasks in parallel, and is somewhat
less efficient than Serial, but is appropriate for parallel builds.
This class is thread safe.
@@ -373,7 +373,7 @@ else:
an exception), then the job will stop."""
jobs = 0
-
+
while True:
# Start up as many available tasks as we're
# allowed to.
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Memoize.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Memoize.py
index d8912c90aba..6bef437c444 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Memoize.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Memoize.py
@@ -22,7 +22,7 @@
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Memoize.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Memoize.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """Memoizer
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/Alias.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/Alias.py
index 3570a2f6138..302a7044d13 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/Alias.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/Alias.py
@@ -30,7 +30,7 @@ This creates a hash of global Aliases (dummy targets).
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Node/Alias.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Node/Alias.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import collections
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/FS.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/FS.py
index 352aeaebcc6..0d903de2b46 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/FS.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/FS.py
@@ -33,7 +33,7 @@ that can be used by scripts or modules looking for the canonical default.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import print_function
-__revision__ = "src/engine/SCons/Node/FS.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Node/FS.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import fnmatch
import os
@@ -57,19 +57,11 @@ import SCons.Util
import SCons.Warnings
from SCons.Debug import Trace
-from . import DeciderNeedsNode
-
-# SERVER-25436: to work around an issue with python on windows where shutil.copy<2> methods
-# didn't appropriately close files, which caused build failures with the cached build.
-if sys.platform == "win32":
- import win32api
- _copy = _copy2 = win32api.CopyFile
-else:
- _copy = shutil.copy
- _copy2 = shutil.copy2
print_duplicate = 0
+MD5_TIMESTAMP_DEBUG = False
+
def sconsign_none(node):
raise NotImplementedError
@@ -265,7 +257,7 @@ else:
_softlink_func = None
def _copy_func(fs, src, dest):
- _copy2(src, dest)
+ shutil.copy2(src, dest)
st = fs.stat(src)
fs.chmod(dest, stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE)
@@ -289,7 +281,7 @@ def set_duplicate(duplicate):
'copy' : _copy_func
}
- if not duplicate in Valid_Duplicates:
+ if duplicate not in Valid_Duplicates:
raise SCons.Errors.InternalError("The argument of set_duplicate "
"should be in Valid_Duplicates")
global Link_Funcs
@@ -487,7 +479,7 @@ class EntryProxy(SCons.Util.Proxy):
return SCons.Subst.SpecialAttrWrapper(r, entry.name + "_posix")
def __get_windows_path(self):
- """Return the path with \ as the path separator,
+ r"""Return the path with \ as the path separator,
regardless of platform."""
if OS_SEP == '\\':
return self
@@ -538,7 +530,7 @@ class EntryProxy(SCons.Util.Proxy):
except KeyError:
try:
attr = SCons.Util.Proxy.__getattr__(self, name)
- except AttributeError as e:
+ except AttributeError:
# Raise our own AttributeError subclass with an
# overridden __str__() method that identifies the
# name of the entry that caused the exception.
@@ -706,13 +698,13 @@ class Base(SCons.Node.Node):
@SCons.Memoize.CountMethodCall
def stat(self):
- try:
+ try:
return self._memo['stat']
- except KeyError:
+ except KeyError:
pass
- try:
+ try:
result = self.fs.stat(self.get_abspath())
- except os.error:
+ except os.error:
result = None
self._memo['stat'] = result
@@ -726,16 +718,16 @@ class Base(SCons.Node.Node):
def getmtime(self):
st = self.stat()
- if st:
+ if st:
return st[stat.ST_MTIME]
- else:
+ else:
return None
def getsize(self):
st = self.stat()
- if st:
+ if st:
return st[stat.ST_SIZE]
- else:
+ else:
return None
def isdir(self):
@@ -1102,9 +1094,9 @@ class LocalFS(object):
def chmod(self, path, mode):
return os.chmod(path, mode)
def copy(self, src, dst):
- return _copy(src, dst)
+ return shutil.copy(src, dst)
def copy2(self, src, dst):
- return _copy2(src, dst)
+ return shutil.copy2(src, dst)
def exists(self, path):
return os.path.exists(path)
def getmtime(self, path):
@@ -1425,7 +1417,7 @@ class FS(LocalFS):
self.Top.addRepository(d)
def PyPackageDir(self, modulename):
- """Locate the directory of a given python module name
+ r"""Locate the directory of a given python module name
For example scons might resolve to
Windows: C:\Python27\Lib\site-packages\scons-2.5.1
@@ -1696,7 +1688,7 @@ class Dir(Base):
return result
def addRepository(self, dir):
- if dir != self and not dir in self.repositories:
+ if dir != self and dir not in self.repositories:
self.repositories.append(dir)
dir._tpath = '.'
self.__clearRepositoryCache()
@@ -1736,7 +1728,7 @@ class Dir(Base):
if self is other:
result = '.'
- elif not other in self._path_elements:
+ elif other not in self._path_elements:
try:
other_dir = other.get_dir()
except AttributeError:
@@ -2268,7 +2260,7 @@ class RootDir(Dir):
this directory.
"""
- __slots__ = ['_lookupDict']
+ __slots__ = ('_lookupDict', )
def __init__(self, drive, fs):
if SCons.Debug.track_instances: logInstanceCreation(self, 'Node.FS.RootDir')
@@ -2474,7 +2466,7 @@ class FileNodeInfo(SCons.Node.NodeInfoBase):
"""
state = getattr(self, '__dict__', {}).copy()
for obj in type(self).mro():
- for name in getattr(obj,'__slots__',()):
+ for name in getattr(obj, '__slots__', ()):
if hasattr(self, name):
state[name] = getattr(self, name)
@@ -2518,7 +2510,7 @@ class FileBuildInfo(SCons.Node.BuildInfoBase):
or count of any of these could yield writing wrong csig, and then false positive
rebuilds
"""
- __slots__ = ('dependency_map')
+ __slots__ = ['dependency_map', ]
current_version_id = 2
def __setattr__(self, key, value):
@@ -3290,14 +3282,14 @@ class File(Base):
self._memo['changed'] = has_changed
return has_changed
- def changed_content(self, target, prev_ni):
+ def changed_content(self, target, prev_ni, repo_node=None):
cur_csig = self.get_csig()
try:
return cur_csig != prev_ni.csig
except AttributeError:
return 1
- def changed_state(self, target, prev_ni):
+ def changed_state(self, target, prev_ni, repo_node=None):
return self.state != SCons.Node.up_to_date
@@ -3324,13 +3316,26 @@ class File(Base):
len(binfo.bimplicitsigs)) == 0:
return {}
-
- # store this info so we can avoid regenerating it.
- binfo.dependency_map = { str(child):signature for child, signature in zip(chain(binfo.bsources, binfo.bdepends, binfo.bimplicit),
+ binfo.dependency_map = { child:signature for child, signature in zip(chain(binfo.bsources, binfo.bdepends, binfo.bimplicit),
chain(binfo.bsourcesigs, binfo.bdependsigs, binfo.bimplicitsigs))}
return binfo.dependency_map
+ # @profile
+ def _add_strings_to_dependency_map(self, dmap):
+ """
+ In the case comparing node objects isn't sufficient, we'll add the strings for the nodes to the dependency map
+ :return:
+ """
+
+ first_string = str(next(iter(dmap)))
+
+ # print("DMAP:%s"%id(dmap))
+ if first_string not in dmap:
+ string_dict = {str(child): signature for child, signature in dmap.items()}
+ dmap.update(string_dict)
+ return dmap
+
def _get_previous_signatures(self, dmap):
"""
Return a list of corresponding csigs from previous
@@ -3344,17 +3349,57 @@ class File(Base):
List of csigs for provided list of children
"""
prev = []
+ # MD5_TIMESTAMP_DEBUG = False
- # First try the simple name for node
- c_str = str(self)
- df = dmap.get(c_str, None)
+ if len(dmap) == 0:
+ if MD5_TIMESTAMP_DEBUG: print("Nothing dmap shortcutting")
+ return None
+ elif MD5_TIMESTAMP_DEBUG: print("len(dmap):%d"%len(dmap))
+
+
+ # First try retrieving via Node
+ if MD5_TIMESTAMP_DEBUG: print("Checking if self is in map:%s id:%s type:%s"%(str(self), id(self), type(self)))
+ df = dmap.get(self, False)
if df:
return df
- # If not found swap alstep for sep (\ -> /) and try again
+ # Now check if self's repository file is in map.
+ rf = self.rfile()
+ if MD5_TIMESTAMP_DEBUG: print("Checking if self.rfile is in map:%s id:%s type:%s"%(str(rf), id(rf), type(rf)))
+ rfm = dmap.get(rf, False)
+ if rfm:
+ return rfm
+
+ # get default string for node and then also string swapping os.altsep for os.sep (/ for \)
+ c_strs = [str(self)]
+
if os.altsep:
- c_str = c_str.replace(os.sep, os.altsep)
- df = dmap.get(c_str, None)
+ c_strs.append(c_strs[0].replace(os.sep, os.altsep))
+
+ # In some cases the dependency_maps' keys are already strings check.
+ # Check if either string is now in dmap.
+ for s in c_strs:
+ if MD5_TIMESTAMP_DEBUG: print("Checking if str(self) is in map :%s" % s)
+ df = dmap.get(s, False)
+ if df:
+ return df
+
+ # Strings don't exist in map, add them and try again
+ # If there are no strings in this dmap, then add them.
+ # This may not be necessary, we could walk the nodes in the dmap and check each string
+ # rather than adding ALL the strings to dmap. In theory that would be n/2 vs 2n str() calls on node
+ # if not dmap.has_strings:
+ dmap = self._add_strings_to_dependency_map(dmap)
+
+ # In some cases the dependency_maps' keys are already strings check.
+ # Check if either string is now in dmap.
+ for s in c_strs:
+ if MD5_TIMESTAMP_DEBUG: print("Checking if str(self) is in map (now with strings) :%s" % s)
+ df = dmap.get(s, False)
+ if df:
+ return df
+
+ # Lastly use nodes get_path() to generate string and see if that's in dmap
if not df:
try:
# this should yield a path which matches what's in the sconsign
@@ -3362,6 +3407,8 @@ class File(Base):
if os.altsep:
c_str = c_str.replace(os.sep, os.altsep)
+ if MD5_TIMESTAMP_DEBUG: print("Checking if self.get_path is in map (now with strings) :%s" % s)
+
df = dmap.get(c_str, None)
except AttributeError as e:
@@ -3377,22 +3424,20 @@ class File(Base):
file and just copy the prev_ni provided. If the prev_ni
is wrong. It will propagate it.
See: https://github.com/SCons/scons/issues/2980
-
+
Args:
self - dependency
target - target
prev_ni - The NodeInfo object loaded from previous builds .sconsign
- node - Node instance. This is the only changed* function which requires
- node to function. So if we detect that it's not passed.
- we throw DeciderNeedsNode, and caller should handle this and pass node.
+ node - Node instance. Check this node for file existence/timestamp
+ if specified.
- Returns:
+ Returns:
Boolean - Indicates if node(File) has changed.
"""
- if node is None:
- # We need required node argument to get BuildInfo to function
- raise DeciderNeedsNode(self.changed_timestamp_then_content)
+ if node is None:
+ node = self
# Now get sconsign name -> csig map and then get proper prev_ni if possible
bi = node.get_stored_info().binfo
rebuilt = False
@@ -3402,25 +3447,43 @@ class File(Base):
dependency_map = self._build_dependency_map(bi)
rebuilt = True
- prev_ni = self._get_previous_signatures(dependency_map)
+ if len(dependency_map) == 0:
+ # If there's no dependency map, there's no need to find the
+ # prev_ni as there aren't any
+ # shortcut the rest of the logic
+ if MD5_TIMESTAMP_DEBUG: print("Skipping checks len(dmap)=0")
+
+ # We still need to get the current file's csig
+ # This should be slightly faster than calling self.changed_content(target, new_prev_ni)
+ self.get_csig()
+ return True
+
+ new_prev_ni = self._get_previous_signatures(dependency_map)
+ new = self.changed_timestamp_match(target, new_prev_ni)
+
+ if MD5_TIMESTAMP_DEBUG:
+ old = self.changed_timestamp_match(target, prev_ni)
- if not self.changed_timestamp_match(target, prev_ni):
+ if old != new:
+ print("Mismatch self.changed_timestamp_match(%s, prev_ni) old:%s new:%s"%(str(target), old, new))
+ new_prev_ni = self._get_previous_signatures(dependency_map)
+
+ if not new:
try:
# NOTE: We're modifying the current node's csig in a query.
- self.get_ninfo().csig = prev_ni.csig
+ self.get_ninfo().csig = new_prev_ni.csig
except AttributeError:
pass
return False
+ return self.changed_content(target, new_prev_ni)
- return self.changed_content(target, prev_ni)
-
- def changed_timestamp_newer(self, target, prev_ni):
+ def changed_timestamp_newer(self, target, prev_ni, repo_node=None):
try:
return self.get_timestamp() > target.get_timestamp()
except AttributeError:
return 1
- def changed_timestamp_match(self, target, prev_ni):
+ def changed_timestamp_match(self, target, prev_ni, repo_node=None):
"""
Return True if the timestamps don't match or if there is no previous timestamp
:param target:
@@ -3433,14 +3496,18 @@ class File(Base):
return 1
def is_up_to_date(self):
+ """Check for whether the Node is current
+ In all cases self is the target we're checking to see if it's up to date
+ """
+
T = 0
if T: Trace('is_up_to_date(%s):' % self)
if not self.exists():
if T: Trace(' not self.exists():')
- # The file doesn't exist locally...
+ # The file (always a target) doesn't exist locally...
r = self.rfile()
if r != self:
- # ...but there is one in a Repository...
+ # ...but there is one (always a target) in a Repository...
if not self.changed(r):
if T: Trace(' changed(%s):' % r)
# ...and it's even up-to-date...
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/Python.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/Python.py
index 5229b0568dc..8726332fcfd 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/Python.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/Python.py
@@ -27,7 +27,7 @@ Python nodes.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Node/Python.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Node/Python.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Node
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/__init__.py
index ece0ab7312b..c1f8d8981a4 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/__init__.py
@@ -43,7 +43,7 @@ from __future__ import print_function
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Node/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Node/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import collections
@@ -55,7 +55,6 @@ try:
except ImportError:
from itertools import izip_longest as zip_longest
-
import SCons.Debug
from SCons.Debug import logInstanceCreation
import SCons.Executor
@@ -109,9 +108,9 @@ implicit_deps_changed = 0
# A variable that can be set to an interface-specific function be called
# to annotate a Node with information about its creation.
-def do_nothing(node): pass
+def do_nothing_node(node): pass
-Annotate = do_nothing
+Annotate = do_nothing_node
# Gets set to 'True' if we're running in interactive mode. Is
# currently used to release parts of a target's info during
@@ -254,25 +253,10 @@ _target_from_source_map = {0 : target_from_source_none,
# used by it.
#
-
-class DeciderNeedsNode(Exception):
- """
- Indicate that the decider needs the node as well as the target and the dependency.
- Normally the node and the target are the same, but in the case of repository
- They may be different. Also the NodeInfo is retrieved from the node
- """
- def __init__(self, call_this_decider):
- """
- :param call_this_decider: to return the decider to call directly since deciders
- are called through several levels of indirection
- """
- self.decider = call_this_decider
-
-
#
# First, the single decider functions
#
-def changed_since_last_build_node(node, target, prev_ni):
+def changed_since_last_build_node(node, target, prev_ni, repo_node=None):
"""
Must be overridden in a specific subclass to return True if this
@@ -293,7 +277,7 @@ def changed_since_last_build_node(node, target, prev_ni):
raise NotImplementedError
-def changed_since_last_build_alias(node, target, prev_ni):
+def changed_since_last_build_alias(node, target, prev_ni, repo_node=None):
cur_csig = node.get_csig()
try:
return cur_csig != prev_ni.csig
@@ -301,24 +285,24 @@ def changed_since_last_build_alias(node, target, prev_ni):
return 1
-def changed_since_last_build_entry(node, target, prev_ni):
+def changed_since_last_build_entry(node, target, prev_ni, repo_node=None):
node.disambiguate()
- return _decider_map[node.changed_since_last_build](node, target, prev_ni)
+ return _decider_map[node.changed_since_last_build](node, target, prev_ni, repo_node)
-def changed_since_last_build_state_changed(node, target, prev_ni):
+def changed_since_last_build_state_changed(node, target, prev_ni, repo_node=None):
return node.state != SCons.Node.up_to_date
-def decide_source(node, target, prev_ni):
- return target.get_build_env().decide_source(node, target, prev_ni)
+def decide_source(node, target, prev_ni, repo_node=None):
+ return target.get_build_env().decide_source(node, target, prev_ni, repo_node)
-def decide_target(node, target, prev_ni):
- return target.get_build_env().decide_target(node, target, prev_ni)
+def decide_target(node, target, prev_ni, repo_node=None):
+ return target.get_build_env().decide_target(node, target, prev_ni, repo_node)
-def changed_since_last_build_python(node, target, prev_ni):
+def changed_since_last_build_python(node, target, prev_ni, repo_node=None):
cur_csig = node.get_csig()
try:
return cur_csig != prev_ni.csig
@@ -535,7 +519,7 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
__slots__ = ['sources',
'sources_set',
- 'target_peers',
+ 'target_peers',
'_specific_sources',
'depends',
'depends_set',
@@ -790,12 +774,26 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
# waiting for this Node to be built.
for parent in self.waiting_parents:
parent.implicit = None
+
+ # Handle issue where builder emits more than one target and
+ # the source file for the builder is generated.
+ # in that case only the first target was getting it's .implicit
+ # cleared when the source file is built (second scan).
+ # leaving only partial implicits from scan before source file is generated
+ # typically the compiler only. Then scanned files are appended
+ # This is persisted to sconsign and rebuild causes false rebuilds
+ # because the ordering of the implicit list then changes to what it
+ # should have been.
+ # This is at least the following bugs
+ # https://github.com/SCons/scons/issues/2811
+ # https://jira.mongodb.org/browse/SERVER-33111
try:
for peer in parent.target_peers:
peer.implicit = None
- except AttributeError as e:
+ except AttributeError:
pass
+
self.clear()
if self.pseudo:
@@ -1172,7 +1170,7 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
binfo.bactsig = SCons.Util.MD5signature(executor.get_contents())
if self._specific_sources:
- sources = [s for s in self.sources if not s in ignore_set]
+ sources = [s for s in self.sources if s not in ignore_set]
else:
sources = executor.get_unignored_sources(self, self.ignore)
@@ -1492,17 +1490,11 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
result = True
for child, prev_ni in zip(children, then):
- try:
- if _decider_map[child.changed_since_last_build](child, self, prev_ni):
- if t: Trace(': %s changed' % child)
- result = True
- except DeciderNeedsNode as e:
- if e.decider(self, prev_ni, node=node):
- if t: Trace(': in DeciderNeedsNode logic %s changed' % child)
- result = True
+ if _decider_map[child.changed_since_last_build](child, self, prev_ni, node):
+ if t: Trace(': %s changed' % child)
+ result = True
if self.has_builder():
- import SCons.Util
contents = self.get_executor().get_contents()
newsig = SCons.Util.MD5signature(contents)
if bi.bactsig != newsig:
@@ -1659,20 +1651,17 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
lines = []
- removed = [x for x in old_bkids if not x in new_bkids]
+ removed = [x for x in old_bkids if x not in new_bkids]
if removed:
removed = [stringify(r) for r in removed]
fmt = "`%s' is no longer a dependency\n"
lines.extend([fmt % s for s in removed])
for k in new_bkids:
- if not k in old_bkids:
+ if k not in old_bkids:
lines.append("`%s' is a new dependency\n" % stringify(k))
else:
- try:
- changed = _decider_map[k.changed_since_last_build](k, self, osig[k])
- except DeciderNeedsNode as e:
- changed = e.decider(self, osig[k], node=self)
+ changed = _decider_map[k.changed_since_last_build](k, self, osig[k])
if changed:
lines.append("`%s' changed\n" % stringify(k))
@@ -1687,7 +1676,7 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
lines.append("Old:%s\tNew:%s\n"%(o,n))
lines.append("->Implicit\n")
for (o,n) in zip_longest(old.bimplicit, new.bimplicit, fillvalue=None):
- lines.append("Old:%s\tNew:%s\n"%(o,n))
+ lines.append("Old:%s\tNew:%s\n"%(o,n))
if len(lines) == 0:
def fmt_with_title(title, strlines):
@@ -1730,7 +1719,6 @@ class Walker(object):
This is depth-first, children are visited before the parent.
The Walker object can be initialized with any node, and
returns the next node on the descent with each get_next() call.
- 'kids_func' is an optional function that will be called to
get the children of a node instead of calling 'children'.
'cycle_func' is an optional function that will be called
when a cycle is detected.
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/PathList.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/PathList.py
index 61254cfd473..8de79df7e93 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/PathList.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/PathList.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/PathList.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/PathList.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """SCons.PathList
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/__init__.py
index 61bbb9571fd..66bff4911b6 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/__init__.py
@@ -43,11 +43,11 @@ their own platform definition.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Platform/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.compat
-import imp
+import importlib
import os
import sys
import tempfile
@@ -101,13 +101,8 @@ def platform_module(name = platform_default()):
eval(full_name)
else:
try:
- file, path, desc = imp.find_module(name,
- sys.modules['SCons.Platform'].__path__)
- try:
- mod = imp.load_module(full_name, file, path, desc)
- finally:
- if file:
- file.close()
+ # the specific platform module is a relative import
+ mod = importlib.import_module("." + name, __name__)
except ImportError:
try:
import zipimport
@@ -155,9 +150,9 @@ class TempFileMunge(object):
env["TEMPFILEPREFIX"] = '' # (the empty string) PC Lint
You can configure the extension of the temporary file through the
- TEMPFILEEXTENSION variable, which defaults to '.lnk' (see comments
+ TEMPFILESUFFIX variable, which defaults to '.lnk' (see comments
in the code below):
- env["TEMPFILEEXTENSION"] = '.lnt' # PC Lint
+ env["TEMPFILESUFFIX"] = '.lnt' # PC Lint
"""
def __init__(self, cmd, cmdstr = None):
self.cmd = cmd
@@ -231,8 +226,10 @@ class TempFileMunge(object):
prefix = '@'
args = list(map(SCons.Subst.quote_spaces, cmd[1:]))
- os.write(fd, bytearray(" ".join(args) + "\n",'utf-8'))
+ join_char = env.get('TEMPFILEARGJOIN',' ')
+ os.write(fd, bytearray(join_char.join(args) + "\n",'utf-8'))
os.close(fd)
+
# XXX Using the SCons.Action.print_actions value directly
# like this is bogus, but expedient. This class should
# really be rewritten as an Action that defines the
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/aix.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/aix.py
index b49768b19c4..de61c163926 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/aix.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/aix.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/aix.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/aix.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import subprocess
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/cygwin.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/cygwin.py
index 4c9f177209f..d630be3fdab 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/cygwin.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/cygwin.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/cygwin.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/cygwin.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import sys
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/darwin.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/darwin.py
index a0aab823d80..a5bfc5217a8 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/darwin.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/darwin.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/darwin.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/darwin.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import posix
import os
@@ -56,12 +56,11 @@ def generate(env):
for file in filelist:
if os.path.isfile(file):
- f = open(file, 'r')
- lines = f.readlines()
- for line in lines:
- if line:
- env.AppendENVPath('PATHOSX', line.strip('\n'))
- f.close()
+ with open(file, 'r') as f:
+ lines = f.readlines()
+ for line in lines:
+ if line:
+ env.AppendENVPath('PATHOSX', line.strip('\n'))
# Not sure why this wasn't the case all along?
if env['ENV'].get('PATHOSX', False) and os.environ.get('SCONS_USE_MAC_PATHS', False):
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/hpux.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/hpux.py
index 6d73ad142d8..d49d1a8f0cf 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/hpux.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/hpux.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/hpux.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/hpux.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import posix
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/irix.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/irix.py
index fbd3750e1ee..687f3e178ce 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/irix.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/irix.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/irix.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/irix.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import posix
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/mingw.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/mingw.py
index 2114e6f887e..010e72adaf9 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/mingw.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/mingw.py
@@ -27,7 +27,7 @@ Platform-specific initialization for the MinGW system.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/mingw.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/mingw.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import sys
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/os2.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/os2.py
index 91cd262d816..bd414cf3edc 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/os2.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/os2.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/os2.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/os2.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import win32
def generate(env):
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/posix.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/posix.py
index d44face6d91..c1e43ca364d 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/posix.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/posix.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/posix.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/posix.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import errno
import os
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/sunos.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/sunos.py
index 73f9a2c1b49..a9a7d970f33 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/sunos.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/sunos.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/sunos.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/sunos.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import posix
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/virtualenv.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/virtualenv.py
index 43fc8898f7c..ae3068d57f1 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/virtualenv.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/virtualenv.py
@@ -26,7 +26,7 @@ Support for virtualenv.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/virtualenv.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/virtualenv.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import sys
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/win32.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/win32.py
index b54b8c55aab..3eff40f7c0b 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Platform/win32.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Platform/win32.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/win32.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Platform/win32.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
@@ -43,6 +43,10 @@ from SCons.Platform.virtualenv import ImportVirtualenv
from SCons.Platform.virtualenv import ignore_virtualenv, enable_virtualenv
import SCons.Util
+CHOCO_DEFAULT_PATH = [
+ r'C:\ProgramData\chocolatey\bin'
+]
+
try:
import msvcrt
import win32api
@@ -189,7 +193,7 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr):
# actually do the spawn
try:
- args = [sh, '/C', escape(' '.join(args)) ]
+ args = [sh, '/C', escape(' '.join(args))]
ret = spawnve(os.P_WAIT, sh, args, env)
except OSError as e:
# catch any error
@@ -203,15 +207,17 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr):
# and do clean up stuff
if stdout is not None and stdoutRedirected == 0:
try:
- stdout.write(open( tmpFileStdout, "r" ).read())
- os.remove( tmpFileStdout )
+ with open(tmpFileStdout, "r" ) as tmp:
+ stdout.write(tmp.read())
+ os.remove(tmpFileStdout)
except (IOError, OSError):
pass
if stderr is not None and stderrRedirected == 0:
try:
- stderr.write(open( tmpFileStderr, "r" ).read())
- os.remove( tmpFileStderr )
+ with open(tmpFileStderr, "r" ) as tmp:
+ stderr.write(tmp.read())
+ os.remove(tmpFileStderr)
except (IOError, OSError):
pass
return ret
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/SConf.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/SConf.py
index 177f1c275c3..c6bbda6149b 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/SConf.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/SConf.py
@@ -35,7 +35,7 @@ libraries are installed, if some command line options are supported etc.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/SConf.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/SConf.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.compat
@@ -56,7 +56,6 @@ import SCons.Warnings
import SCons.Conftest
from SCons.Debug import Trace
-from SCons.Node import DeciderNeedsNode
# Turn off the Conftest error logging
SCons.Conftest.LogInputFiles = 0
@@ -247,6 +246,7 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask):
# ConfigureCacheError and if yes, reraise the exception
exc_type = self.exc_info()[0]
if issubclass(exc_type, SConfError):
+ # TODO pylint E0704: bare raise not inside except
raise
elif issubclass(exc_type, SCons.Errors.BuildError):
# we ignore Build Errors (occurs, when a test doesn't pass)
@@ -276,7 +276,7 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask):
if T: Trace(': SConfBuildInfo')
if cache_mode == CACHE:
t.set_state(SCons.Node.up_to_date)
- if T: Trace(': cache_mode == CACHE :set_state(up_to-date)')
+ if T: Trace(': set_state(up_to-date)')
else:
if T: Trace(': get_state() %s' % t.get_state())
if T: Trace(': changed() %s' % t.changed())
@@ -306,7 +306,6 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask):
raise ConfigureCacheError(self.targets[0])
elif cache_mode == FORCE:
is_up_to_date = 0
- pass
if cached_error and is_up_to_date:
self.display("Building \"%s\" failed in a previous run and all "
@@ -396,7 +395,6 @@ class SConfBase(object):
"""
global SConfFS
-
# Now create isolated override so setting source_decider doesn't affect parent Environment
if cache_mode == FORCE:
self.original_env = env
@@ -408,12 +406,10 @@ class SConfBase(object):
# that the correct .sconsign info will get calculated
# and keep the build state consistent.
def force_build(dependency, target, prev_ni,
- env_decider=env.decide_source,
- node=None):
+ repo_node=None,
+ env_decider=env.decide_source):
try:
- env_decider(dependency, target, prev_ni)
- except DeciderNeedsNode as e:
- e.decider(target, prev_ni, node=target)
+ env_decider(dependency, target, prev_ni, repo_node)
except Exception as e:
raise e
return True
@@ -424,12 +420,14 @@ class SConfBase(object):
else:
self.env = env
+ # print("Override env:%s"%env)
+
if not SConfFS:
SConfFS = SCons.Node.FS.default_fs or \
SCons.Node.FS.FS(env.fs.pathTop)
if sconf_global is not None:
raise SCons.Errors.UserError
- self.env = env
+
if log_file is not None:
log_file = SConfFS.File(env.subst(log_file))
self.logfile = log_file
@@ -469,12 +467,6 @@ class SConfBase(object):
"""
self._shutdown()
- # Now reset the decider if we changed it due to --config=force
- # We saved original Environment passed in and cloned it to isolate
- # it from being changed.
- if cache_mode == FORCE:
- self.env.Decider(self.original_env.decide_source)
-
return self.env
def Define(self, name, value = None, comment = None):
@@ -529,17 +521,19 @@ class SConfBase(object):
n.attributes = SCons.Node.Node.Attrs()
n.attributes.keep_targetinfo = 1
- # Some checkers have intermediate files (for example anything that compiles a c file into a program to run
- # Those files need to be set to not release their target info, otherwise taskmaster will throw a
- # Nonetype not callable
- for c in n.children(scan=False):
- # Keep debug code here.
- # print("Checking %s for builders and then setting keep_targetinfo"%c)
- if c.has_builder():
- n.store_info = 0
- if not hasattr(c, 'attributes'):
- c.attributes = SCons.Node.Node.Attrs()
- c.attributes.keep_targetinfo = 1
+ if True:
+ # Some checkers have intermediate files (for example anything that compiles a c file into a program to run
+ # Those files need to be set to not release their target info, otherwise taskmaster will throw a
+ # Nonetype not callable
+ for c in n.children(scan=False):
+ # Keep debug code here.
+ # print("Checking [%s] for builders and then setting keep_targetinfo"%c)
+ if c.has_builder():
+ n.store_info = 0
+ if not hasattr(c, 'attributes'):
+ c.attributes = SCons.Node.Node.Attrs()
+ c.attributes.keep_targetinfo = 1
+ # pass
ret = 1
@@ -547,7 +541,6 @@ class SConfBase(object):
# ToDo: use user options for calc
save_max_drift = SConfFS.get_max_drift()
SConfFS.set_max_drift(0)
-
tm = SCons.Taskmaster.Taskmaster(nodes, SConfBuildTask)
# we don't want to build tests in parallel
jobs = SCons.Job.Jobs(1, tm )
@@ -778,13 +771,21 @@ class SConfBase(object):
self.logstream.write("\n")
self.logstream.close()
self.logstream = None
- # remove the SConfSourceBuilder from the environment
- blds = self.env['BUILDERS']
- del blds['SConfSourceBuilder']
- self.env.Replace( BUILDERS=blds )
+
+ # Now reset the decider if we changed it due to --config=force
+ # We saved original Environment passed in and cloned it to isolate
+ # it from being changed.
+ if cache_mode == FORCE:
+ self.env.Decider(self.original_env.decide_source)
+
+ # remove the SConfSourceBuilder from the environment
+ blds = self.env['BUILDERS']
+ del blds['SConfSourceBuilder']
+ self.env.Replace( BUILDERS=blds )
+
self.active = 0
sconf_global = None
- if not self.config_h is None:
+ if self.config_h is not None:
_ac_config_hs[self.config_h] = self.config_h_text
self.env.fs = self.lastEnvFs
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/SConsign.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/SConsign.py
index ad14ce87f6d..157468ff3f3 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/SConsign.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/SConsign.py
@@ -29,7 +29,7 @@ Writing and reading information to the .sconsign file or files.
from __future__ import print_function
-__revision__ = "src/engine/SCons/SConsign.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/SConsign.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.compat
@@ -76,7 +76,8 @@ def Get_DataBase(dir):
except KeyError:
path = d.entry_abspath(DB_Name)
try: db = DataBase[d] = DB_Module.open(path, mode)
- except (IOError, OSError): pass
+ except (IOError, OSError):
+ pass
else:
if mode != "r":
DB_sync_list.append(db)
@@ -334,10 +335,15 @@ class DirFile(Dir):
Dir.__init__(self, fp, dir)
except KeyboardInterrupt:
raise
- except:
+ except Exception:
SCons.Warnings.warn(SCons.Warnings.CorruptSConsignWarning,
"Ignoring corrupt .sconsign file: %s"%self.sconsign)
+ try:
+ fp.close()
+ except AttributeError:
+ pass
+
global sig_files
sig_files.append(self)
@@ -394,7 +400,8 @@ class DirFile(Dir):
# here, or in any of the following calls, would get
# raised, indicating something like a potentially
# serious disk or network issue.
- open(self.sconsign, 'wb').write(open(fname, 'rb').read())
+ with open(self.sconsign, 'wb') as f, open(fname, 'rb') as f2:
+ f.write(f2.read())
os.chmod(self.sconsign, mode)
try:
os.unlink(temp)
@@ -416,7 +423,7 @@ def File(name, dbm_module=None):
else:
ForDirectory = DB
DB_Name = name
- if not dbm_module is None:
+ if dbm_module is not None:
DB_Module = dbm_module
# Local Variables:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/C.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/C.py
index 59fb7745fb7..d3df545f062 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/C.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/C.py
@@ -27,7 +27,7 @@ This module implements the dependency scanner for C/C++ code.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/C.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/C.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Node.FS
import SCons.Scanner
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/D.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/D.py
index 1b8ec22f1e0..aa018d6d01c 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/D.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/D.py
@@ -30,7 +30,7 @@ Coded by Andy Friesen
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/D.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/D.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Scanner
@@ -46,7 +46,7 @@ class D(SCons.Scanner.Classic):
name = "DScanner",
suffixes = '$DSUFFIXES',
path_variable = 'DPATH',
- regex = '(?:import\s+)([\w\s=,.]+)(?:\s*:[\s\w,=]+)?(?:;)'
+ regex = r'(?:import\s+)([\w\s=,.]+)(?:\s*:[\s\w,=]+)?(?:;)'
)
def find_include(self, include, source_dir, path):
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Dir.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Dir.py
index 9f8b8704da3..0c088206c8e 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Dir.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Dir.py
@@ -20,7 +20,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Scanner/Dir.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/Dir.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Node.FS
import SCons.Scanner
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Fortran.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Fortran.py
index 79ca5d8acc0..50cc16e96d9 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Fortran.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Fortran.py
@@ -26,7 +26,7 @@ This module implements the dependency scanner for Fortran code.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Scanner/Fortran.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/Fortran.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import re
@@ -187,7 +187,7 @@ def FortranScan(path_variable="FORTRANPATH"):
# (\w+) : match the module name that is being USE'd
#
#
- use_regex = "(?i)(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"
+ use_regex = r"(?i)(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"
# The INCLUDE statement regex matches the following:
@@ -275,7 +275,7 @@ def FortranScan(path_variable="FORTRANPATH"):
# set of semicolon-separated INCLUDE statements
# (as allowed by the F2003 standard)
- include_regex = """(?i)(?:^|['">]\s*;)\s*INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])"""
+ include_regex = r"""(?i)(?:^|['">]\s*;)\s*INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])"""
# The MODULE statement regex finds module definitions by matching
# the following:
@@ -285,21 +285,29 @@ def FortranScan(path_variable="FORTRANPATH"):
# but *not* the following:
#
# MODULE PROCEDURE procedure_name
+# MODULE SUBROUTINE subroutine_name
+# MODULE FUNCTION function_name
+# MODULE PURE SUBROUTINE|FUNCTION subroutine_name|function_name
+# MODULE ELEMENTAL SUBROUTINE|FUNCTION subroutine_name|function_name
#
# Here is a breakdown of the regex:
#
-# (?i) : regex is case insensitive
-# ^\s* : any amount of white space
-# MODULE : match the string MODULE, case insensitive
-# \s+ : match one or more white space characters
-# (?!PROCEDURE) : but *don't* match if the next word matches
-# PROCEDURE (negative lookahead assertion),
-# case insensitive
-# (\w+) : match one or more alphanumeric characters
-# that make up the defined module name and
-# save it in a group
-
- def_regex = """(?i)^\s*MODULE\s+(?!PROCEDURE)(\w+)"""
+# (?i) : regex is case insensitive
+# ^\s* : any amount of white space
+# MODULE : match the string MODULE, case
+# insensitive
+# \s+ : match one or more white space
+# characters
+# (?!PROCEDURE|SUBROUTINE|FUNCTION|PURE|ELEMENTAL)
+# : but *don't* match if the next word
+# matches PROCEDURE, SUBROUTINE,
+# FUNCTION, PURE or ELEMENTAL (negative
+# lookahead assertion), case insensitive
+# (\w+) : match one or more alphanumeric
+# characters that make up the defined
+# module name and save it in a group
+
+ def_regex = r"""(?i)^\s*MODULE\s+(?!PROCEDURE|SUBROUTINE|FUNCTION|PURE|ELEMENTAL)(\w+)"""
scanner = F90Scanner("FortranScan",
"$FORTRANSUFFIXES",
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/IDL.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/IDL.py
index b0caa1d08b0..65704d80ac2 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/IDL.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/IDL.py
@@ -28,7 +28,7 @@ Definition Language) files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/IDL.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/IDL.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Node.FS
import SCons.Scanner
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/LaTeX.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/LaTeX.py
index d3d4ba43795..37970d02c66 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/LaTeX.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/LaTeX.py
@@ -27,7 +27,7 @@ This module implements the dependency scanner for LaTeX code.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/LaTeX.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/LaTeX.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
import re
@@ -179,15 +179,7 @@ class LaTeX(SCons.Scanner.Base):
'inputfrom', 'subinputfrom']
def __init__(self, name, suffixes, graphics_extensions, *args, **kw):
-
- # We have to include \n with the % we exclude from the first part
- # part of the regex because the expression is compiled with re.M.
- # Without the \n, the ^ could match the beginning of a *previous*
- # line followed by one or more newline characters (i.e. blank
- # lines), interfering with a match on the next line.
- # add option for whitespace before the '[options]' or the '{filename}'
regex = r'''
- ^[^%\n]*
\\(
include
| includegraphics(?:\s*\[[^\]]+\])?
@@ -348,7 +340,7 @@ class LaTeX(SCons.Scanner.Base):
# Cache the includes list in node so we only scan it once:
# path_dict = dict(list(path))
# add option for whitespace (\s) before the '['
- noopt_cre = re.compile('\s*\[.*$')
+ noopt_cre = re.compile(r'\s*\[.*$')
if node.includes is not None:
includes = node.includes
else:
@@ -372,9 +364,9 @@ class LaTeX(SCons.Scanner.Base):
inc_list = include[2].split(',')
else:
inc_list = include[1].split(',')
- for j in range(len(inc_list)):
- split_includes.append( (inc_type, inc_subdir, inc_list[j]) )
- #
+ for inc in inc_list:
+ split_includes.append((inc_type, inc_subdir, inc))
+
includes = split_includes
node.includes = includes
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Prog.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Prog.py
index c100a09208e..4a5e4780ccc 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/Prog.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/Prog.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/Prog.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/Prog.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Node
import SCons.Node.FS
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/RC.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/RC.py
index 2c2ef4e3077..2bfdfc92ccc 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/RC.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/RC.py
@@ -28,7 +28,7 @@ Definition Language) files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/RC.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/RC.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import re
@@ -48,9 +48,9 @@ def RCScan():
"""Return a prototype Scanner instance for scanning RC source files"""
res_re= r'^(?:\s*#\s*(?:include)|' \
- '.*?\s+(?:ICON|BITMAP|CURSOR|HTML|FONT|MESSAGETABLE|TYPELIB|REGISTRY|D3DFX)' \
- '\s*.*?)' \
- '\s*(<|"| )([^>"\s]+)(?:[>"\s])*$'
+ r'.*?\s+(?:ICON|BITMAP|CURSOR|HTML|FONT|MESSAGETABLE|TYPELIB|REGISTRY|D3DFX)' \
+ r'\s*.*?)' \
+ r'\s*(<|"| )([^>"\s]+)(?:[>"\s])*$'
resScanner = SCons.Scanner.ClassicCPP("ResourceScanner",
"$RCSUFFIXES",
"CPPPATH",
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/SWIG.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/SWIG.py
index 861990dfda1..26f50807936 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/SWIG.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/SWIG.py
@@ -27,14 +27,14 @@ This module implements the dependency scanner for SWIG code.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/SWIG.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/SWIG.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Scanner
SWIGSuffixes = [ '.i' ]
def SWIGScanner():
- expr = '^[ \t]*%[ \t]*(?:include|import|extern)[ \t]*(<|"?)([^>\s"]+)(?:>|"?)'
+ expr = r'^[ \t]*%[ \t]*(?:include|import|extern)[ \t]*(<|"?)([^>\s"]+)(?:>|"?)'
scanner = SCons.Scanner.ClassicCPP("SWIGScanner", ".i", "SWIGPATH", expr)
return scanner
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/__init__.py
index b28dabfc729..f2fa41829d7 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Scanner/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Scanner/__init__.py
@@ -27,7 +27,7 @@ The Scanner package for the SCons software construction utility.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import re
@@ -207,7 +207,7 @@ class Base(object):
self = self.select(node)
- if not self.argument is _null:
+ if self.argument is not _null:
node_list = self.function(node, env, path, self.argument)
else:
node_list = self.function(node, env, path)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/Interactive.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/Interactive.py
index 9bbe104ed14..c75646179a9 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/Interactive.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/Interactive.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import print_function
-__revision__ = "src/engine/SCons/Script/Interactive.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Script/Interactive.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """
SCons interactive mode
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/Main.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/Main.py
index 7d63d3a609b..663e3378faf 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/Main.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/Main.py
@@ -38,7 +38,7 @@ deprecated_python_version = (2, 7, 0)
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/Main.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Script/Main.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.compat
@@ -68,6 +68,20 @@ import SCons.Warnings
import SCons.Script.Interactive
+# Global variables
+first_command_start = None
+last_command_end = None
+print_objects = 0
+print_memoizer = 0
+print_stacktrace = 0
+print_time = 0
+sconscript_time = 0
+cumulative_command_time = 0
+exit_status = 0 # final exit status, assume success by default
+this_build_status = 0 # "exit status" of an individual build
+num_jobs = None
+delayed_warnings = []
+
def fetch_win32_parallel_msg():
# A subsidiary function that exists solely to isolate this import
@@ -87,15 +101,14 @@ def revert_io():
sys.stderr = sys.__stderr__
sys.stdout = sys.__stdout__
+
class SConsPrintHelpException(Exception):
pass
+
display = SCons.Util.display
progress_display = SCons.Util.DisplayEngine()
-first_command_start = None
-last_command_end = None
-
class Progressor(object):
prev = ''
@@ -443,19 +456,6 @@ def python_version_deprecated(version=sys.version_info):
return version < deprecated_python_version
-# Global variables
-
-print_objects = 0
-print_memoizer = 0
-print_stacktrace = 0
-print_time = 0
-sconscript_time = 0
-cumulative_command_time = 0
-exit_status = 0 # final exit status, assume success by default
-this_build_status = 0 # "exit status" of an individual build
-num_jobs = None
-delayed_warnings = []
-
class FakeOptionParser(object):
"""
A do-nothing option parser, used for the initial OptionsParser variable.
@@ -1170,7 +1170,7 @@ def _build_targets(fs, options, targets, target_top):
# -U, local SConscript Default() targets
target_top = fs.Dir(target_top)
def check_dir(x, target_top=target_top):
- if hasattr(x, 'cwd') and not x.cwd is None:
+ if hasattr(x, 'cwd') and x.cwd is not None:
cwd = x.cwd.srcnode()
return cwd == target_top
else:
@@ -1376,7 +1376,7 @@ def main():
revert_io()
except SystemExit as s:
if s:
- exit_status = s
+ exit_status = s.code
except KeyboardInterrupt:
print("scons: Build interrupted.")
sys.exit(2)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/SConsOptions.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/SConsOptions.py
index 258fc1f883a..ae08d418e49 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/SConsOptions.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/SConsOptions.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/SConsOptions.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Script/SConsOptions.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import optparse
import re
@@ -147,7 +147,7 @@ class SConsValues(optparse.Values):
"""
Sets an option from an SConscript file.
"""
- if not name in self.settable:
+ if name not in self.settable:
raise SCons.Errors.UserError("This option is not settable from a SConscript file: %s"%name)
if name == 'num_jobs':
@@ -167,7 +167,7 @@ class SConsValues(optparse.Values):
value = str(value)
except ValueError:
raise SCons.Errors.UserError("A string is required: %s"%repr(value))
- if not value in SCons.Node.FS.Valid_Duplicates:
+ if value not in SCons.Node.FS.Valid_Duplicates:
raise SCons.Errors.UserError("Not a valid duplication style: %s" % value)
# Set the duplicate style right away so it can affect linking
# of SConscript files.
@@ -226,39 +226,8 @@ class SConsOption(optparse.Option):
fmt = "option %s: nargs='?' is incompatible with short options"
raise SCons.Errors.UserError(fmt % self._short_opts[0])
- try:
- _orig_CONST_ACTIONS = optparse.Option.CONST_ACTIONS
-
- _orig_CHECK_METHODS = optparse.Option.CHECK_METHODS
-
- except AttributeError:
- # optparse.Option had no CONST_ACTIONS before Python 2.5.
-
- _orig_CONST_ACTIONS = ("store_const",)
-
- def _check_const(self):
- if self.action not in self.CONST_ACTIONS and self.const is not None:
- raise OptionError(
- "'const' must not be supplied for action %r" % self.action,
- self)
-
- # optparse.Option collects its list of unbound check functions
- # up front. This sucks because it means we can't just override
- # the _check_const() function like a normal method, we have to
- # actually replace it in the list. This seems to be the most
- # straightforward way to do that.
-
- _orig_CHECK_METHODS = [optparse.Option._check_action,
- optparse.Option._check_type,
- optparse.Option._check_choice,
- optparse.Option._check_dest,
- _check_const,
- optparse.Option._check_nargs,
- optparse.Option._check_callback]
-
- CHECK_METHODS = _orig_CHECK_METHODS + [_check_nargs_optional]
-
- CONST_ACTIONS = _orig_CONST_ACTIONS + optparse.Option.TYPED_ACTIONS
+ CHECK_METHODS = optparse.Option.CHECK_METHODS + [_check_nargs_optional]
+ CONST_ACTIONS = optparse.Option.CONST_ACTIONS + optparse.Option.TYPED_ACTIONS
class SConsOptionGroup(optparse.OptionGroup):
"""
@@ -364,7 +333,7 @@ class SConsOptionParser(optparse.OptionParser):
in self.largs, so that any value overridden on the
command line is immediately available if the user turns
around and does a GetOption() right away.
-
+
We mimic the processing of the single args
in the original OptionParser._process_args(), but here we
allow exact matches for long-opts only (no partial
@@ -375,7 +344,7 @@ class SConsOptionParser(optparse.OptionParser):
command-line arguments that
1. haven't been processed so far (self.largs), but
2. are possibly not added to the list of options yet.
-
+
So, when we only have a value for "--myargument" yet,
a command-line argument of "--myarg=test" would set it.
Responsible for this behaviour is the method
@@ -384,7 +353,7 @@ class SConsOptionParser(optparse.OptionParser):
be unique.
This would lead to further confusion, because we might want
to add another option "--myarg" later on (see issue #2929).
-
+
"""
rargs = []
largs_restore = []
@@ -401,7 +370,7 @@ class SConsOptionParser(optparse.OptionParser):
if "=" in l:
# Split into option and value
lopt = l.split("=", 1)
-
+
if lopt[0] in self._long_opt:
# Argument is already known
rargs.append('='.join(lopt))
@@ -416,7 +385,7 @@ class SConsOptionParser(optparse.OptionParser):
skip = True
else:
rargs.append(l)
-
+
# Parse the filtered list
self.parse_args(rargs, self.values)
# Restore the list of remaining arguments for the
@@ -690,7 +659,7 @@ def Parser(version):
metavar="TYPE")
def opt_duplicate(option, opt, value, parser):
- if not value in SCons.Node.FS.Valid_Duplicates:
+ if value not in SCons.Node.FS.Valid_Duplicates:
raise OptionValueError(opt_invalid('duplication', value,
SCons.Node.FS.Valid_Duplicates))
setattr(parser.values, option.dest, value)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/SConscript.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/SConscript.py
index f34a5c0fef3..c0a75f24577 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/SConscript.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/SConscript.py
@@ -27,7 +27,7 @@ files.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/SConscript.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Script/SConscript.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons
import SCons.Action
@@ -278,11 +278,12 @@ def _SConscript(fs, *files, **kw):
pass
try:
try:
-# _file_ = SCons.Util.to_str(_file_)
if Main.print_time:
time1 = time.time()
- exec(compile(_file_.read(), _file_.name, 'exec'),
- call_stack[-1].globals)
+ scriptdata = _file_.read()
+ scriptname = _file_.name
+ _file_.close()
+ exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
except SConscriptReturn:
pass
finally:
@@ -397,9 +398,9 @@ class SConsEnvironment(SCons.Environment.Base):
something like 3.2b1."""
version = version_string.split(' ')[0].split('.')
v_major = int(version[0])
- v_minor = int(re.match('\d+', version[1]).group())
+ v_minor = int(re.match(r'\d+', version[1]).group())
if len(version) >= 3:
- v_revision = int(re.match('\d+', version[2]).group())
+ v_revision = int(re.match(r'\d+', version[2]).group())
else:
v_revision = 0
return v_major, v_minor, v_revision
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/__init__.py
index 927b02340e7..cb44f2b7658 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Script/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Script/__init__.py
@@ -34,7 +34,7 @@ it goes here.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Script/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import time
start_time = time.time()
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Subst.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Subst.py
index d2151fb7201..618adf569bb 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Subst.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Subst.py
@@ -26,7 +26,7 @@ SCons string substitution.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Subst.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Subst.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import collections
import re
@@ -350,7 +350,7 @@ _rm_split = re.compile(r'(?<!\$)(\$[()])')
_regex_remove = [ _rm, None, _rm_split ]
def _rm_list(list):
- return [l for l in list if not l in ('$(', '$)')]
+ return [l for l in list if l not in ('$(', '$)')]
def _remove_list(list):
result = []
@@ -468,7 +468,7 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={
s = lvars[key]
elif key in self.gvars:
s = self.gvars[key]
- elif not NameError in AllowableExceptions:
+ elif NameError not in AllowableExceptions:
raise_exception(NameError(key), lvars['TARGETS'], s)
else:
return ''
@@ -690,7 +690,7 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv
s = lvars[key]
elif key in self.gvars:
s = self.gvars[key]
- elif not NameError in AllowableExceptions:
+ elif NameError not in AllowableExceptions:
raise_exception(NameError(), lvars['TARGETS'], s)
else:
return
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Taskmaster.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Taskmaster.py
index 74ebfd3e360..421e2b2e564 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Taskmaster.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Taskmaster.py
@@ -27,10 +27,10 @@ import sys
__doc__ = """
Generic Taskmaster module for the SCons build engine.
=====================================================
-
+
This module contains the primary interface(s) between a wrapping user
interface and the SCons build engine. There are two key classes here:
-
+
Taskmaster
----------
This is the main engine for walking the dependency graph and
@@ -54,7 +54,7 @@ __doc__ = """
target(s) that it decides need to be evaluated and/or built.
"""
-__revision__ = "src/engine/SCons/Taskmaster.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Taskmaster.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from itertools import chain
import operator
@@ -477,7 +477,7 @@ class Task(object):
for s in t.side_effects:
if s.get_state() == NODE_EXECUTING:
s.set_state(NODE_NO_STATE)
-
+
# The side-effects may have been transferred to
# NODE_NO_STATE by executed_with{,out}_callbacks, but was
# not taken out of the waiting parents/pending children
@@ -551,7 +551,7 @@ class Task(object):
try:
exc_type, exc_value, exc_traceback = exc
except ValueError:
- exc_type, exc_value = exc
+ exc_type, exc_value = exc # pylint: disable=unbalanced-tuple-unpacking
exc_traceback = None
# raise exc_type(exc_value).with_traceback(exc_traceback)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/386asm.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/386asm.py
index e69debab682..16f5beb3216 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/386asm.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/386asm.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/386asm.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/386asm.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.PharLapCommon import addPharLapPaths
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/DCommon.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/DCommon.py
index 031520c3ddf..fca89a1838b 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/DCommon.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/DCommon.py
@@ -31,7 +31,7 @@ Coded by Russel Winder (russel@winder.org.uk)
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/DCommon.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/DCommon.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/FortranCommon.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/FortranCommon.py
index 3ef730aadd4..a5201bbc4bb 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/FortranCommon.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/FortranCommon.py
@@ -28,7 +28,7 @@ Stuff for processing Fortran, common to all fortran dialects.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/FortranCommon.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/FortranCommon.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import re
import os.path
@@ -64,7 +64,8 @@ def _fortranEmitter(target, source, env):
if not node.exists() and not node.is_derived():
print("Could not locate " + str(node.name))
return ([], [])
- mod_regex = """(?i)^\s*MODULE\s+(?!PROCEDURE)(\w+)"""
+ # This has to match the def_regex in the Fortran scanner
+ mod_regex = r"""(?i)^\s*MODULE\s+(?!PROCEDURE|SUBROUTINE|FUNCTION|PURE|ELEMENTAL)(\w+)"""
cre = re.compile(mod_regex,re.M)
# Retrieve all USE'd module names
modules = cre.findall(node.get_text_contents())
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/GettextCommon.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/GettextCommon.py
index a7c5e89c324..057810811b5 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/GettextCommon.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/GettextCommon.py
@@ -4,7 +4,7 @@ Used by several tools of `gettext` toolset.
"""
# Copyright (c) 2001 - 2019 The SCons Foundation
-#
+#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
@@ -12,10 +12,10 @@ Used by several tools of `gettext` toolset.
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
-#
+#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -24,7 +24,7 @@ Used by several tools of `gettext` toolset.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/GettextCommon.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/GettextCommon.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Warnings
import re
@@ -71,7 +71,7 @@ SCons.Warnings.enableWarningClass(MsgfmtNotFound)
#############################################################################
class _POTargetFactory(object):
""" A factory of `PO` target files.
-
+
Factory defaults differ from these of `SCons.Node.FS.FS`. We set `precious`
(this is required by builders and actions gettext) and `noclean` flags by
default for all produced nodes.
@@ -80,9 +80,9 @@ class _POTargetFactory(object):
def __init__(self, env, nodefault=True, alias=None, precious=True
, noclean=True):
""" Object constructor.
-
+
**Arguments**
-
+
- *env* (`SCons.Environment.Environment`)
- *nodefault* (`boolean`) - if `True`, produced nodes will be ignored
from default target `'.'`
@@ -160,13 +160,13 @@ from SCons.Builder import BuilderBase
#############################################################################
class _POFileBuilder(BuilderBase):
""" `PO` file builder.
-
+
This is multi-target single-source builder. In typical situation the source
is single `POT` file, e.g. `messages.pot`, and there are multiple `PO`
targets to be updated from this `POT`. We must run
`SCons.Builder.BuilderBase._execute()` separatelly for each target to track
dependencies separatelly for each target file.
-
+
**NOTE**: if we call `SCons.Builder.BuilderBase._execute(.., target, ...)`
with target being list of all targets, all targets would be rebuilt each time
one of the targets from this list is missing. This would happen, for example,
@@ -198,29 +198,29 @@ class _POFileBuilder(BuilderBase):
# After that it calls emitter (which is quite too late). The emitter is
# also called in each iteration, what makes things yet worse.
def __init__(self, env, **kw):
- if not 'suffix' in kw:
+ if 'suffix' not in kw:
kw['suffix'] = '$POSUFFIX'
- if not 'src_suffix' in kw:
+ if 'src_suffix' not in kw:
kw['src_suffix'] = '$POTSUFFIX'
- if not 'src_builder' in kw:
+ if 'src_builder' not in kw:
kw['src_builder'] = '_POTUpdateBuilder'
- if not 'single_source' in kw:
+ if 'single_source' not in kw:
kw['single_source'] = True
alias = None
if 'target_alias' in kw:
alias = kw['target_alias']
del kw['target_alias']
- if not 'target_factory' in kw:
+ if 'target_factory' not in kw:
kw['target_factory'] = _POTargetFactory(env, alias=alias).File
BuilderBase.__init__(self, **kw)
def _execute(self, env, target, source, *args, **kw):
""" Execute builder's actions.
-
- Here we append to `target` the languages read from `$LINGUAS_FILE` and
+
+ Here we append to `target` the languages read from `$LINGUAS_FILE` and
apply `SCons.Builder.BuilderBase._execute()` separatelly to each target.
The arguments and return value are same as for
- `SCons.Builder.BuilderBase._execute()`.
+ `SCons.Builder.BuilderBase._execute()`.
"""
import SCons.Util
import SCons.Node
@@ -272,7 +272,7 @@ def _translate(env, target=None, source=SCons.Environment._null, *args, **kw):
class RPaths(object):
""" Callable object, which returns pathnames relative to SCons current
working directory.
-
+
It seems like `SCons.Node.FS.Base.get_path()` returns absolute paths
for nodes that are outside of current working directory (`env.fs.getcwd()`).
Here, we often have `SConscript`, `POT` and `PO` files within `po/`
@@ -285,17 +285,17 @@ class RPaths(object):
the references would be correct only on the machine, where `POT` file was
recently re-created. For such reason, we need a function, which always
returns relative paths. This is the purpose of `RPaths` callable object.
-
+
The `__call__` method returns paths relative to current working directory, but
we assume, that *xgettext(1)* is run from the directory, where target file is
going to be created.
-
+
Note, that this may not work for files distributed over several hosts or
across different drives on windows. We assume here, that single local
filesystem holds both source files and target `POT` templates.
-
+
Intended use of `RPaths` - in `xgettext.py`::
-
+
def generate(env):
from GettextCommon import RPaths
...
@@ -318,9 +318,9 @@ class RPaths(object):
def __init__(self, env):
""" Initialize `RPaths` callable object.
-
+
**Arguments**:
-
+
- *env* - a `SCons.Environment.Environment` object, defines *current
working dir*.
"""
@@ -329,16 +329,16 @@ class RPaths(object):
# FIXME: I'm not sure, how it should be implemented (what the *args are in
# general, what is **kw).
def __call__(self, nodes, *args, **kw):
- """ Return nodes' paths (strings) relative to current working directory.
-
+ """ Return nodes' paths (strings) relative to current working directory.
+
**Arguments**:
-
+
- *nodes* ([`SCons.Node.FS.Base`]) - list of nodes.
- *args* - currently unused.
- *kw* - currently unused.
-
+
**Returns**:
-
+
- Tuple of strings, which represent paths relative to current working
directory (for given environment).
"""
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/JavaCommon.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/JavaCommon.py
index ad18b906bfb..6091fdf118d 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/JavaCommon.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/JavaCommon.py
@@ -27,7 +27,7 @@ Stuff for processing Java.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/JavaCommon.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/JavaCommon.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
@@ -42,6 +42,33 @@ default_java_version = '1.4'
# anonymous inner class parsing.
scopeStateVersions = ('1.8')
+# Glob patterns for use in finding where the JDK is.
+# These are pairs, *dir_glob used in the general case,
+# *version_dir_glob if matching only a specific version.
+# For now only used for Windows.
+java_win32_dir_glob = 'C:/Program Files*/Java/jdk*/bin'
+# On windows, since Java 9, there is a dash between 'jdk' and the version
+# string that wasn't there before. this glob should catch either way.
+java_win32_version_dir_glob = 'C:/Program Files*/Java/jdk*%s*/bin'
+
+# Glob patterns for use in finding where the JDK headers are.
+# These are pairs, *dir_glob used in the general case,
+# *version_dir_glob if matching only a specific version.
+java_macos_include_dir_glob = '/System/Library/Frameworks/JavaVM.framework/Headers/'
+java_macos_version_include_dir_glob = '/System/Library/Frameworks/JavaVM.framework/Versions/%s*/Headers/'
+
+java_linux_include_dirs_glob = [
+ '/usr/lib/jvm/default-java/include',
+ '/usr/lib/jvm/java-*/include'
+]
+# Need to match path like below (from Centos 7)
+# /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/include/
+java_linux_version_include_dirs_glob = [
+ '/usr/lib/jvm/java-*-sun-%s*/include',
+ '/usr/lib/jvm/java-%s*-openjdk*/include',
+ '/usr/java/jdk%s*/include'
+]
+
if java_parsing:
# Parse Java files for class names.
#
@@ -64,14 +91,15 @@ if java_parsing:
r'\d*\.\d*|[A-Za-z_][\w\$\.]*|<[A-Za-z_]\w+>|' +
r'/\*|\*/|\[\])')
+
class OuterState(object):
"""The initial state for parsing a Java file for classes,
interfaces, and anonymous inner classes."""
- def __init__(self, version=default_java_version):
- if not version in ('1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7',
- '1.8', '5', '6', '9.0', '10.0', '11.0'):
+ def __init__(self, version=default_java_version):
+ if version not in ('1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7',
+ '1.8', '5', '6', '9.0', '10.0', '11.0', '12.0'):
msg = "Java version %s not supported" % version
raise NotImplementedError(msg)
@@ -131,15 +159,15 @@ if java_parsing:
def closeBracket(self):
self.brackets = self.brackets - 1
if len(self.stackBrackets) and \
- self.brackets == self.stackBrackets[-1]:
+ self.brackets == self.stackBrackets[-1]:
self.listOutputs.append('$'.join(self.listClasses))
self.localClasses.pop()
self.listClasses.pop()
self.anonStacksStack.pop()
self.stackBrackets.pop()
if len(self.stackAnonClassBrackets) and \
- self.brackets == self.stackAnonClassBrackets[-1] and \
- self.version not in scopeStateVersions:
+ self.brackets == self.stackAnonClassBrackets[-1] and \
+ self.version not in scopeStateVersions:
self._getAnonStack().pop()
self.stackAnonClassBrackets.pop()
@@ -152,13 +180,13 @@ if java_parsing:
self.openBracket()
elif token == '}':
self.closeBracket()
- elif token in [ '"', "'" ]:
+ elif token in ['"', "'"]:
return IgnoreState(token, self)
elif token == "new":
# anonymous inner class
if len(self.listClasses) > 0:
return self.__getAnonClassState()
- return self.__getSkipState() # Skip the class name
+ return self.__getSkipState() # Skip the class name
elif token in ['class', 'interface', 'enum']:
if len(self.listClasses) == 0:
self.nextAnon = 1
@@ -178,7 +206,7 @@ if java_parsing:
if self.version in ('1.1', '1.2', '1.3', '1.4'):
clazz = self.listClasses[0]
self.listOutputs.append('%s$%d' % (clazz, self.nextAnon))
- elif self.version in ('1.5', '1.6', '1.7', '1.8', '5', '6', '9.0', '10.0', '11.0'):
+ elif self.version in ('1.5', '1.6', '1.7', '1.8', '5', '6', '9.0', '10.0', '11.0', '12.0'):
self.stackAnonClassBrackets.append(self.brackets)
className = []
className.extend(self.listClasses)
@@ -193,11 +221,13 @@ if java_parsing:
def setPackage(self, package):
self.package = package
+
class ScopeState(object):
"""
A state that parses code within a scope normally,
within the confines of a scope.
"""
+
def __init__(self, old_state):
self.outer_state = old_state.outer_state
self.old_state = old_state
@@ -259,13 +289,16 @@ if java_parsing:
return self.__getSkipState()
return self
+
class AnonClassState(object):
"""A state that looks for anonymous inner classes."""
+
def __init__(self, old_state):
# outer_state is always an instance of OuterState
self.outer_state = old_state.outer_state
self.old_state = old_state
self.brace_level = 0
+
def parseToken(self, token):
# This is an anonymous class if and only if the next
# non-whitespace token is a bracket. Everything between
@@ -293,26 +326,32 @@ if java_parsing:
if token == '{':
self.outer_state.addAnonClass()
if self.outer_state.version in scopeStateVersions:
- return ScopeState(old_state = self.old_state).parseToken(token)
+ return ScopeState(old_state=self.old_state).parseToken(token)
return self.old_state.parseToken(token)
+
class SkipState(object):
"""A state that will skip a specified number of tokens before
reverting to the previous state."""
+
def __init__(self, tokens_to_skip, old_state):
self.tokens_to_skip = tokens_to_skip
self.old_state = old_state
+
def parseToken(self, token):
self.tokens_to_skip = self.tokens_to_skip - 1
if self.tokens_to_skip < 1:
return self.old_state
return self
+
class ClassState(object):
"""A state we go into when we hit a class or interface keyword."""
+
def __init__(self, outer_state):
# outer_state is always an instance of OuterState
self.outer_state = outer_state
+
def parseToken(self, token):
# the next non-whitespace token should be the name of the class
if token == '\n':
@@ -322,12 +361,12 @@ if java_parsing:
# 'Foo$1Inner'
# https://github.com/SCons/scons/issues/2087
if self.outer_state.localClasses and \
- self.outer_state.stackBrackets[-1] > \
- self.outer_state.stackBrackets[-2]+1:
+ self.outer_state.stackBrackets[-1] > \
+ self.outer_state.stackBrackets[-2] + 1:
locals = self.outer_state.localClasses[-1]
try:
idx = locals[token]
- locals[token] = locals[token]+1
+ locals[token] = locals[token] + 1
except KeyError:
locals[token] = 1
token = str(locals[token]) + token
@@ -336,29 +375,39 @@ if java_parsing:
self.outer_state.anonStacksStack.append([0])
return self.outer_state
+
class IgnoreState(object):
"""A state that will ignore all tokens until it gets to a
specified token."""
+
def __init__(self, ignore_until, old_state):
self.ignore_until = ignore_until
self.old_state = old_state
+
def parseToken(self, token):
if self.ignore_until == token:
return self.old_state
return self
+
class PackageState(object):
"""The state we enter when we encounter the package keyword.
We assume the next token will be the package name."""
+
def __init__(self, outer_state):
# outer_state is always an instance of OuterState
self.outer_state = outer_state
+
def parseToken(self, token):
self.outer_state.setPackage(token)
return self.outer_state
+
def parse_java_file(fn, version=default_java_version):
- return parse_java(open(fn, 'r').read(), version)
+ with open(fn, 'r') as f:
+ data = f.read()
+ return parse_java(data, version)
+
def parse_java(contents, version=default_java_version, trace=None):
"""Parse a .java file and return a double of package directory,
@@ -393,81 +442,68 @@ else:
return os.path.split(fn)
-
-java_win32_version_dir_glob = 'C:/Program Files*/Java/jdk%s*/bin'
-java_win32_dir_glob = 'C:/Program Files*/Java/jdk*/bin'
-
-java_macos_include_dir = '/System/Library/Frameworks/JavaVM.framework/Headers/'
-java_macos_version_include_dir = '/System/Library/Frameworks/JavaVM.framework/Versions/%s*/Headers/'
-
-java_linux_include_dirs = ['/usr/lib/jvm/default-java/include',
- '/usr/lib/jvm/java-*/include']
-# Need to match path like below (from Centos 7)
-# /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/include/
-java_linux_version_include_dirs = ['/usr/lib/jvm/java-*-sun-%s*/include',
- '/usr/lib/jvm/java-%s*-openjdk*/include',
- '/usr/java/jdk%s*/include']
-
-
-
def get_java_install_dirs(platform, version=None):
"""
- Using patterns above find the java jdk install dir
- :param platform:
+ Find the java jdk installation directories.
+
+ This list is intended to supply as "default paths" for use when looking
+ up actual java binaries.
+
+ :param platform: selector for search algorithm.
:param version: If specified, only look for java sdk's of this version
:return: list of default paths for java.
"""
+
paths = []
if platform == 'win32':
if version:
- paths = glob.glob(java_win32_version_dir_glob%version)
+ paths = glob.glob(java_win32_version_dir_glob % version)
else:
paths = glob.glob(java_win32_dir_glob)
else:
- # do nothing for now
+ # other platforms, do nothing for now
pass
- paths=sorted(paths)
+ return sorted(paths)
- return paths
def get_java_include_paths(env, javac, version):
"""
- Return java include paths
- :param platform:
- :param javac:
- :return:
+ Find java include paths for JNI building.
+
+ :param env: construction environment, used to extract platform.
+ :param javac: path to detected javac.
+ :return: list of paths.
"""
+
paths = []
if not javac:
# there are no paths if we've not detected javac.
pass
elif env['PLATFORM'] == 'win32':
+ # on Windows, we have the right path to javac, so look locally
javac_bin_dir = os.path.dirname(javac)
java_inc_dir = os.path.normpath(os.path.join(javac_bin_dir, '..', 'include'))
paths = [java_inc_dir, os.path.join(java_inc_dir, 'win32')]
elif env['PLATFORM'] == 'darwin':
if not version:
- paths = [java_macos_include_dir]
+ paths = [java_macos_include_dir_glob]
else:
- paths = sorted(glob.glob(java_macos_version_include_dir%version))
+ paths = sorted(glob.glob(java_macos_version_include_dir_glob % version))
else:
- base_paths=[]
+ base_paths = []
if not version:
- for p in java_linux_include_dirs:
+ for p in java_linux_include_dirs_glob:
base_paths.extend(glob.glob(p))
else:
- for p in java_linux_version_include_dirs:
- base_paths.extend(glob.glob(p%version))
+ for p in java_linux_version_include_dirs_glob:
+ base_paths.extend(glob.glob(p % version))
for p in base_paths:
- paths.extend([p, os.path.join(p,'linux')])
-
- #print("PATHS:%s"%paths)
- return paths
-
-
+ paths.extend([p, os.path.join(p, 'linux')])
+ # print("PATHS:%s"%paths)
+ return paths
# Local Variables:
# tab-width:4
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/__init__.py
index d617aa7053b..67b5be8fa44 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/__init__.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """
Common functions for Microsoft Visual Studio and Visual C/C++.
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/arch.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/arch.py
index ae0b241261f..4475af1af93 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/arch.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/arch.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """Module to define supported Windows chip architectures.
"""
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/common.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/common.py
index a4bd7b301c0..428eabaa5ab 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/common.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/common.py
@@ -25,7 +25,7 @@ Common helper functions for working with the Microsoft tool chain.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import copy
import os
@@ -34,7 +34,6 @@ import re
import SCons.Util
-
LOGFILE = os.environ.get('SCONS_MSCOMMON_DEBUG')
if LOGFILE == '-':
def debug(message):
@@ -117,7 +116,7 @@ def normalize_env(env, keys, force=False):
normenv[k] = copy.deepcopy(env[k])
for k in keys:
- if k in os.environ and (force or not k in normenv):
+ if k in os.environ and (force or k not in normenv):
normenv[k] = os.environ[k]
# This shouldn't be necessary, since the default environment should include system32,
@@ -188,8 +187,10 @@ def get_output(vcbat, args = None, env = None):
# Use the .stdout and .stderr attributes directly because the
# .communicate() method uses the threading module on Windows
# and won't work under Pythons not built with threading.
- stdout = popen.stdout.read()
- stderr = popen.stderr.read()
+ with popen.stdout:
+ stdout = popen.stdout.read()
+ with popen.stderr:
+ stderr = popen.stderr.read()
# Extra debug logic, uncomment if necessary
# debug('get_output():stdout:%s'%stdout)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/netframework.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/netframework.py
index 20d3aa2166d..0ba84a52aaf 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/netframework.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/netframework.py
@@ -20,7 +20,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """
"""
@@ -68,7 +68,7 @@ def query_versions():
# sequence comparison in python is lexicographical
# which is exactly what we want.
# Note we sort backwards so the highest version is first.
- return cmp(bbl,aal)
+ return (aal > bbl) - (aal < bbl)
versions.sort(versrt)
else:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/sdk.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/sdk.py
index 0aac856ce3b..a2adf3d1b39 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/sdk.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/sdk.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """Module to detect the Platform/Windows SDK
@@ -178,6 +178,16 @@ SDK100VCSetupScripts = {'x86' : r'bin\vcvars32.bat',
#
# If you update this list, update the documentation in Tool/mssdk.xml.
SupportedSDKList = [
+ WindowsSDK('10.0A',
+ sanity_check_file=r'bin\SetEnv.Cmd',
+ include_subdir='include',
+ lib_subdir={
+ 'x86' : ['lib'],
+ 'x86_64' : [r'lib\x64'],
+ 'ia64' : [r'lib\ia64'],
+ },
+ vc_setup_scripts = SDK70VCSetupScripts,
+ ),
WindowsSDK('10.0',
sanity_check_file=r'bin\SetEnv.Cmd',
include_subdir='include',
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/vc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/vc.py
index 73d12959c73..f0ae9467514 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/vc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/vc.py
@@ -30,7 +30,7 @@
# * test on 64 bits XP + VS 2005 (and VS 6 if possible)
# * SDK
# * Assembly
-__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """Module for Visual C/C++ detection and configuration.
"""
@@ -60,7 +60,10 @@ class VisualCException(Exception):
class UnsupportedVersion(VisualCException):
pass
-class UnsupportedArch(VisualCException):
+class MSVCUnsupportedHostArch(VisualCException):
+ pass
+
+class MSVCUnsupportedTargetArch(VisualCException):
pass
class MissingConfiguration(VisualCException):
@@ -88,18 +91,16 @@ _ARCH_TO_CANONICAL = {
"arm64" : "arm64",
"aarch64" : "arm64",
}
-
-# get path to the cl.exe dir for newer VS versions
-# based off a tuple of (host, target) platforms
+
_HOST_TARGET_TO_CL_DIR_GREATER_THAN_14 = {
- ("amd64","amd64") : "Hostx64\\x64",
- ("amd64","x86") : "Hostx64\\x86",
- ("amd64","arm") : "Hostx64\\arm",
- ("amd64","arm64") : "Hostx64\\arm64",
- ("x86","amd64") : "Hostx86\\x64",
- ("x86","x86") : "Hostx86\\x86",
- ("x86","arm") : "Hostx86\\arm",
- ("x86","arm64") : "Hostx86\\arm64",
+ ("amd64","amd64") : ("Hostx64","x64"),
+ ("amd64","x86") : ("Hostx64","x86"),
+ ("amd64","arm") : ("Hostx64","arm"),
+ ("amd64","arm64") : ("Hostx64","arm64"),
+ ("x86","amd64") : ("Hostx86","x64"),
+ ("x86","x86") : ("Hostx86","x86"),
+ ("x86","arm") : ("Hostx86","arm"),
+ ("x86","arm64") : ("Hostx86","arm64"),
}
# get path to the cl.exe dir for older VS versions
@@ -135,8 +136,8 @@ _HOST_TARGET_ARCH_TO_BAT_ARCH = {
_CL_EXE_NAME = 'cl.exe'
def get_msvc_version_numeric(msvc_version):
- """Get the raw version numbers from a MSVC_VERSION string, so it
- could be cast to float or other numeric values. For example, '14.0Exp'
+ """Get the raw version numbers from a MSVC_VERSION string, so it
+ could be cast to float or other numeric values. For example, '14.0Exp'
would get converted to '14.0'.
Args:
@@ -174,25 +175,33 @@ def get_host_target(env):
try:
host = _ARCH_TO_CANONICAL[host_platform.lower()]
- except KeyError as e:
+ except KeyError:
msg = "Unrecognized host architecture %s"
- raise ValueError(msg % repr(host_platform))
+ raise MSVCUnsupportedHostArch(msg % repr(host_platform))
try:
target = _ARCH_TO_CANONICAL[target_platform.lower()]
- except KeyError as e:
+ except KeyError:
all_archs = str(list(_ARCH_TO_CANONICAL.keys()))
- raise ValueError("Unrecognized target architecture %s\n\tValid architectures: %s" % (target_platform, all_archs))
+ raise MSVCUnsupportedTargetArch("Unrecognized target architecture %s\n\tValid architectures: %s" % (target_platform, all_archs))
return (host, target,req_target_platform)
# If you update this, update SupportedVSList in Tool/MSCommon/vs.py, and the
# MSVC_VERSION documentation in Tool/msvc.xml.
-_VCVER = ["14.1", "14.0", "14.0Exp", "12.0", "12.0Exp", "11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
+_VCVER = ["14.2", "14.1", "14.0", "14.0Exp", "12.0", "12.0Exp", "11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
+
+# if using vswhere, a further mapping is needed
+_VCVER_TO_VSWHERE_VER = {
+ '14.2' : '[16.0, 17.0)',
+ '14.1' : '[15.0, 16.0)',
+}
_VCVER_TO_PRODUCT_DIR = {
+ '14.2' : [
+ (SCons.Util.HKEY_LOCAL_MACHINE, r'')], # VS 2019 doesn't set this key
'14.1' : [
- (SCons.Util.HKEY_LOCAL_MACHINE, r'')], # Visual Studio 2017 doesn't set this registry key anymore
+ (SCons.Util.HKEY_LOCAL_MACHINE, r'')], # VS 2017 doesn't set this key
'14.0' : [
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\14.0\Setup\VC\ProductDir')],
'14.0Exp' : [
@@ -253,51 +262,67 @@ def msvc_version_to_maj_min(msvc_version):
raise ValueError("Unrecognized version %s (%s)" % (msvc_version,msvc_version_numeric))
def is_host_target_supported(host_target, msvc_version):
- """Check if the given (host, target) tuple is supported for given version.
+ """Check if (host, target) pair is supported for a VC version.
- Args:
- host_target: tuple
- tuple of (canonalized) host-targets, e.g. ("x86", "amd64")
- for cross compilation from 32 bit Windows to 64 bits.
- msvc_version: str
- msvc version (major.minor, e.g. 10.0)
-
- Returns:
- bool:
-
- Note:
- This only checks whether a given version *may* support the given (host,
+ :note: only checks whether a given version *may* support the given (host,
target), not that the toolchain is actually present on the machine.
+ :param tuple host_target: canonalized host-targets pair, e.g.
+ ("x86", "amd64") for cross compilation from 32 bit Windows to 64 bits.
+ :param str msvc_version: Visual C++ version (major.minor), e.g. "10.0"
+ :returns: True or False
"""
# We assume that any Visual Studio version supports x86 as a target
if host_target[1] != "x86":
maj, min = msvc_version_to_maj_min(msvc_version)
if maj < 8:
return False
-
return True
def find_vc_pdir_vswhere(msvc_version):
"""
- Find the MSVC product directory using vswhere.exe.
+ Find the MSVC product directory using the vswhere program.
- Run it asking for specified version and get MSVS install location
- :param msvc_version:
+ :param msvc_version: MSVC version to search for
:return: MSVC install dir or None
+ :raises UnsupportedVersion: if the version is not known by this file
"""
- vswhere_path = os.path.join(
- 'C:\\',
- 'Program Files (x86)',
- 'Microsoft Visual Studio',
- 'Installer',
- 'vswhere.exe'
- )
- vswhere_cmd = [vswhere_path, '-products', '*', '-version', msvc_version, '-property', 'installationPath']
-
- if os.path.exists(vswhere_path):
- sp = subprocess.Popen(vswhere_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- vsdir, err = sp.communicate()
+
+ try:
+ vswhere_version = _VCVER_TO_VSWHERE_VER[msvc_version]
+ except KeyError:
+ debug("Unknown version of MSVC: %s" % msvc_version)
+ raise UnsupportedVersion("Unknown version %s" % msvc_version)
+
+ # For bug 3333 - support default location of vswhere for both 64 and 32 bit windows
+ # installs.
+ for pf in ['Program Files (x86)', 'Program Files']:
+ vswhere_path = os.path.join(
+ 'C:\\',
+ pf,
+ 'Microsoft Visual Studio',
+ 'Installer',
+ 'vswhere.exe'
+ )
+ if os.path.exists(vswhere_path):
+ # If we found vswhere, then use it.
+ break
+ else:
+ # No vswhere on system, no install info available
+ return None
+
+ vswhere_cmd = [vswhere_path,
+ '-products', '*',
+ '-version', vswhere_version,
+ '-property', 'installationPath']
+
+ #TODO PY27 cannot use Popen as context manager
+ # try putting it back to the old way for now
+ sp = subprocess.Popen(vswhere_cmd,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ vsdir, err = sp.communicate()
+ if vsdir:
vsdir = vsdir.decode("mbcs").splitlines()
# vswhere could easily return multiple lines
# we could define a way to pick the one we prefer, but since
@@ -311,7 +336,7 @@ def find_vc_pdir_vswhere(msvc_version):
def find_vc_pdir(msvc_version):
- """Find the product directory for the given version.
+ """Find the MSVC product directory for the given version.
Tries to look up the path using a registry key from the table
_VCVER_TO_PRODUCT_DIR; if there is no key, calls find_vc_pdir_wshere
@@ -412,17 +437,19 @@ def find_batch_file(env,msvc_version,host_arch,target_arch):
__INSTALLED_VCS_RUN = None
+_VC_TOOLS_VERSION_FILE_PATH = ['Auxiliary', 'Build', 'Microsoft.VCToolsVersion.default.txt']
+_VC_TOOLS_VERSION_FILE = os.sep.join(_VC_TOOLS_VERSION_FILE_PATH)
def _check_cl_exists_in_vc_dir(env, vc_dir, msvc_version):
- """Find the cl.exe on the filesystem in the vc_dir depending on
- TARGET_ARCH, HOST_ARCH and the msvc version. TARGET_ARCH and
- HOST_ARCH can be extracted from the passed env, unless its None,
+ """Find the cl.exe on the filesystem in the vc_dir depending on
+ TARGET_ARCH, HOST_ARCH and the msvc version. TARGET_ARCH and
+ HOST_ARCH can be extracted from the passed env, unless its None,
which then the native platform is assumed the host and target.
Args:
env: Environment
a construction environment, usually if this is passed its
- because there is a desired TARGET_ARCH to be used when searching
+ because there is a desired TARGET_ARCH to be used when searching
for a cl.exe
vc_dir: str
the path to the VC dir in the MSVC installation
@@ -433,7 +460,7 @@ def _check_cl_exists_in_vc_dir(env, vc_dir, msvc_version):
bool:
"""
-
+
# determine if there is a specific target platform we want to build for and
# use that to find a list of valid VCs, default is host platform == target platform
# and same for if no env is specified to extract target platform from
@@ -446,7 +473,7 @@ def _check_cl_exists_in_vc_dir(env, vc_dir, msvc_version):
host_platform = _ARCH_TO_CANONICAL[host_platform]
target_platform = _ARCH_TO_CANONICAL[target_platform]
- debug('_check_cl_exists_in_vc_dir(): host platform %s, target platform %s' % (host_platform, target_platform))
+ debug('_check_cl_exists_in_vc_dir(): host platform %s, target platform %s for version %s' % (host_platform, target_platform, msvc_version))
ver_num = float(get_msvc_version_numeric(msvc_version))
@@ -455,11 +482,11 @@ def _check_cl_exists_in_vc_dir(env, vc_dir, msvc_version):
# 2017 and newer allowed multiple versions of the VC toolset to be installed at the same time.
# Just get the default tool version for now
#TODO: support setting a specific minor VC version
- default_toolset_file = os.path.join(vc_dir, r'Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')
+ default_toolset_file = os.path.join(vc_dir, _VC_TOOLS_VERSION_FILE)
try:
with open(default_toolset_file) as f:
vc_specific_version = f.readlines()[0].strip()
- except IOError:
+ except IOError:
debug('_check_cl_exists_in_vc_dir(): failed to read ' + default_toolset_file)
return False
except IndexError:
@@ -467,11 +494,11 @@ def _check_cl_exists_in_vc_dir(env, vc_dir, msvc_version):
return False
host_trgt_dir = _HOST_TARGET_TO_CL_DIR_GREATER_THAN_14.get((host_platform, target_platform), None)
- if not host_trgt_dir:
- debug('_check_cl_exists_in_vc_dir(): unsupported host/target platform combo')
+ if host_trgt_dir is None:
+ debug('_check_cl_exists_in_vc_dir(): unsupported host/target platform combo: (%s,%s)'%(host_platform, target_platform))
return False
- cl_path = os.path.join(vc_dir, r'Tools\MSVC', vc_specific_version, 'bin', host_trgt_dir, _CL_EXE_NAME)
+ cl_path = os.path.join(vc_dir, 'Tools','MSVC', vc_specific_version, 'bin', host_trgt_dir[0], host_trgt_dir[1], _CL_EXE_NAME)
debug('_check_cl_exists_in_vc_dir(): checking for ' + _CL_EXE_NAME + ' at ' + cl_path)
if os.path.exists(cl_path):
debug('_check_cl_exists_in_vc_dir(): found ' + _CL_EXE_NAME + '!')
@@ -479,21 +506,26 @@ def _check_cl_exists_in_vc_dir(env, vc_dir, msvc_version):
elif ver_num <= 14 and ver_num >= 8:
+ # Set default value to be -1 as "" which is the value for x86/x86 yields true when tested
+ # if not host_trgt_dir
host_trgt_dir = _HOST_TARGET_TO_CL_DIR.get((host_platform, target_platform), None)
- if not host_trgt_dir:
+ if host_trgt_dir is None:
debug('_check_cl_exists_in_vc_dir(): unsupported host/target platform combo')
return False
-
+
cl_path = os.path.join(vc_dir, 'bin', host_trgt_dir, _CL_EXE_NAME)
debug('_check_cl_exists_in_vc_dir(): checking for ' + _CL_EXE_NAME + ' at ' + cl_path)
cl_path_exists = os.path.exists(cl_path)
if not cl_path_exists and host_platform == 'amd64':
- # older versions of visual studio only had x86 binaries,
- # so if the host platform is amd64, we need to check cross
+ # older versions of visual studio only had x86 binaries,
+ # so if the host platform is amd64, we need to check cross
# compile options (x86 binary compiles some other target on a 64 bit os)
+
+ # Set default value to be -1 as "" which is the value for x86/x86 yields true when tested
+ # if not host_trgt_dir
host_trgt_dir = _HOST_TARGET_TO_CL_DIR.get(('x86', target_platform), None)
- if not host_trgt_dir:
+ if host_trgt_dir is None:
return False
cl_path = os.path.join(vc_dir, 'bin', host_trgt_dir, _CL_EXE_NAME)
@@ -514,7 +546,7 @@ def _check_cl_exists_in_vc_dir(env, vc_dir, msvc_version):
else:
# version not support return false
debug('_check_cl_exists_in_vc_dir(): unsupported MSVC version: ' + str(ver_num))
-
+
return False
def cached_get_installed_vcs(env=None):
@@ -541,6 +573,10 @@ def get_installed_vcs(env=None):
debug('find_vc_pdir no compiler found %s' % ver)
else:
debug('find_vc_pdir return None for ver %s' % ver)
+ except (MSVCUnsupportedTargetArch, MSVCUnsupportedHostArch):
+ # Allow this exception to propagate further as it should cause
+ # SCons to exit with an error code
+ raise
except VisualCException as e:
debug('did not find VC %s: caught exception %s' % (ver, str(e)))
return installed_versions
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/vs.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/vs.py
index 0404dc40566..d719301e923 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/MSCommon/vs.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/MSCommon/vs.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """Module to detect Visual Studio and/or Visual C/C++
"""
@@ -198,6 +198,17 @@ class VisualStudio(object):
# Tool/MSCommon/vc.py, and the MSVC_VERSION documentation in Tool/msvc.xml.
SupportedVSList = [
+ # Visual Studio 2019
+ VisualStudio('14.2',
+ vc_version='14.2',
+ sdk_version='10.0A',
+ hkeys=[],
+ common_tools_var='VS160COMNTOOLS',
+ executable_path=r'Common7\IDE\devenv.com',
+ batch_file_path=r'VC\Auxiliary\Build\vsvars32.bat',
+ supported_arch=['x86', 'amd64', "arm"],
+ ),
+
# Visual Studio 2017
VisualStudio('14.1',
vc_version='14.1',
@@ -520,7 +531,7 @@ def get_default_arch(env):
if not msvs:
arch = 'x86'
- elif not arch in msvs.get_supported_arch():
+ elif arch not in msvs.get_supported_arch():
fmt = "Visual Studio version %s does not support architecture %s"
raise SCons.Errors.UserError(fmt % (env['MSVS_VERSION'], arch))
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/PharLapCommon.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/PharLapCommon.py
index 66d9932ea15..d699b7eb6b7 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/PharLapCommon.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/PharLapCommon.py
@@ -29,7 +29,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
@@ -79,7 +79,8 @@ def getPharLapVersion():
include_path = os.path.join(getPharLapPath(), os.path.normpath("include/embkern.h"))
if not os.path.exists(include_path):
raise SCons.Errors.UserError("Cannot find embkern.h in ETS include directory.\nIs Phar Lap ETS installed properly?")
- mo = REGEX_ETS_VER.search(open(include_path, 'r').read())
+ with open(include_path, 'r') as f:
+ mo = REGEX_ETS_VER.search(f.read())
if mo:
return int(mo.group(1))
# Default return for Phar Lap 9.1
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/__init__.py
index 9a6a9d021ed..ea64b789023 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/__init__.py
@@ -35,10 +35,8 @@ tool definition.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
-import imp
-import importlib
import sys
import re
import os
@@ -53,7 +51,12 @@ import SCons.Scanner.D
import SCons.Scanner.LaTeX
import SCons.Scanner.Prog
import SCons.Scanner.SWIG
-import collections
+try:
+ # Python 3
+ from collections.abc import Callable
+except ImportError:
+ # Python 2.7
+ from collections import Callable
DefaultToolpath = []
@@ -106,7 +109,9 @@ TOOL_ALIASES = {
class Tool(object):
- def __init__(self, name, toolpath=[], **kw):
+ def __init__(self, name, toolpath=None, **kw):
+ if toolpath is None:
+ toolpath = []
# Rename if there's a TOOL_ALIAS for this tool
self.name = TOOL_ALIASES.get(name, name)
@@ -121,6 +126,8 @@ class Tool(object):
self.options = module.options
def _load_dotted_module_py2(self, short_name, full_name, searchpaths=None):
+ import imp
+
splitname = short_name.split('.')
index = 0
srchpths = searchpaths
@@ -149,7 +156,7 @@ class Tool(object):
except ImportError as e:
splitname = self.name.split('.')
if str(e) != "No module named %s" % splitname[0]:
- raise SCons.Errors.EnvironmentError(e)
+ raise SCons.Errors.SConsEnvironmentError(e)
try:
import zipimport
except ImportError:
@@ -211,13 +218,13 @@ class Tool(object):
if spec is None:
error_string = "No module named %s" % self.name
- raise SCons.Errors.EnvironmentError(error_string)
+ raise SCons.Errors.SConsEnvironmentError(error_string)
module = importlib.util.module_from_spec(spec)
if module is None:
if debug: print("MODULE IS NONE:%s" % self.name)
error_string = "No module named %s" % self.name
- raise SCons.Errors.EnvironmentError(error_string)
+ raise SCons.Errors.SConsEnvironmentError(error_string)
# Don't reload a tool we already loaded.
sys_modules_value = sys.modules.get(found_name, False)
@@ -258,7 +265,7 @@ class Tool(object):
return module
except ImportError as e:
if str(e) != "No module named %s" % self.name:
- raise SCons.Errors.EnvironmentError(e)
+ raise SCons.Errors.SConsEnvironmentError(e)
try:
import zipimport
importer = zipimport.zipimporter(sys.modules['SCons.Tool'].__path__[0])
@@ -267,10 +274,10 @@ class Tool(object):
return module
except ImportError as e:
m = "No tool named '%s': %s" % (self.name, e)
- raise SCons.Errors.EnvironmentError(m)
+ raise SCons.Errors.SConsEnvironmentError(m)
except ImportError as e:
m = "No tool named '%s': %s" % (self.name, e)
- raise SCons.Errors.EnvironmentError(m)
+ raise SCons.Errors.SConsEnvironmentError(m)
def __call__(self, env, *args, **kw):
if self.init_kw is not None:
@@ -376,7 +383,7 @@ def _call_linker_cb(env, callback, args, result=None):
if Verbose:
print('_call_linker_cb: env["LINKCALLBACKS"][%r] found' % callback)
print('_call_linker_cb: env["LINKCALLBACKS"][%r]=%r' % (callback, cbfun))
- if isinstance(cbfun, collections.Callable):
+ if isinstance(cbfun, Callable):
if Verbose:
print('_call_linker_cb: env["LINKCALLBACKS"][%r] is callable' % callback)
result = cbfun(env, *args)
@@ -394,7 +401,8 @@ def _call_env_subst(env, string, *args, **kw):
class _ShLibInfoSupport(object):
- def get_libtype(self):
+ @property
+ def libtype(self):
return 'ShLib'
def get_lib_prefix(self, env, *args, **kw):
@@ -411,7 +419,8 @@ class _ShLibInfoSupport(object):
class _LdModInfoSupport(object):
- def get_libtype(self):
+ @property
+ def libtype(self):
return 'LdMod'
def get_lib_prefix(self, env, *args, **kw):
@@ -428,7 +437,8 @@ class _LdModInfoSupport(object):
class _ImpLibInfoSupport(object):
- def get_libtype(self):
+ @property
+ def libtype(self):
return 'ImpLib'
def get_lib_prefix(self, env, *args, **kw):
@@ -480,25 +490,21 @@ class _LibInfoGeneratorBase(object):
'ImpLib': _ImpLibInfoSupport}
def __init__(self, libtype, infoname):
- self.set_libtype(libtype)
- self.set_infoname(infoname)
+ self.libtype = libtype
+ self.infoname = infoname
+
+ @property
+ def libtype(self):
+ return self._support.libtype
- def set_libtype(self, libtype):
+ @libtype.setter
+ def libtype(self, libtype):
try:
support_class = self._support_classes[libtype]
except KeyError:
raise ValueError('unsupported libtype %r' % libtype)
self._support = support_class()
- def get_libtype(self):
- return self._support.get_libtype()
-
- def set_infoname(self, infoname):
- self.infoname = infoname
-
- def get_infoname(self):
- return self.infoname
-
def get_lib_prefix(self, env, *args, **kw):
return self._support.get_lib_prefix(env, *args, **kw)
@@ -518,9 +524,8 @@ class _LibInfoGeneratorBase(object):
try:
libtype = kw['generator_libtype']
except KeyError:
- libtype = self.get_libtype()
- infoname = self.get_infoname()
- return 'Versioned%s%s' % (libtype, infoname)
+ libtype = self.libtype
+ return 'Versioned%s%s' % (libtype, self.infoname)
def generate_versioned_lib_info(self, env, args, result=None, **kw):
callback = self.get_versioned_lib_info_generator(**kw)
@@ -730,7 +735,7 @@ class _LibSonameGenerator(_LibInfoGeneratorBase):
if not soname:
# fallback to library name (as returned by appropriate _LibNameGenerator)
- soname = _LibNameGenerator(self.get_libtype())(env, libnode)
+ soname = _LibNameGenerator(self.libtype)(env, libnode)
if Verbose:
print("_LibSonameGenerator: FALLBACK: soname=%r" % soname)
@@ -1305,6 +1310,8 @@ def tool_list(platform, env):
'tex', 'latex', 'pdflatex', 'pdftex',
# Archivers
'tar', 'zip',
+ # File builders (text)
+ 'textfile',
], env)
tools = ([linker, c_compiler, cxx_compiler,
@@ -1314,30 +1321,35 @@ def tool_list(platform, env):
return [x for x in tools if x]
-def find_program_path(env, key_program, default_paths=[]):
+def find_program_path(env, key_program, default_paths=None):
"""
- Find the location of key_program and then return the path it was located at.
- Checking the default install locations.
- Mainly for windows where tools aren't all installed in /usr/bin,etc
- :param env: Current Environment()
- :param key_program: Program we're using to locate the directory to add to PATH.
+ Find the location of a tool using various means.
+
+ Mainly for windows where tools aren't all installed in /usr/bin, etc.
+
+ :param env: Current Construction Environment.
+ :param key_program: Tool to locate.
+ :param default_paths: List of additional paths this tool might be found in.
"""
# First search in the SCons path
path = env.WhereIs(key_program)
- if (path):
+ if path:
return path
- # then the OS path:
+
+ # Then in the OS path
path = SCons.Util.WhereIs(key_program)
- if (path):
+ if path:
return path
- # If that doesn't work try default location for mingw
+ # Finally, add the defaults and check again. Do not change
+ # ['ENV']['PATH'] permananetly, the caller can do that if needed.
+ if default_paths is None:
+ return path
save_path = env['ENV']['PATH']
for p in default_paths:
env.AppendENVPath('PATH', p)
path = env.WhereIs(key_program)
- if not path:
- env['ENV']['PATH'] = save_path
+ env['ENV']['PATH'] = save_path
return path
# Local Variables:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixc++.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixc++.py
index 05c212d269c..90a3e017356 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixc++.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixc++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixc++.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixc++.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
#forward proxy to the preffered cxx version
from SCons.Tool.aixcxx import *
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixcc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixcc.py
index b5e30ca8cf2..2cc35bc62d2 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixcc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixcc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixcc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixcc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixcxx.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixcxx.py
index 58191e6a65f..7e7ff3aefbb 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixcxx.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixcxx.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixcxx.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixcxx.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixf77.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixf77.py
index f8a86ce7486..c7129e50010 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixf77.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixf77.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixf77.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixf77.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixlink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixlink.py
index 0e76ebb0d12..a82f5702a62 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/aixlink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/aixlink.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixlink.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixlink.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/applelink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/applelink.py
index 876b4a4f235..2c165eeaa25 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/applelink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/applelink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/applelink.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/applelink.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ar.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ar.py
index 93a8b1c2018..e0e89a76999 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ar.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ar.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ar.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ar.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/as.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/as.py
index 1210042ac7a..37186d72ef1 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/as.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/as.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/as.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/as.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/bcc32.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/bcc32.py
index 43371ada777..bb74d4dbbd2 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/bcc32.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/bcc32.py
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/bcc32.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/bcc32.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/c++.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/c++.py
index e7edba3f883..9cd420b6b12 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/c++.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/c++.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/c++.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/c++.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
#forward proxy to the preffered cxx version
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cc.py
index d9628edbfb1..12e2b689926 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/cc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/cc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Tool
import SCons.Defaults
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clang.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clang.py
index bf7acdf738f..8d913d127ee 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clang.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clang.py
@@ -33,7 +33,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-# __revision__ = "src/engine/SCons/Tool/clang.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+# __revision__ = "src/engine/SCons/Tool/clang.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
# Based on SCons/Tool/gcc.py by Paweł Tomulik 2014 as a separate tool.
# Brought into the SCons mainline by Russel Winder 2017.
@@ -77,7 +77,8 @@ def generate(env):
stdout=subprocess.PIPE)
if pipe.wait() != 0: return
# clang -dumpversion is of no use
- line = pipe.stdout.readline()
+ with pipe.stdout:
+ line = pipe.stdout.readline()
if sys.version_info[0] > 2:
line = line.decode()
match = re.search(r'clang +version +([0-9]+(?:\.[0-9]+)+)', line)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clangCommon/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clangCommon/__init__.py
index 37efbf691e7..37efbf691e7 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clangCommon/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clangCommon/__init__.py
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clangxx.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clangxx.py
index 0e59bc9733b..8afda08df62 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/clangxx.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/clangxx.py
@@ -33,7 +33,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-# __revision__ = "src/engine/SCons/Tool/clangxx.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+# __revision__ = "src/engine/SCons/Tool/clangxx.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
# Based on SCons/Tool/g++.py by Paweł Tomulik 2014 as a separate tool.
# Brought into the SCons mainline by Russel Winder 2017.
@@ -85,7 +85,8 @@ def generate(env):
return
# clang -dumpversion is of no use
- line = pipe.stdout.readline()
+ with pipe.stdout:
+ line = pipe.stdout.readline()
if sys.version_info[0] > 2:
line = line.decode()
match = re.search(r'clang +version +([0-9]+(?:\.[0-9]+)+)', line)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cvf.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cvf.py
index 14fc7de7790..22ec02ffb62 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cvf.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cvf.py
@@ -27,7 +27,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/cvf.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/cvf.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import fortran
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cxx.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cxx.py
index f207c9c8a19..7e34850ed06 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cxx.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cxx.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/cxx.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/cxx.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cyglink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cyglink.py
index f69b886dd82..c3d78de90b7 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/cyglink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/cyglink.py
@@ -133,7 +133,7 @@ def _versioned_lib_suffix(env, suffix, version):
if Verbose:
print("_versioned_lib_suffix: suffix= ", suffix)
print("_versioned_lib_suffix: version= ", version)
- cygversion = re.sub('\.', '-', version)
+ cygversion = re.sub(r'\.', '-', version)
if not suffix.startswith('-' + cygversion):
suffix = '-' + cygversion + suffix
if Verbose:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/default.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/default.py
index e85e0e7c82d..a401d253f56 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/default.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/default.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/default.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/default.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dmd.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dmd.py
index 33847f65b63..e87d79137c3 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dmd.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dmd.py
@@ -53,7 +53,7 @@ Lib tool variables:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dmd.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/dmd.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import subprocess
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/docbook/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/docbook/__init__.py
index d7d10c00fc2..147556d626d 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/docbook/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/docbook/__init__.py
@@ -84,7 +84,7 @@ def __extend_targets_sources(target, source):
source = [source]
if len(target) < len(source):
target.extend(source[len(target):])
-
+
return target, source
def __init_xsl_stylesheet(kw, env, user_xsl_var, default_path):
@@ -94,12 +94,12 @@ def __init_xsl_stylesheet(kw, env, user_xsl_var, default_path):
path_args = [scriptpath, db_xsl_folder] + default_path
xsl_style = os.path.join(*path_args)
kw['DOCBOOK_XSL'] = xsl_style
-
+
def __select_builder(lxml_builder, libxml2_builder, cmdline_builder):
""" Selects a builder, based on which Python modules are present. """
if prefer_xsltproc:
return cmdline_builder
-
+
if not has_libxml2:
# At the moment we prefer libxml2 over lxml, the latter can lead
# to conflicts when installed together with libxml2.
@@ -115,7 +115,7 @@ def __ensure_suffix(t, suffix):
tpath = str(t)
if not tpath.endswith(suffix):
return tpath+suffix
-
+
return t
def __ensure_suffix_stem(t, suffix):
@@ -124,11 +124,11 @@ def __ensure_suffix_stem(t, suffix):
if not tpath.endswith(suffix):
stem = tpath
tpath += suffix
-
+
return tpath, stem
else:
stem, ext = os.path.splitext(tpath)
-
+
return t, stem
def __get_xml_text(root):
@@ -151,7 +151,7 @@ def __create_output_dir(base_dir):
else:
if base_dir.endswith('/'):
dir = base_dir
-
+
if dir and not os.path.isdir(dir):
os.makedirs(dir)
@@ -203,10 +203,10 @@ def _detect(env):
the requested output formats.
"""
global prefer_xsltproc
-
+
if env.get('DOCBOOK_PREFER_XSLTPROC',''):
prefer_xsltproc = True
-
+
if ((not has_libxml2 and not has_lxml) or (prefer_xsltproc)):
# Try to find the XSLT processors
__detect_cl_tool(env, 'DOCBOOK_XSLTPROC', xsltproc_com, xsltproc_com_priority)
@@ -219,15 +219,15 @@ def _detect(env):
#
include_re = re.compile('fileref\\s*=\\s*["|\']([^\\n]*)["|\']')
sentity_re = re.compile('<!ENTITY\\s+%*\\s*[^\\s]+\\s+SYSTEM\\s+["|\']([^\\n]*)["|\']>')
-
+
def __xml_scan(node, env, path, arg):
""" Simple XML file scanner, detecting local images and XIncludes as implicit dependencies. """
# Does the node exist yet?
if not os.path.isfile(str(node)):
return []
-
+
if env.get('DOCBOOK_SCANENT',''):
- # Use simple pattern matching for system entities..., no support
+ # Use simple pattern matching for system entities..., no support
# for recursion yet.
contents = node.get_text_contents()
return sentity_re.findall(contents)
@@ -235,9 +235,9 @@ def __xml_scan(node, env, path, arg):
xsl_file = os.path.join(scriptpath,'utils','xmldepend.xsl')
if not has_libxml2 or prefer_xsltproc:
if has_lxml and not prefer_xsltproc:
-
+
from lxml import etree
-
+
xsl_tree = etree.parse(xsl_file)
doc = etree.parse(str(node))
result = doc.xslt(xsl_tree)
@@ -266,7 +266,7 @@ def __xml_scan(node, env, path, arg):
for x in str(result).splitlines():
if x.strip() != "" and not x.startswith("<?xml "):
depfiles.extend(x.strip().split())
-
+
style.freeStylesheet()
doc.freeDoc()
result.freeDoc()
@@ -282,7 +282,7 @@ docbook_xml_scanner = SCons.Script.Scanner(function = __xml_scan,
# Action generators
#
def __generate_xsltproc_action(source, target, env, for_signature):
- cmd = env['DOCBOOK_XSLTPROCCOM']
+ cmd = env['DOCBOOK_XSLTPROCCOM']
# Does the environment have a base_dir defined?
base_dir = env.subst('$base_dir')
if base_dir:
@@ -300,7 +300,7 @@ def __emit_xsl_basedir(target, source, env):
if base_dir:
# Yes, so prepend it to each target
return [os.path.join(base_dir, str(t)) for t in target], source
-
+
# No, so simply pass target and source names through
return target, source
@@ -334,11 +334,11 @@ def __build_lxml(target, source, env):
General XSLT builder (HTML/FO), using the lxml module.
"""
from lxml import etree
-
- xslt_ac = etree.XSLTAccessControl(read_file=True,
- write_file=True,
- create_dir=True,
- read_network=False,
+
+ xslt_ac = etree.XSLTAccessControl(read_file=True,
+ write_file=True,
+ create_dir=True,
+ read_network=False,
write_network=False)
xsl_style = env.subst('$DOCBOOK_XSL')
xsl_tree = etree.parse(xsl_style)
@@ -350,11 +350,10 @@ def __build_lxml(target, source, env):
result = transform(doc, **parampass)
else:
result = transform(doc)
-
+
try:
- of = open(str(target[0]), "wb")
- of.write(of.write(etree.tostring(result, pretty_print=True)))
- of.close()
+ with open(str(target[0]), "wb") as of:
+ of.write(etree.tostring(result, pretty_print=True))
except:
pass
@@ -376,11 +375,11 @@ def __xinclude_lxml(target, source, env):
Resolving XIncludes, using the lxml module.
"""
from lxml import etree
-
+
doc = etree.parse(str(source[0]))
doc.xinclude()
try:
- doc.write(str(target[0]), xml_declaration=True,
+ doc.write(str(target[0]), xml_declaration=True,
encoding="UTF-8", pretty_print=True)
except:
pass
@@ -432,33 +431,31 @@ def DocbookEpub(env, target, source=None, *args, **kw):
"""
import zipfile
import shutil
-
+
def build_open_container(target, source, env):
"""Generate the *.epub file from intermediate outputs
- Constructs the epub file according to the Open Container Format. This
+ Constructs the epub file according to the Open Container Format. This
function could be replaced by a call to the SCons Zip builder if support
was added for different compression formats for separate source nodes.
"""
- zf = zipfile.ZipFile(str(target[0]), 'w')
- mime_file = open('mimetype', 'w')
- mime_file.write('application/epub+zip')
- mime_file.close()
- zf.write(mime_file.name, compress_type = zipfile.ZIP_STORED)
- for s in source:
- if os.path.isfile(str(s)):
- head, tail = os.path.split(str(s))
- if not head:
- continue
- s = head
- for dirpath, dirnames, filenames in os.walk(str(s)):
- for fname in filenames:
- path = os.path.join(dirpath, fname)
- if os.path.isfile(path):
- zf.write(path, os.path.relpath(path, str(env.get('ZIPROOT', ''))),
- zipfile.ZIP_DEFLATED)
- zf.close()
-
+ with zipfile.ZipFile(str(target[0]), 'w') as zf:
+ with open('mimetype', 'w') as mime_file:
+ mime_file.write('application/epub+zip')
+ zf.write(mime_file.name, compress_type = zipfile.ZIP_STORED)
+ for s in source:
+ if os.path.isfile(str(s)):
+ head, tail = os.path.split(str(s))
+ if not head:
+ continue
+ s = head
+ for dirpath, dirnames, filenames in os.walk(str(s)):
+ for fname in filenames:
+ path = os.path.join(dirpath, fname)
+ if os.path.isfile(path):
+ zf.write(path, os.path.relpath(path, str(env.get('ZIPROOT', ''))),
+ zipfile.ZIP_DEFLATED)
+
def add_resources(target, source, env):
"""Add missing resources to the OEBPS directory
@@ -468,7 +465,7 @@ def DocbookEpub(env, target, source=None, *args, **kw):
content_file = os.path.join(source[0].get_abspath(), 'content.opf')
if not os.path.isfile(content_file):
return
-
+
hrefs = []
if has_libxml2:
nsmap = {'opf' : 'http://www.idpf.org/2007/opf'}
@@ -495,51 +492,51 @@ def DocbookEpub(env, target, source=None, *args, **kw):
hrefs.append(item.attrib['href'])
doc.freeDoc()
- xpath_context.xpathFreeContext()
+ xpath_context.xpathFreeContext()
elif has_lxml:
from lxml import etree
-
+
opf = etree.parse(content_file)
# All the opf:item elements are resources
- for item in opf.xpath('//opf:item',
+ for item in opf.xpath('//opf:item',
namespaces= { 'opf': 'http://www.idpf.org/2007/opf' }):
hrefs.append(item.attrib['href'])
-
+
for href in hrefs:
- # If the resource was not already created by DocBook XSL itself,
+ # If the resource was not already created by DocBook XSL itself,
# copy it into the OEBPS folder
referenced_file = os.path.join(source[0].get_abspath(), href)
if not os.path.exists(referenced_file):
shutil.copy(href, os.path.join(source[0].get_abspath(), href))
-
+
# Init list of targets/sources
target, source = __extend_targets_sources(target, source)
-
+
# Init XSL stylesheet
__init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_EPUB', ['epub','docbook.xsl'])
# Setup builder
__builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
-
+
# Create targets
result = []
- if not env.GetOption('clean'):
+ if not env.GetOption('clean'):
# Ensure that the folders OEBPS and META-INF exist
__create_output_dir('OEBPS/')
__create_output_dir('META-INF/')
dirs = env.Dir(['OEBPS', 'META-INF'])
-
+
# Set the fixed base_dir
kw['base_dir'] = 'OEBPS/'
tocncx = __builder.__call__(env, 'toc.ncx', source[0], **kw)
cxml = env.File('META-INF/container.xml')
env.SideEffect(cxml, tocncx)
-
+
env.Depends(tocncx, kw['DOCBOOK_XSL'])
result.extend(tocncx+[cxml])
- container = env.Command(__ensure_suffix(str(target[0]), '.epub'),
- tocncx+[cxml], [add_resources, build_open_container])
+ container = env.Command(__ensure_suffix(str(target[0]), '.epub'),
+ tocncx+[cxml], [add_resources, build_open_container])
mimetype = env.File('mimetype')
env.SideEffect(mimetype, container)
@@ -555,13 +552,13 @@ def DocbookHtml(env, target, source=None, *args, **kw):
"""
# Init list of targets/sources
target, source = __extend_targets_sources(target, source)
-
+
# Init XSL stylesheet
__init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTML', ['html','docbook.xsl'])
# Setup builder
__builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
-
+
# Create targets
result = []
for t,s in zip(target,source):
@@ -583,18 +580,18 @@ def DocbookHtmlChunked(env, target, source=None, *args, **kw):
target = ['index.html']
elif not SCons.Util.is_List(source):
source = [source]
-
+
# Init XSL stylesheet
__init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTMLCHUNKED', ['html','chunkfast.xsl'])
# Setup builder
__builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
-
+
# Detect base dir
base_dir = kw.get('base_dir', '')
if base_dir:
__create_output_dir(base_dir)
-
+
# Create targets
result = []
r = __builder.__call__(env, __ensure_suffix(str(target[0]), '.html'), source[0], **kw)
@@ -617,8 +614,8 @@ def DocbookHtmlhelp(env, target, source=None, *args, **kw):
source = target
target = ['index.html']
elif not SCons.Util.is_List(source):
- source = [source]
-
+ source = [source]
+
# Init XSL stylesheet
__init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTMLHELP', ['htmlhelp','htmlhelp.xsl'])
@@ -629,7 +626,7 @@ def DocbookHtmlhelp(env, target, source=None, *args, **kw):
base_dir = kw.get('base_dir', '')
if base_dir:
__create_output_dir(base_dir)
-
+
# Create targets
result = []
r = __builder.__call__(env, __ensure_suffix(str(target[0]), '.html'), source[0], **kw)
@@ -687,30 +684,29 @@ def DocbookMan(env, target, source=None, *args, **kw):
if os.path.isfile(srcfile):
try:
import xml.dom.minidom
-
+
dom = xml.dom.minidom.parse(__ensure_suffix(str(s),'.xml'))
# Extract volume number, default is 1
for node in dom.getElementsByTagName('refmeta'):
for vol in node.getElementsByTagName('manvolnum'):
volnum = __get_xml_text(vol)
-
+
# Extract output filenames
for node in dom.getElementsByTagName('refnamediv'):
for ref in node.getElementsByTagName('refname'):
outfiles.append(__get_xml_text(ref)+'.'+volnum)
-
+
except:
- # Use simple regex parsing
- f = open(__ensure_suffix(str(s),'.xml'), 'r')
- content = f.read()
- f.close()
-
+ # Use simple regex parsing
+ with open(__ensure_suffix(str(s),'.xml'), 'r') as f:
+ content = f.read()
+
for m in re_manvolnum.finditer(content):
volnum = m.group(1)
-
+
for m in re_refname.finditer(content):
outfiles.append(m.group(1)+'.'+volnum)
-
+
if not outfiles:
# Use stem of the source file
spath = str(s)
@@ -722,14 +718,14 @@ def DocbookMan(env, target, source=None, *args, **kw):
else:
# We have to completely rely on the given target name
outfiles.append(t)
-
+
__builder.__call__(env, outfiles[0], s, **kw)
env.Depends(outfiles[0], kw['DOCBOOK_XSL'])
result.append(outfiles[0])
if len(outfiles) > 1:
env.Clean(outfiles[0], outfiles[1:])
-
+
return result
def DocbookSlidesPdf(env, target, source=None, *args, **kw):
@@ -750,7 +746,7 @@ def DocbookSlidesPdf(env, target, source=None, *args, **kw):
for t,s in zip(target,source):
t, stem = __ensure_suffix_stem(t, '.pdf')
xsl = __builder.__call__(env, stem+'.fo', s, **kw)
- env.Depends(xsl, kw['DOCBOOK_XSL'])
+ env.Depends(xsl, kw['DOCBOOK_XSL'])
result.extend(xsl)
result.extend(__fop_builder.__call__(env, t, xsl, **kw))
@@ -767,7 +763,7 @@ def DocbookSlidesHtml(env, target, source=None, *args, **kw):
source = target
target = ['index.html']
elif not SCons.Util.is_List(source):
- source = [source]
+ source = [source]
# Init XSL stylesheet
__init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_SLIDESHTML', ['slides','html','plain.xsl'])
@@ -800,12 +796,12 @@ def DocbookXInclude(env, target, source, *args, **kw):
# Setup builder
__builder = __select_builder(__xinclude_lxml_builder,__xinclude_libxml2_builder,__xmllint_builder)
-
+
# Create targets
result = []
for t,s in zip(target,source):
result.extend(__builder.__call__(env, t, s, **kw))
-
+
return result
def DocbookXslt(env, target, source=None, *args, **kw):
@@ -814,13 +810,13 @@ def DocbookXslt(env, target, source=None, *args, **kw):
"""
# Init list of targets/sources
target, source = __extend_targets_sources(target, source)
-
+
# Init XSL stylesheet
kw['DOCBOOK_XSL'] = kw.get('xsl', 'transform.xsl')
# Setup builder
__builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
-
+
# Create targets
result = []
for t,s in zip(target,source):
@@ -844,18 +840,18 @@ def generate(env):
DOCBOOK_DEFAULT_XSL_MAN = '',
DOCBOOK_DEFAULT_XSL_SLIDESPDF = '',
DOCBOOK_DEFAULT_XSL_SLIDESHTML = '',
-
+
# Paths to the detected executables
DOCBOOK_XSLTPROC = '',
DOCBOOK_XMLLINT = '',
DOCBOOK_FOP = '',
-
+
# Additional flags for the text processors
DOCBOOK_XSLTPROCFLAGS = SCons.Util.CLVar(''),
DOCBOOK_XMLLINTFLAGS = SCons.Util.CLVar(''),
DOCBOOK_FOPFLAGS = SCons.Util.CLVar(''),
DOCBOOK_XSLTPROCPARAMS = SCons.Util.CLVar(''),
-
+
# Default command lines for the detected executables
DOCBOOK_XSLTPROCCOM = xsltproc_com['xsltproc'],
DOCBOOK_XMLLINTCOM = xmllint_com['xmllint'],
@@ -865,7 +861,7 @@ def generate(env):
DOCBOOK_XSLTPROCCOMSTR = None,
DOCBOOK_XMLLINTCOMSTR = None,
DOCBOOK_FOPCOMSTR = None,
-
+
)
_detect(env)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvi.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvi.py
index 41d16b74b17..2152817142c 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvi.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvi.py
@@ -27,7 +27,7 @@ Common DVI Builder definition for various other Tool modules that use it.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dvi.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/dvi.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Builder
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvipdf.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvipdf.py
index 33c74e28b93..2b666581200 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvipdf.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvipdf.py
@@ -30,7 +30,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/dvipdf.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/dvipdf.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Defaults
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvips.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvips.py
index a2175312039..ccc882c0a5e 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/dvips.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/dvips.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dvips.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/dvips.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f03.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f03.py
index 902994c5e54..0a30381ea88 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f03.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f03.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f03.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/f03.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f08.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f08.py
index f127deaf5ec..1d2b84d39c2 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f08.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f08.py
@@ -33,7 +33,7 @@ from __future__ import absolute_import
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f08.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/f08.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f77.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f77.py
index bceb7852ec5..c52904ebd35 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f77.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f77.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f77.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/f77.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f90.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f90.py
index 4c8cdeed0e0..1095c1c622f 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f90.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f90.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f90.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/f90.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f95.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f95.py
index 5f7c74bf82b..44e9e39e423 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/f95.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/f95.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f95.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/f95.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/filesystem.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/filesystem.py
index c99bdfae737..b0047820514 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/filesystem.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/filesystem.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/filesystem.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/filesystem.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons
from SCons.Tool.install import copyFunc
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/fortran.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/fortran.py
index a82d42f1267..2e84e499c3c 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/fortran.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/fortran.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/fortran.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/fortran.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import re
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/g++.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/g++.py
index 6ab9eab4e8c..ecaf0ab3165 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/g++.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/g++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/g++.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/g++.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
#forward proxy to the preffered cxx version
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/g77.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/g77.py
index 3e81048f6ec..6d7d4ede228 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/g77.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/g77.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/g77.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/g77.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gas.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gas.py
index 8706d14d4ac..add6f7c2364 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gas.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gas.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gas.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gas.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
try:
as_module = __import__('as', globals(), locals(), [])
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gcc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gcc.py
index ace6d9f6ed3..4f70be5fe0e 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gcc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gcc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gcc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gcc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import cc
import os
@@ -68,32 +68,40 @@ def exists(env):
def detect_version(env, cc):
"""Return the version of the GNU compiler, or None if it is not a GNU compiler."""
+ version = None
cc = env.subst(cc)
if not cc:
- return None
- version = None
+ return version
+
+ # -dumpversion was added in GCC 3.0. As long as we're supporting
+ # GCC versions older than that, we should use --version and a
+ # regular expression.
# pipe = SCons.Action._subproc(env, SCons.Util.CLVar(cc) + ['-dumpversion'],
pipe = SCons.Action._subproc(env, SCons.Util.CLVar(cc) + ['--version'],
stdin='devnull',
stderr='devnull',
stdout=subprocess.PIPE)
- # -dumpversion was added in GCC 3.0. As long as we're supporting
- # GCC versions older than that, we should use --version and a
- # regular expression.
- # line = pipe.stdout.read().strip()
+ if pipe.wait() != 0:
+ return version
+
+ with pipe.stdout:
+ # -dumpversion variant:
+ # line = pipe.stdout.read().strip()
+ # --version variant:
+ line = SCons.Util.to_str(pipe.stdout.readline())
+ # Non-GNU compiler's output (like AIX xlc's) may exceed the stdout buffer:
+ # So continue with reading to let the child process actually terminate.
+ while SCons.Util.to_str(pipe.stdout.readline()):
+ pass
+
+ # -dumpversion variant:
# if line:
- # version = line
- line = SCons.Util.to_str(pipe.stdout.readline())
+ # version = line
+ # --version variant:
match = re.search(r'[0-9]+(\.[0-9]+)+', line)
if match:
version = match.group(0)
- # Non-GNU compiler's output (like AIX xlc's) may exceed the stdout buffer:
- # So continue with reading to let the child process actually terminate.
- while SCons.Util.to_str(pipe.stdout.readline()):
- pass
- ret = pipe.wait()
- if ret != 0:
- return None
+
return version
# Local Variables:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gdc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gdc.py
index eb516aa88d9..ebb9b060c28 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gdc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gdc.py
@@ -48,7 +48,7 @@ Lib tool variables:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gdc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gdc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Defaults
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gettext_tool.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gettext_tool.py
index 0d9a28b6533..9f20a6f4068 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gettext_tool.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gettext_tool.py
@@ -23,7 +23,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/gettext_tool.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gettext_tool.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
#############################################################################
def generate(env,**kw):
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gfortran.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gfortran.py
index b41f2157877..ca143c5b48a 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gfortran.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gfortran.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gfortran.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gfortran.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gnulink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gnulink.py
index 5c86d5ac6a8..2ed5d34ef19 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gnulink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gnulink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gnulink.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gnulink.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gs.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gs.py
index cf7fd1c202c..ca8558546d5 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gs.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gs.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gs.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gs.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gxx.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gxx.py
index 2f05518a03c..b9c35f77e47 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/gxx.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/gxx.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gxx.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gxx.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
import re
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpc++.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpc++.py
index 7e07a52f64d..6da62ae8d7a 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpc++.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpc++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hpc++.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/hpc++.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
#forward proxy to the preffered cxx version
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpcc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpcc.py
index 67b28f70cfa..7e2d748cea4 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpcc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpcc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hpcc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/hpcc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpcxx.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpcxx.py
index 8a5dfaa4dab..ccda329f2b3 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hpcxx.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hpcxx.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hpcxx.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/hpcxx.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
@@ -68,7 +68,8 @@ def generate(env):
env['CXX'] = acc or 'aCC'
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS +Z')
# determine version of aCC
- line = os.popen(acc + ' -V 2>&1').readline().rstrip()
+ with os.popen(acc + ' -V 2>&1') as p:
+ line = p.readline().rstrip()
if line.find('aCC: HP ANSI C++') == 0:
env['CXXVERSION'] = line.split()[-1]
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hplink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hplink.py
index e6aa8d49408..be830744b45 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/hplink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/hplink.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hplink.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/hplink.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/icc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/icc.py
index ce46133da45..97f30bd2bcd 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/icc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/icc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/icc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/icc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import cc
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/icl.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/icl.py
index 0232bf481e2..ad9305abfbd 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/icl.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/icl.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/icl.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/icl.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Tool.intelc
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ifl.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ifl.py
index d6675284f30..1e98df4c8df 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ifl.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ifl.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ifl.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ifl.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
from SCons.Scanner.Fortran import FortranScan
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ifort.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ifort.py
index 24f591edaa5..d1886ce5830 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ifort.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ifort.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ifort.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ifort.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
from SCons.Scanner.Fortran import FortranScan
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ilink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ilink.py
index b6a9a3e6a27..4e848dce785 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ilink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ilink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ilink.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ilink.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ilink32.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ilink32.py
index 25e29f96f95..ecb6e7b0820 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ilink32.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ilink32.py
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ilink32.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ilink32.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Tool
import SCons.Tool.bcc32
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/install.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/install.py
index ec552bdbf8c..8f80bc23fad 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/install.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/install.py
@@ -31,7 +31,7 @@ selection method.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/install.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/install.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import re
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/intelc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/intelc.py
index 08359e1de1d..ee8b4f4930c 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/intelc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/intelc.py
@@ -32,12 +32,12 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import division, print_function
-__revision__ = "src/engine/SCons/Tool/intelc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/intelc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import math, sys, os.path, glob, string, re
is_windows = sys.platform == 'win32'
-is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or
+is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or
('PROCESSOR_ARCHITEW6432' in os.environ and
os.environ['PROCESSOR_ARCHITEW6432'] == 'AMD64'))
is_linux = sys.platform.startswith('linux')
@@ -113,11 +113,6 @@ def check_abi(abi):
(abi, list(valid_abis.keys())))
return abi
-def vercmp(a, b):
- """Compare strings as floats,
- but Intel changed Linux naming convention at 9.0"""
- return cmp(linux_ver_normalize(b), linux_ver_normalize(a))
-
def get_version_from_list(v, vlist):
"""See if we can match v (string) in vlist (list of strings)
Linux has to match in a fuzzy way."""
@@ -221,7 +216,7 @@ def get_all_compiler_versions():
versions = []
try:
while i < 100:
- subkey = SCons.Util.RegEnumKey(k, i) # raises EnvironmentError
+ subkey = SCons.Util.RegEnumKey(k, i) # raises SConsEnvironmentError
# Check that this refers to an existing dir.
# This is not 100% perfect but should catch common
# installation issues like when the compiler was installed
@@ -293,7 +288,7 @@ def get_all_compiler_versions():
m = re.search(r'([0-9]{0,4})(?:_sp\d*)?\.([0-9][0-9.]*)$', d)
if m:
versions.append("%s.%s"%(m.group(1), m.group(2)))
-
+
def keyfunc(str):
"""Given a dot-separated version string, return a tuple of ints representing it."""
return [int(x) for x in str.split('.')]
@@ -383,7 +378,7 @@ def get_intel_compiler_top(version, abi):
top = d
break
return top
-
+
top = find_in_2016style_dir(version) or find_in_2011style_dir(version) or find_in_2010style_dir(version) or find_in_2008style_dir(version)
# print "INTELC: top=",top
if not top:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ipkg.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ipkg.py
index 2c7ec42b43e..60096af0151 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ipkg.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ipkg.py
@@ -33,7 +33,7 @@ packages fake_root.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ipkg.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ipkg.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
@@ -55,8 +55,10 @@ def generate(env):
env['IPKGCOM'] = '$IPKG $IPKGFLAGS ${SOURCE}'
if env.WhereIs('id'):
- env['IPKGUSER'] = os.popen('id -un').read().strip()
- env['IPKGGROUP'] = os.popen('id -gn').read().strip()
+ with os.popen('id -un') as p:
+ env['IPKGUSER'] = p.read().strip()
+ with os.popen('id -gn') as p:
+ env['IPKGGROUP'] = p.read().strip()
env['IPKGFLAGS'] = SCons.Util.CLVar('-o $IPKGUSER -g $IPKGGROUP')
env['IPKGSUFFIX'] = '.ipk'
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/jar.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/jar.py
index f7f0e26c66a..212a10546b5 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/jar.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/jar.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/jar.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/jar.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import SCons.Subst
@@ -86,7 +86,7 @@ def jarFlags(target, source, env, for_signature):
for src in source:
contents = src.get_text_contents()
if contents.startswith("Manifest-Version"):
- if not 'm' in jarflags:
+ if 'm' not in jarflags:
return jarflags + 'm'
break
return jarflags
@@ -106,7 +106,7 @@ def Jar(env, target = None, source = [], *args, **kw):
source = target
target = None
- # mutiple targets pass so build each target the same from the
+ # mutiple targets pass so build each target the same from the
# same source
#TODO Maybe this should only be done once, and the result copied
# for each target since it should result in the same?
@@ -184,7 +184,7 @@ def Jar(env, target = None, source = [], *args, **kw):
continue
except:
pass
-
+
try:
# source is string try to covnert it to dir
target_nodes.extend(dir_to_class(env.fs.Dir(s)))
@@ -193,7 +193,7 @@ def Jar(env, target = None, source = [], *args, **kw):
pass
SCons.Warnings.Warning("File: " + str(s) + " could not be identified as File or Directory, skipping.")
-
+
# at this point all our sources have been converted to classes or directories of class
# so pass it to the Jar builder
return env.JarFile(target = target, source = target_nodes, *args, **kw)
@@ -209,9 +209,9 @@ def generate(env):
env.AddMethod(Jar)
if env['PLATFORM'] == 'win32':
- # Ensure that we have a proper path for clang
- jar = SCons.Tool.find_program_path(env, 'jar',
- default_paths=get_java_install_dirs(env['PLATFORM']))
+ # Ensure that we have a proper path for jar
+ paths = get_java_install_dirs('win32')
+ jar = SCons.Tool.find_program_path(env, 'jar', default_paths=paths)
if jar:
jar_bin_dir = os.path.dirname(jar)
env.AppendENVPath('PATH', jar_bin_dir)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/javac.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/javac.py
index 5ac544ae30e..849ac09597c 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/javac.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/javac.py
@@ -30,7 +30,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/javac.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/javac.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
@@ -210,15 +210,15 @@ def generate(env):
version = env.get('JAVAVERSION', None)
- javac = SCons.Tool.find_program_path(env, 'javac')
if env['PLATFORM'] == 'win32':
# Ensure that we have a proper path for javac
- paths=get_java_install_dirs(env['PLATFORM'], version=version)
- javac = SCons.Tool.find_program_path(env, 'javac',
- default_paths=paths)
+ paths = get_java_install_dirs('win32', version=version)
+ javac = SCons.Tool.find_program_path(env, 'javac', default_paths=paths)
if javac:
javac_bin_dir = os.path.dirname(javac)
env.AppendENVPath('PATH', javac_bin_dir)
+ else:
+ javac = SCons.Tool.find_program_path(env, 'javac')
env['JAVAINCLUDES'] = get_java_include_paths(env, javac, version)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/javah.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/javah.py
index c25952d5737..8ec3cf8d8d3 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/javah.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/javah.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/javah.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/javah.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
@@ -123,9 +123,9 @@ def generate(env):
java_javah.emitter = emit_java_headers
if env['PLATFORM'] == 'win32':
- # Ensure that we have a proper path for clang
- javah = SCons.Tool.find_program_path(env, 'javah',
- default_paths=get_java_install_dirs(env['PLATFORM']))
+ # Ensure that we have a proper path for javah
+ paths = get_java_install_dirs('win32')
+ javah = SCons.Tool.find_program_path(env, 'javah', default_paths=paths)
if javah:
javah_bin_dir = os.path.dirname(javah)
env.AppendENVPath('PATH', javah_bin_dir)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/latex.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/latex.py
index 09d0ece1402..242aa62f668 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/latex.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/latex.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/latex.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/latex.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Defaults
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ldc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ldc.py
index 46c07b25c30..6f6a8997e26 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/ldc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/ldc.py
@@ -48,7 +48,7 @@ Lib tool variables:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ldc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ldc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import subprocess
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/lex.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/lex.py
index e7009d8b7fd..155e2d9e942 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/lex.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/lex.py
@@ -31,16 +31,25 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/lex.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/lex.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
+import sys
import SCons.Action
import SCons.Tool
import SCons.Util
+from SCons.Platform.mingw import MINGW_DEFAULT_PATHS
+from SCons.Platform.cygwin import CYGWIN_DEFAULT_PATHS
+from SCons.Platform.win32 import CHOCO_DEFAULT_PATH
LexAction = SCons.Action.Action("$LEXCOM", "$LEXCOMSTR")
+if sys.platform == 'win32':
+ BINS = ['flex', 'lex', 'win_flex']
+else:
+ BINS = ["flex", "lex"]
+
def lexEmitter(target, source, env):
sourceBase, sourceExt = os.path.splitext(SCons.Util.to_String(source[0]))
@@ -64,6 +73,29 @@ def lexEmitter(target, source, env):
target.append(fileName)
return (target, source)
+def get_lex_path(env, append_paths=False):
+ """
+ Find the path to the lex tool, searching several possible names
+
+ Only called in the Windows case, so the default_path
+ can be Windows-specific
+
+ :param env: current construction environment
+ :param append_paths: if set, add the path to the tool to PATH
+ :return: path to lex tool, if found
+ """
+ for prog in BINS:
+ bin_path = SCons.Tool.find_program_path(
+ env,
+ prog,
+ default_paths=CHOCO_DEFAULT_PATH + MINGW_DEFAULT_PATHS + CYGWIN_DEFAULT_PATHS )
+ if bin_path:
+ if append_paths:
+ env.AppendENVPath('PATH', os.path.dirname(bin_path))
+ return bin_path
+ SCons.Warnings.Warning('lex tool requested, but lex or flex binary not found in ENV PATH')
+
+
def generate(env):
"""Add Builders and construction variables for lex to an Environment."""
c_file, cxx_file = SCons.Tool.createCFileBuilders(env)
@@ -83,12 +115,24 @@ def generate(env):
cxx_file.add_action(".ll", LexAction)
cxx_file.add_emitter(".ll", lexEmitter)
- env["LEX"] = env.Detect("flex") or "lex"
env["LEXFLAGS"] = SCons.Util.CLVar("")
- env["LEXCOM"] = "$LEX $LEXFLAGS -t $SOURCES > $TARGET"
+
+ if sys.platform == 'win32':
+ # ignore the return - we do not need the full path here
+ _ = get_lex_path(env, append_paths=True)
+ env["LEX"] = env.Detect(BINS)
+ if not env.get("LEXUNISTD"):
+ env["LEXUNISTD"] = SCons.Util.CLVar("")
+ env["LEXCOM"] = "$LEX $LEXUNISTD $LEXFLAGS -t $SOURCES > $TARGET"
+ else:
+ env["LEX"] = env.Detect(BINS)
+ env["LEXCOM"] = "$LEX $LEXFLAGS -t $SOURCES > $TARGET"
def exists(env):
- return env.Detect(["flex", "lex"])
+ if sys.platform == 'win32':
+ return get_lex_path(env)
+ else:
+ return env.Detect(BINS)
# Local Variables:
# tab-width:4
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/link.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/link.py
index fd8e46075de..2347c947e12 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/link.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/link.py
@@ -32,7 +32,7 @@ selection method.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/link.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/link.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import sys
import re
@@ -81,6 +81,8 @@ def _lib_emitter(target, source, env, **kw):
if Verbose:
print("_lib_emitter: target[0]={!r}".format(target[0].get_path()))
for tgt in target:
+ if SCons.Util.is_String(tgt):
+ tgt = env.File(tgt)
tgt.attributes.shared = 1
try:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/linkloc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/linkloc.py
index 021d647baaf..e3b16fce684 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/linkloc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/linkloc.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/linkloc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/linkloc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
import re
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/m4.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/m4.py
index 597b6a56489..0c345f33fa0 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/m4.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/m4.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/m4.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/m4.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/masm.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/masm.py
index b1bd0eea5bb..26e2e0a5a31 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/masm.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/masm.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/masm.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/masm.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/midl.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/midl.py
index 8310a82fd8e..b2120c6b217 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/midl.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/midl.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/midl.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/midl.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mingw.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mingw.py
index 1ea39425101..4d6533bf6fb 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mingw.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mingw.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mingw.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mingw.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
@@ -43,7 +43,6 @@ import SCons.Defaults
import SCons.Tool
import SCons.Util
-
mingw_paths = [
r'c:\MinGW\bin',
r'C:\cygwin64\bin',
@@ -52,8 +51,9 @@ mingw_paths = [
r'C:\msys',
]
+
def shlib_generator(target, source, env, for_signature):
- cmd = SCons.Util.CLVar(['$SHLINK', '$SHLINKFLAGS'])
+ cmd = SCons.Util.CLVar(['$SHLINK', '$SHLINKFLAGS'])
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
if dll: cmd.extend(['-o', dll])
@@ -61,31 +61,32 @@ def shlib_generator(target, source, env, for_signature):
cmd.extend(['$SOURCES', '$_LIBDIRFLAGS', '$_LIBFLAGS'])
implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
- if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature))
+ if implib: cmd.append('-Wl,--out-implib,' + implib.get_string(for_signature))
def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
insert_def = env.subst("$WINDOWS_INSERT_DEF")
- if not insert_def in ['', '0', 0] and def_target: \
- cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
+ if insert_def not in ['', '0', 0] and def_target: \
+ cmd.append('-Wl,--output-def,' + def_target.get_string(for_signature))
return [cmd]
+
def shlib_emitter(target, source, env):
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
no_import_lib = env.get('no_import_lib', 0)
if not dll:
- raise SCons.Errors.UserError("A shared library should have exactly one target with the suffix: %s Target(s) are:%s" % \
+ raise SCons.Errors.UserError(
+ "A shared library should have exactly one target with the suffix: %s Target(s) are:%s" % \
(env.subst("$SHLIBSUFFIX"), ",".join([str(t) for t in target])))
-
- if not no_import_lib and \
- not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
+ if not no_import_lib and \
+ not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
# Create list of target libraries as strings
- targetStrings=env.ReplaceIxes(dll,
- 'SHLIBPREFIX', 'SHLIBSUFFIX',
- 'LIBPREFIX', 'LIBSUFFIX')
-
+ targetStrings = env.ReplaceIxes(dll,
+ 'SHLIBPREFIX', 'SHLIBSUFFIX',
+ 'LIBPREFIX', 'LIBSUFFIX')
+
# Now add file nodes to target list
target.append(env.fs.File(targetStrings))
@@ -97,17 +98,18 @@ def shlib_emitter(target, source, env):
skip_def_insert = env.subst("$WINDOWS_INSERT_DEF") in ['', '0', 0]
if not def_source and not def_target and not skip_def_insert:
# Create list of target libraries and def files as strings
- targetStrings=env.ReplaceIxes(dll,
- 'SHLIBPREFIX', 'SHLIBSUFFIX',
- 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
-
+ targetStrings = env.ReplaceIxes(dll,
+ 'SHLIBPREFIX', 'SHLIBSUFFIX',
+ 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
+
# Now add file nodes to target list
target.append(env.fs.File(targetStrings))
return (target, source)
-
-shlib_action = SCons.Action.Action(shlib_generator, generator=1)
+
+shlib_action = SCons.Action.Action(shlib_generator, '$SHLINKCOMSTR', generator=1)
+ldmodule_action = SCons.Action.Action(shlib_generator, '$LDMODULECOMSTR', generator=1)
res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
@@ -120,23 +122,22 @@ SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
key_program = 'mingw32-make'
-
def find_version_specific_mingw_paths():
- """
+ r"""
One example of default mingw install paths is:
C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev2\mingw64\bin
Use glob'ing to find such and add to mingw_paths
"""
new_paths = glob.glob(r"C:\mingw-w64\*\mingw64\bin")
-
+
return new_paths
def generate(env):
global mingw_paths
# Check for reasoanble mingw default paths
- mingw_paths +=find_version_specific_mingw_paths()
+ mingw_paths += find_version_specific_mingw_paths()
mingw = SCons.Tool.find_program_path(env, key_program, default_paths=mingw_paths)
if mingw:
@@ -148,26 +149,31 @@ def generate(env):
for tool in gnu_tools:
SCons.Tool.Tool(tool)(env)
- #... but a few things differ:
+ # ... but a few things differ:
env['CC'] = 'gcc'
+ # make sure the msvc tool doesnt break us, it added a /flag
+ if 'CCFLAGS' in env:
+ # make sure its a CLVar to handle list or str cases
+ if type(env['CCFLAGS']) is not SCons.Util.CLVar:
+ env['CCFLAGS'] = SCons.Util.CLVar(env['CCFLAGS'])
+ env['CCFLAGS'] = SCons.Util.CLVar(str(env['CCFLAGS']).replace('/nologo', ''))
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
env['CXX'] = 'g++'
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
- env['SHLINKCOM'] = shlib_action
- env['LDMODULECOM'] = shlib_action
- env.Append(SHLIBEMITTER = [shlib_emitter])
- env.Append(LDMODULEEMITTER = [shlib_emitter])
+ env['SHLINKCOM'] = shlib_action
+ env['LDMODULECOM'] = ldmodule_action
+ env.Append(SHLIBEMITTER=[shlib_emitter])
+ env.Append(LDMODULEEMITTER=[shlib_emitter])
env['AS'] = 'as'
- env['WIN32DEFPREFIX'] = ''
- env['WIN32DEFSUFFIX'] = '.def'
- env['WINDOWSDEFPREFIX'] = '${WIN32DEFPREFIX}'
- env['WINDOWSDEFSUFFIX'] = '${WIN32DEFSUFFIX}'
+ env['WIN32DEFPREFIX'] = ''
+ env['WIN32DEFSUFFIX'] = '.def'
+ env['WINDOWSDEFPREFIX'] = '${WIN32DEFPREFIX}'
+ env['WINDOWSDEFSUFFIX'] = '${WIN32DEFSUFFIX}'
env['SHOBJSUFFIX'] = '.o'
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
-
env['RC'] = 'windres'
env['RCFLAGS'] = SCons.Util.CLVar('')
env['RCINCFLAGS'] = '$( ${_concat(RCINCPREFIX, CPPPATH, RCINCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
@@ -175,13 +181,14 @@ def generate(env):
env['RCINCSUFFIX'] = ''
env['RCCOM'] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
env['BUILDERS']['RES'] = res_builder
-
+
# Some setting from the platform also have to be overridden:
env['OBJSUFFIX'] = '.o'
env['LIBPREFIX'] = 'lib'
env['LIBSUFFIX'] = '.a'
env['PROGSUFFIX'] = '.exe'
+
def exists(env):
mingw = SCons.Tool.find_program_path(env, key_program, default_paths=mingw_paths)
if mingw:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msgfmt.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msgfmt.py
index 16dc3afb627..a66af3678c3 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msgfmt.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msgfmt.py
@@ -21,7 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/msgfmt.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/msgfmt.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Builder import BuilderBase
#############################################################################
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msginit.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msginit.py
index 45af4101742..96c2732de07 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msginit.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msginit.py
@@ -24,7 +24,7 @@ Tool specific initialization of msginit tool.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/msginit.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/msginit.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Warnings
import SCons.Builder
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msgmerge.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msgmerge.py
index e1bfec6b2da..42cb18a6a48 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msgmerge.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msgmerge.py
@@ -24,7 +24,7 @@ Tool specific initialization for `msgmerge` tool.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/msgmerge.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/msgmerge.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
#############################################################################
def _update_or_init_po_files(target, source, env):
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mslib.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mslib.py
index 7bb3f91ccf2..01ea3ffdc80 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mslib.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mslib.py
@@ -31,7 +31,9 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mslib.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mslib.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+
+import os
import SCons.Defaults
import SCons.Tool
@@ -54,6 +56,13 @@ def generate(env):
env['LIBPREFIX'] = ''
env['LIBSUFFIX'] = '.lib'
+ # Issue #3350
+ # Change tempfile argument joining character from a space to a newline
+ # mslink will fail if any single line is too long, but is fine with many lines
+ # in a tempfile
+ env['TEMPFILEARGJOIN'] = os.linesep
+
+
def exists(env):
return msvc_exists(env)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mslink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mslink.py
index 985b7c432e9..43bcb3db52a 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mslink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mslink.py
@@ -32,8 +32,9 @@ selection method.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/mslink.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mslink.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+import os
import os.path
import SCons.Action
@@ -107,7 +108,7 @@ def _dllEmitter(target, source, env, paramtp):
raise SCons.Errors.UserError('A shared library should have exactly one target with the suffix: %s' % env.subst('$%sSUFFIX' % paramtp))
insert_def = env.subst("$WINDOWS_INSERT_DEF")
- if not insert_def in ['', '0', 0] and \
+ if insert_def not in ['', '0', 0] and \
not env.FindIxes(source, "WINDOWSDEFPREFIX", "WINDOWSDEFSUFFIX"):
# append a def file to the list of sources
@@ -158,7 +159,7 @@ def windowsLibEmitter(target, source, env):
def ldmodEmitter(target, source, env):
"""Emitter for loadable modules.
-
+
Loadable modules are identical to shared libraries on Windows, but building
them is subject to different parameters (LDMODULE*).
"""
@@ -219,7 +220,7 @@ def embedManifestDllCheck(target, source, env):
if env.get('WINDOWS_EMBED_MANIFEST', 0):
manifestSrc = target[0].get_abspath() + '.manifest'
if os.path.exists(manifestSrc):
- ret = (embedManifestDllAction) ([target[0]],None,env)
+ ret = (embedManifestDllAction) ([target[0]],None,env)
if ret:
raise SCons.Errors.UserError("Unable to embed manifest into %s" % (target[0]))
return ret
@@ -327,6 +328,12 @@ def generate(env):
env['LDMODULEEMITTER'] = [ldmodEmitter]
env['LDMODULECOM'] = compositeLdmodAction
+ # Issue #3350
+ # Change tempfile argument joining character from a space to a newline
+ # mslink will fail if any single line is too long, but is fine with many lines
+ # in a tempfile
+ env['TEMPFILEARGJOIN'] = os.linesep
+
def exists(env):
return msvc_exists(env)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mssdk.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mssdk.py
index 542b3df4819..8dfdbeb3981 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mssdk.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mssdk.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mssdk.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mssdk.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
"""engine.SCons.Tool.mssdk
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msvc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msvc.py
index e921f63e31c..d94a0374389 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msvc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msvc.py
@@ -31,9 +31,10 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/msvc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/msvc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
+import os
import re
import sys
@@ -161,7 +162,7 @@ def msvc_batch_key(action, env, target, source):
# Note we need to do the env.subst so $MSVC_BATCH can be a reference to
# another construction variable, which is why we test for False and 0
# as strings.
- if not 'MSVC_BATCH' in env or env.subst('$MSVC_BATCH') in ('0', 'False', '', None):
+ if 'MSVC_BATCH' not in env or env.subst('$MSVC_BATCH') in ('0', 'False', '', None):
# We're not using batching; return no key.
return None
t = target[0]
@@ -187,7 +188,7 @@ def msvc_output_flag(target, source, env, for_signature):
# len(source)==1 as batch mode can compile only one file
# (and it also fixed problem with compiling only one changed file
# with batch mode enabled)
- if not 'MSVC_BATCH' in env or env.subst('$MSVC_BATCH') in ('0', 'False', '', None):
+ if 'MSVC_BATCH' not in env or env.subst('$MSVC_BATCH') in ('0', 'False', '', None):
return '/Fo$TARGET'
else:
# The Visual C/C++ compiler requires a \ at the end of the /Fo
@@ -262,7 +263,7 @@ def generate(env):
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
env['RC'] = 'rc'
- env['RCFLAGS'] = SCons.Util.CLVar('')
+ env['RCFLAGS'] = SCons.Util.CLVar('/nologo')
env['RCSUFFIXES']=['.rc','.rc2']
env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
env['BUILDERS']['RES'] = res_builder
@@ -271,6 +272,10 @@ def generate(env):
env['SHOBJPREFIX'] = '$OBJPREFIX'
env['SHOBJSUFFIX'] = '$OBJSUFFIX'
+ # MSVC probably wont support unistd.h so default
+ # without it for lex generation
+ env["LEXUNISTD"] = SCons.Util.CLVar("--nounistd")
+
# Set-up ms tools paths
msvc_setup_env_once(env)
@@ -279,6 +284,12 @@ def generate(env):
msvc_set_PCHPDBFLAGS(env)
+ # Issue #3350
+ # Change tempfile argument joining character from a space to a newline
+ # mslink will fail if any single line is too long, but is fine with many lines
+ # in a tempfile
+ env['TEMPFILEARGJOIN'] = os.linesep
+
env['PCHCOM'] = '$CXX /Fo${TARGETS[1]} $CXXFLAGS $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS $PCHPDBFLAGS'
env['BUILDERS']['PCH'] = pch_builder
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msvs.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msvs.py
index 1dcbf7ef7c6..7d60097d273 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/msvs.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/msvs.py
@@ -32,7 +32,7 @@ selection method.
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/msvs.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/msvs.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.compat
@@ -70,10 +70,14 @@ def xmlify(s):
s = s.replace('\n', '&#x0A;')
return s
-# Process a CPPPATH list in includes, given the env, target and source.
-# Returns a tuple of nodes.
def processIncludes(includes, env, target, source):
- return SCons.PathList.PathList(includes).subst_path(env, target, source)
+ """
+ Process a CPPPATH list in includes, given the env, target and source.
+ Returns a list of directory paths. These paths are absolute so we avoid
+ putting pound-prefixed paths in a Visual Studio project file.
+ """
+ return [env.Dir(i).abspath for i in
+ SCons.PathList.PathList(includes).subst_path(env, target, source)]
external_makefile_guid = '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}'
@@ -348,10 +352,20 @@ V10DebugSettings = {
}
class _GenerateV10User(_UserGenerator):
- """Generates a Project'user file for MSVS 2010"""
+ """Generates a Project'user file for MSVS 2010 or later"""
def __init__(self, dspfile, source, env):
- self.versionstr = '4.0'
+ version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
+ if version_num >= 14.2:
+ # Visual Studio 2019 is considered to be version 16.
+ self.versionstr = '16.0'
+ elif version_num >= 14.1:
+ # Visual Studio 2017 is considered to be version 15.
+ self.versionstr = '15.0'
+ elif version_num == 14.0:
+ self.versionstr = '14.0'
+ else:
+ self.versionstr = '4.0'
self.usrhead = V10UserHeader
self.usrconf = V10UserConfiguration
self.usrdebg = V10DebugSettings
@@ -397,7 +411,7 @@ class _DSPGenerator(object):
elif SCons.Util.is_List(env['variant']):
variants = env['variant']
- if 'buildtarget' not in env or env['buildtarget'] == None:
+ if 'buildtarget' not in env or env['buildtarget'] is None:
buildtarget = ['']
elif SCons.Util.is_String(env['buildtarget']):
buildtarget = [env['buildtarget']]
@@ -418,7 +432,7 @@ class _DSPGenerator(object):
for _ in variants:
buildtarget.append(bt)
- if 'outdir' not in env or env['outdir'] == None:
+ if 'outdir' not in env or env['outdir'] is None:
outdir = ['']
elif SCons.Util.is_String(env['outdir']):
outdir = [env['outdir']]
@@ -439,7 +453,7 @@ class _DSPGenerator(object):
for v in variants:
outdir.append(s)
- if 'runfile' not in env or env['runfile'] == None:
+ if 'runfile' not in env or env['runfile'] is None:
runfile = buildtarget[-1:]
elif SCons.Util.is_String(env['runfile']):
runfile = [env['runfile']]
@@ -462,15 +476,41 @@ class _DSPGenerator(object):
self.sconscript = env['MSVSSCONSCRIPT']
- if 'cmdargs' not in env or env['cmdargs'] == None:
- cmdargs = [''] * len(variants)
- elif SCons.Util.is_String(env['cmdargs']):
- cmdargs = [env['cmdargs']] * len(variants)
- elif SCons.Util.is_List(env['cmdargs']):
- if len(env['cmdargs']) != len(variants):
- raise SCons.Errors.InternalError("Sizes of 'cmdargs' and 'variant' lists must be the same.")
+ def GetKeyFromEnv(env, key, variants):
+ """
+ Retrieves a specific key from the environment. If the key is
+ present, it is expected to either be a string or a list with length
+ equal to the number of variants. The function returns a list of
+ the desired value (e.g. cpp include paths) guaranteed to be of
+ length equal to the length of the variants list.
+ """
+ if key not in env or env[key] is None:
+ return [''] * len(variants)
+ elif SCons.Util.is_String(env[key]):
+ return [env[key]] * len(variants)
+ elif SCons.Util.is_List(env[key]):
+ if len(env[key]) != len(variants):
+ raise SCons.Errors.InternalError("Sizes of '%s' and 'variant' lists must be the same." % key)
+ else:
+ return env[key]
else:
- cmdargs = env['cmdargs']
+ raise SCons.Errors.InternalError("Unsupported type for key '%s' in environment: %s" %
+ (key, type(env[key])))
+
+ cmdargs = GetKeyFromEnv(env, 'cmdargs', variants)
+
+ # The caller is allowed to put 'cppdefines' and/or 'cpppaths' in the
+ # environment, which is useful if they want to provide per-variant
+ # values for these. Otherwise, we fall back to using the global
+ # 'CPPDEFINES' and 'CPPPATH' functions.
+ if 'cppdefines' in env:
+ cppdefines = GetKeyFromEnv(env, 'cppdefines', variants)
+ else:
+ cppdefines = [env.get('CPPDEFINES', [])] * len(variants)
+ if 'cpppaths' in env:
+ cpppaths = GetKeyFromEnv(env, 'cpppaths', variants)
+ else:
+ cpppaths = [env.get('CPPPATH', [])] * len(variants)
self.env = env
@@ -513,14 +553,18 @@ class _DSPGenerator(object):
for n in sourcenames:
self.sources[n].sort(key=lambda a: a.lower())
- def AddConfig(self, variant, buildtarget, outdir, runfile, cmdargs, dspfile=dspfile):
+ def AddConfig(self, variant, buildtarget, outdir, runfile, cmdargs, cppdefines, cpppaths, dspfile=dspfile, env=env):
config = Config()
config.buildtarget = buildtarget
config.outdir = outdir
config.cmdargs = cmdargs
+ config.cppdefines = cppdefines
config.runfile = runfile
- match = re.match('(.*)\|(.*)', variant)
+ # Dir objects can't be pickled, so we need an absolute path here.
+ config.cpppaths = processIncludes(cpppaths, env, None, None)
+
+ match = re.match(r'(.*)\|(.*)', variant)
if match:
config.variant = match.group(1)
config.platform = match.group(2)
@@ -532,12 +576,12 @@ class _DSPGenerator(object):
print("Adding '" + self.name + ' - ' + config.variant + '|' + config.platform + "' to '" + str(dspfile) + "'")
for i in range(len(variants)):
- AddConfig(self, variants[i], buildtarget[i], outdir[i], runfile[i], cmdargs[i])
+ AddConfig(self, variants[i], buildtarget[i], outdir[i], runfile[i], cmdargs[i], cppdefines[i], cpppaths[i])
self.platforms = []
for key in list(self.configs.keys()):
platform = self.configs[key].platform
- if not platform in self.platforms:
+ if platform not in self.platforms:
self.platforms.append(platform)
def Build(self):
@@ -553,16 +597,16 @@ V6DSPHeader = """\
CFG=%(name)s - Win32 %(confkey)s
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "%(name)s.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "%(name)s.mak" CFG="%(name)s - Win32 %(confkey)s"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
"""
class _GenerateV6DSP(_DSPGenerator):
@@ -580,7 +624,7 @@ class _GenerateV6DSP(_DSPGenerator):
for kind in confkeys:
self.file.write('!MESSAGE "%s - Win32 %s" (based on "Win32 (x86) External Target")\n' % (name, kind))
- self.file.write('!MESSAGE \n\n')
+ self.file.write('!MESSAGE\n\n')
def PrintProject(self):
name = self.name
@@ -637,7 +681,7 @@ class _GenerateV6DSP(_DSPGenerator):
first = 1
else:
self.file.write('!ELSEIF "$(CFG)" == "%s - Win32 %s"\n\n' % (name,kind))
- self.file.write('!ENDIF \n\n')
+ self.file.write('!ENDIF\n\n')
self.PrintSourceFiles()
self.file.write('# End Target\n'
'# End Project\n')
@@ -645,10 +689,10 @@ class _GenerateV6DSP(_DSPGenerator):
if self.nokeep == 0:
# now we pickle some data and add it to the file -- MSDEV will ignore it.
pdata = pickle.dumps(self.configs,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata).decode()
+ pdata = base64.b64encode(pdata).decode()
self.file.write(pdata + '\n')
pdata = pickle.dumps(self.sources,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata).decode()
+ pdata = base64.b64encode(pdata).decode()
self.file.write(pdata + '\n')
def PrintSourceFiles(self):
@@ -685,11 +729,13 @@ class _GenerateV6DSP(_DSPGenerator):
return # doesn't exist yet, so can't add anything to configs.
line = dspfile.readline()
+ # skip until marker
while line:
if line.find("# End Project") > -1:
break
line = dspfile.readline()
+ # read to get configs
line = dspfile.readline()
datas = line
while line and line != '\n':
@@ -707,12 +753,14 @@ class _GenerateV6DSP(_DSPGenerator):
self.configs.update(data)
+ # keep reading to get sources
data = None
line = dspfile.readline()
datas = line
while line and line != '\n':
line = dspfile.readline()
datas = datas + line
+ dspfile.close()
# OK, we've found our little pickled cache of data.
# it has a "# " in front of it, so we strip that.
@@ -878,6 +926,8 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
buildtarget = self.configs[kind].buildtarget
runfile = self.configs[kind].runfile
cmdargs = self.configs[kind].cmdargs
+ cpppaths = self.configs[kind].cpppaths
+ cppdefines = self.configs[kind].cppdefines
env_has_buildtarget = 'MSVSBUILDTARGET' in self.env
if not env_has_buildtarget:
@@ -895,9 +945,8 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
# This isn't perfect; CPPDEFINES and CPPPATH can contain $TARGET and $SOURCE,
# so they could vary depending on the command being generated. This code
# assumes they don't.
- preprocdefs = xmlify(';'.join(processDefines(self.env.get('CPPDEFINES', []))))
- includepath_Dirs = processIncludes(self.env.get('CPPPATH', []), self.env, None, None)
- includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
+ preprocdefs = xmlify(';'.join(processDefines(cppdefines)))
+ includepath = xmlify(';'.join(processIncludes(cpppaths, self.env, None, None)))
if not env_has_buildtarget:
del self.env['MSVSBUILDTARGET']
@@ -917,10 +966,10 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
if self.nokeep == 0:
# now we pickle some data and add it to the file -- MSDEV will ignore it.
pdata = pickle.dumps(self.configs,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata).decode()
+ pdata = base64.b64encode(pdata).decode()
self.file.write('<!-- SCons Data:\n' + pdata + '\n')
pdata = pickle.dumps(self.sources,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata).decode()
+ pdata = base64.b64encode(pdata).decode()
self.file.write(pdata + '-->\n')
def printSources(self, hierarchy, commonprefix):
@@ -998,11 +1047,13 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
return # doesn't exist yet, so can't add anything to configs.
line = dspfile.readline()
+ # skip until marker
while line:
if line.find('<!-- SCons Data:') > -1:
break
line = dspfile.readline()
+ # read to get configs
line = dspfile.readline()
datas = line
while line and line != '\n':
@@ -1020,12 +1071,14 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
self.configs.update(data)
+ # keep reading to get sources
data = None
line = dspfile.readline()
datas = line
while line and line != '\n':
line = dspfile.readline()
datas = datas + line
+ dspfile.close()
# OK, we've found our little pickled cache of data.
try:
@@ -1052,7 +1105,7 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
V10DSPHeader = """\
<?xml version="1.0" encoding="%(encoding)s"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="%(versionstr)s" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
"""
V10DSPProjectConfiguration = """\
@@ -1067,6 +1120,7 @@ V10DSPGlobals = """\
\t\t<ProjectGuid>%(project_guid)s</ProjectGuid>
%(scc_attrs)s\t\t<RootNamespace>%(name)s</RootNamespace>
\t\t<Keyword>MakeFileProj</Keyword>
+\t\t<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
\t</PropertyGroup>
"""
@@ -1080,7 +1134,7 @@ V10DSPPropertyGroupCondition = """\
V10DSPImportGroupCondition = """\
\t<ImportGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="PropertySheets">
-\t\t<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+\t\t<Import Project="$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
\t</ImportGroup>
"""
@@ -1104,9 +1158,9 @@ V15DSPHeader = """\
class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
"""Generates a Project file for MSVS 2010"""
- def __init__(self, dspfile, header, source, env):
+ def __init__(self, dspfile, source, env):
_DSPGenerator.__init__(self, dspfile, source, env)
- self.dspheader = header
+ self.dspheader = V10DSPHeader
self.dspconfiguration = V10DSPProjectConfiguration
self.dspglobals = V10DSPGlobals
@@ -1115,6 +1169,7 @@ class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
def PrintHeader(self):
env = self.env
name = self.name
+ versionstr = self.versionstr
encoding = env.subst('$MSVSENCODING')
project_guid = env.get('MSVS_PROJECT_GUID', '')
scc_provider = env.get('MSVS_SCC_PROVIDER', '')
@@ -1159,7 +1214,7 @@ class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
name = self.name
confkeys = sorted(self.configs.keys())
- self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\n')
+ self.file.write('\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.Default.props" />\n')
toolset = ''
if 'MSVC_VERSION' in self.env:
@@ -1170,7 +1225,7 @@ class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
platform = self.configs[kind].platform
self.file.write(V10DSPPropertyGroupCondition % locals())
- self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\n')
+ self.file.write('\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.props" />\n')
self.file.write('\t<ImportGroup Label="ExtensionSettings">\n')
self.file.write('\t</ImportGroup>\n')
@@ -1190,6 +1245,8 @@ class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
buildtarget = self.configs[kind].buildtarget
runfile = self.configs[kind].runfile
cmdargs = self.configs[kind].cmdargs
+ cpppaths = self.configs[kind].cpppaths
+ cppdefines = self.configs[kind].cppdefines
env_has_buildtarget = 'MSVSBUILDTARGET' in self.env
if not env_has_buildtarget:
@@ -1207,9 +1264,8 @@ class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
# This isn't perfect; CPPDEFINES and CPPPATH can contain $TARGET and $SOURCE,
# so they could vary depending on the command being generated. This code
# assumes they don't.
- preprocdefs = xmlify(';'.join(processDefines(self.env.get('CPPDEFINES', []))))
- includepath_Dirs = processIncludes(self.env.get('CPPPATH', []), self.env, None, None)
- includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
+ preprocdefs = xmlify(';'.join(processDefines(cppdefines)))
+ includepath = xmlify(';'.join(processIncludes(cpppaths, self.env, None, None)))
if not env_has_buildtarget:
del self.env['MSVSBUILDTARGET']
@@ -1226,14 +1282,15 @@ class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
raise SCons.Errors.InternalError('Unable to open "' + self.filtersabs + '" for writing:' + str(detail))
self.filters_file.write('<?xml version="1.0" encoding="utf-8"?>\n'
- '<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n')
+ '<Project ToolsVersion="%s" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n' %
+ self.versionstr)
self.PrintSourceFiles()
self.filters_file.write('</Project>')
self.filters_file.close()
- self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\n'
+ self.file.write('\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />\n'
'\t<ImportGroup Label="ExtensionTargets">\n'
'\t</ImportGroup>\n'
'</Project>\n')
@@ -1241,10 +1298,10 @@ class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
if self.nokeep == 0:
# now we pickle some data and add it to the file -- MSDEV will ignore it.
pdata = pickle.dumps(self.configs,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata).decode()
+ pdata = base64.b64encode(pdata).decode()
self.file.write('<!-- SCons Data:\n' + pdata + '\n')
pdata = pickle.dumps(self.sources,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata).decode()
+ pdata = base64.b64encode(pdata).decode()
self.file.write(pdata + '-->\n')
def printFilters(self, hierarchy, name):
@@ -1428,7 +1485,7 @@ class _GenerateV7DSW(_DSWGenerator):
def AddConfig(self, variant, dswfile=dswfile):
config = Config()
- match = re.match('(.*)\|(.*)', variant)
+ match = re.match(r'(.*)\|(.*)', variant)
if match:
config.variant = match.group(1)
config.platform = match.group(2)
@@ -1451,13 +1508,16 @@ class _GenerateV7DSW(_DSWGenerator):
self.platforms = []
for key in list(self.configs.keys()):
platform = self.configs[key].platform
- if not platform in self.platforms:
+ if platform not in self.platforms:
self.platforms.append(platform)
def GenerateProjectFilesInfo(self):
for dspfile in self.dspfiles:
dsp_folder_path, name = os.path.split(dspfile)
dsp_folder_path = os.path.abspath(dsp_folder_path)
+ if SCons.Util.splitext(name)[1] == '.filters':
+ # Ignore .filters project files
+ continue
dsp_relative_folder_path = os.path.relpath(dsp_folder_path, self.dsw_folder_path)
if dsp_relative_folder_path == os.curdir:
dsp_relative_file_path = name
@@ -1491,6 +1551,7 @@ class _GenerateV7DSW(_DSWGenerator):
while line:
line = dswfile.readline()
datas = datas + line
+ dswfile.close()
# OK, we've found our little pickled cache of data.
try:
@@ -1506,7 +1567,11 @@ class _GenerateV7DSW(_DSWGenerator):
def PrintSolution(self):
"""Writes a solution file"""
self.file.write('Microsoft Visual Studio Solution File, Format Version %s\n' % self.versionstr)
- if self.version_num > 14.0:
+ if self.version_num >= 14.2:
+ # Visual Studio 2019 is considered to be version 16.
+ self.file.write('# Visual Studio 16\n')
+ elif self.version_num > 14.0:
+ # Visual Studio 2015 and 2017 are both considered to be version 15.
self.file.write('# Visual Studio 15\n')
elif self.version_num >= 12.0:
self.file.write('# Visual Studio 14\n')
@@ -1617,7 +1682,7 @@ class _GenerateV7DSW(_DSWGenerator):
self.file.write('EndGlobal\n')
if self.nokeep == 0:
pdata = pickle.dumps(self.configs,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata).decode()
+ pdata = base64.b64encode(pdata).decode()
self.file.write(pdata)
self.file.write('\n')
@@ -1686,11 +1751,8 @@ def GenerateDSP(dspfile, source, env):
version_num = 6.0
if 'MSVS_VERSION' in env:
version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
- if version_num > 14.0:
- g = _GenerateV10DSP(dspfile, V15DSPHeader, source, env)
- g.Build()
- elif version_num >= 10.0:
- g = _GenerateV10DSP(dspfile, V10DSPHeader, source, env)
+ if version_num >= 10.0:
+ g = _GenerateV10DSP(dspfile, source, env)
g.Build()
elif version_num >= 7.0:
g = _GenerateV7DSP(dspfile, source, env)
@@ -1730,7 +1792,7 @@ def GenerateProject(target, source, env):
dspfile = builddspfile.srcnode()
# this detects whether or not we're using a VariantDir
- if not dspfile is builddspfile:
+ if dspfile is not builddspfile:
try:
bdsp = open(str(builddspfile), "w+")
except IOError as detail:
@@ -1738,6 +1800,7 @@ def GenerateProject(target, source, env):
raise
bdsp.write("This is just a placeholder file.\nThe real project file is here:\n%s\n" % dspfile.get_abspath())
+ bdsp.close()
GenerateDSP(dspfile, source, env)
@@ -1745,7 +1808,7 @@ def GenerateProject(target, source, env):
builddswfile = target[1]
dswfile = builddswfile.srcnode()
- if not dswfile is builddswfile:
+ if dswfile is not builddswfile:
try:
bdsw = open(str(builddswfile), "w+")
@@ -1754,6 +1817,7 @@ def GenerateProject(target, source, env):
raise
bdsw.write("This is just a placeholder file.\nThe real workspace file is here:\n%s\n" % dswfile.get_abspath())
+ bdsw.close()
GenerateDSW(dswfile, source, env)
@@ -1781,11 +1845,10 @@ def projectEmitter(target, source, env):
# Project file depends on CPPDEFINES and CPPPATH
preprocdefs = xmlify(';'.join(processDefines(env.get('CPPDEFINES', []))))
- includepath_Dirs = processIncludes(env.get('CPPPATH', []), env, None, None)
- includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
+ includepath = xmlify(';'.join(processIncludes(env.get('CPPPATH', []), env, None, None)))
source = source + "; ppdefs:%s incpath:%s"%(preprocdefs, includepath)
- if 'buildtarget' in env and env['buildtarget'] != None:
+ if 'buildtarget' in env and env['buildtarget'] is not None:
if SCons.Util.is_String(env['buildtarget']):
source = source + ' "%s"' % env['buildtarget']
elif SCons.Util.is_List(env['buildtarget']):
@@ -1799,7 +1862,7 @@ def projectEmitter(target, source, env):
try: source = source + ' "%s"' % env['buildtarget'].get_abspath()
except AttributeError: raise SCons.Errors.InternalError("buildtarget can be a string, a node, a list of strings or nodes, or None")
- if 'outdir' in env and env['outdir'] != None:
+ if 'outdir' in env and env['outdir'] is not None:
if SCons.Util.is_String(env['outdir']):
source = source + ' "%s"' % env['outdir']
elif SCons.Util.is_List(env['outdir']):
@@ -1962,8 +2025,14 @@ def generate(env):
default_MSVS_SConscript = env.File('SConstruct')
env['MSVSSCONSCRIPT'] = default_MSVS_SConscript
- env['MSVSSCONS'] = '"%s" -c "%s"' % (python_executable, getExecScriptMain(env))
- env['MSVSSCONSFLAGS'] = '-C "${MSVSSCONSCRIPT.dir.get_abspath()}" -f ${MSVSSCONSCRIPT.name}'
+ # Allow consumers to provide their own versions of MSVSSCONS and
+ # MSVSSCONSFLAGS. This helps support consumers who use wrapper scripts to
+ # invoke scons.
+ if 'MSVSSCONS' not in env:
+ env['MSVSSCONS'] = '"%s" -c "%s"' % (python_executable, getExecScriptMain(env))
+ if 'MSVSSCONSFLAGS' not in env:
+ env['MSVSSCONSFLAGS'] = '-C "${MSVSSCONSCRIPT.dir.get_abspath()}" -f ${MSVSSCONSCRIPT.name}'
+
env['MSVSSCONSCOM'] = '$MSVSSCONS $MSVSSCONSFLAGS'
env['MSVSBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
env['MSVSREBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mwcc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mwcc.py
index 393775cd472..1820ddbee35 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mwcc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mwcc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mwcc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mwcc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mwld.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mwld.py
index ca7b856e513..3792b165133 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/mwld.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/mwld.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mwld.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mwld.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/nasm.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/nasm.py
index 18dff0d7488..bc1e446792f 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/nasm.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/nasm.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/nasm.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/nasm.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/__init__.py
index d5f197e29de..02f1acd16ce 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/__init__.py
@@ -25,7 +25,7 @@ SCons Packaging Tool.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Environment
@@ -35,11 +35,11 @@ from SCons.Util import is_List, make_path_relative
from SCons.Warnings import warn, Warning
import os
-import imp
+import importlib
__all__ = [
- 'src_targz', 'src_tarbz2', 'src_xz', 'src_zip',
- 'targz', 'tarbz2', 'xz', 'zip',
+ 'src_targz', 'src_tarbz2', 'src_tarxz', 'src_zip',
+ 'targz', 'tarbz2', 'tarxz', 'zip',
'rpm', 'msi', 'ipk',
]
@@ -122,12 +122,12 @@ def Package(env, target=None, source=None, **kw):
# load the needed packagers.
def load_packager(type):
try:
- file,path,desc=imp.find_module(type, __path__)
- return imp.load_module(type, file, path, desc)
+ # the specific packager is a relative import
+ return importlib.import_module("." + type, __name__)
except ImportError as e:
- raise EnvironmentError("packager %s not available: %s"%(type,str(e)))
+ raise SConsEnvironmentError("packager %s not available: %s" % (type, str(e)))
- packagers=list(map(load_packager, PACKAGETYPE))
+ packagers = list(map(load_packager, PACKAGETYPE))
# set up targets and the PACKAGEROOT
try:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/ipk.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/ipk.py
index 9d3f45d272d..27657eb6185 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/ipk.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/ipk.py
@@ -3,7 +3,7 @@
#
# Copyright (c) 2001 - 2019 The SCons Foundation
-#
+#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
@@ -24,7 +24,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
@@ -117,17 +117,17 @@ def build_specfiles(source, target, env):
#
#
opened_files={}
- def open_file(needle, haystack):
+ def open_file(needle, haystack=None):
try:
return opened_files[needle]
except KeyError:
files = filter(lambda x: x.get_path().rfind(needle) != -1, haystack)
# Py3: filter returns an iterable, not a list
file = list(files)[0]
- opened_files[needle]=open(file.get_abspath(), 'w')
+ opened_files[needle] = open(file.get_abspath(), 'w')
return opened_files[needle]
- control_file=open_file('control', target)
+ control_file = open_file('control', target)
if 'X_IPK_DESCRIPTION' not in env:
env['X_IPK_DESCRIPTION']="%s\n %s"%(env['SUMMARY'],
@@ -149,7 +149,7 @@ Description: $X_IPK_DESCRIPTION
control_file.write(env.subst(content))
#
- # now handle the various other files, which purpose it is to set post-,
+ # now handle the various other files, which purpose it is to set post-,
# pre-scripts and mark files as config files.
#
# We do so by filtering the source files for files which are marked with
@@ -161,14 +161,14 @@ Description: $X_IPK_DESCRIPTION
# into the same named file.
#
for f in [x for x in source if 'PACKAGING_CONFIG' in dir(x)]:
- config=open_file('conffiles')
+ config = open_file('conffiles')
config.write(f.PACKAGING_INSTALL_LOCATION)
config.write('\n')
for str in 'POSTRM PRERM POSTINST PREINST'.split():
name="PACKAGING_X_IPK_%s"%str
for f in [x for x in source if name in dir(x)]:
- file=open_file(name)
+ file = open_file(name)
file.write(env[str])
#
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/msi.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/msi.py
index 1226c70c556..1038a952587 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/msi.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/msi.py
@@ -25,7 +25,7 @@ The msi packager.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/packaging/msi.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/msi.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import SCons
@@ -188,7 +188,7 @@ def build_wxsfile(target, source, env):
""" Compiles a .wxs file from the keywords given in env['msi_spec'] and
by analyzing the tree of source nodes and their tags.
"""
- file = open(target[0].get_abspath(), 'w')
+ f = open(target[0].get_abspath(), 'w')
try:
# Create a document with the Wix root tag
@@ -209,7 +209,7 @@ def build_wxsfile(target, source, env):
build_license_file(target[0].get_dir(), env)
# write the xml to a file
- file.write( doc.toprettyxml() )
+ f.write( doc.toprettyxml() )
# call a user specified function
if 'CHANGE_SPECFILE' in env:
@@ -217,6 +217,8 @@ def build_wxsfile(target, source, env):
except KeyError as e:
raise SCons.Errors.UserError( '"%s" package field for MSI is missing.' % e.args[0] )
+ finally:
+ f.close()
#
# setup function
@@ -440,14 +442,13 @@ def build_license_file(directory, spec):
pass # ignore this as X_MSI_LICENSE_TEXT is optional
if name!='' or text!='':
- file = open( os.path.join(directory.get_path(), 'License.rtf'), 'w' )
- file.write('{\\rtf')
- if text!='':
- file.write(text.replace('\n', '\\par '))
- else:
- file.write(name+'\\par\\par')
- file.write('}')
- file.close()
+ with open(os.path.join(directory.get_path(), 'License.rtf'), 'w') as f:
+ f.write('{\\rtf')
+ if text!='':
+ f.write(text.replace('\n', '\\par '))
+ else:
+ f.write(name+'\\par\\par')
+ f.write('}')
#
# mandatory and optional package tags
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/rpm.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/rpm.py
index a03eab86f61..aa150618f13 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/rpm.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/rpm.py
@@ -25,7 +25,7 @@ The rpm packager.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
@@ -125,11 +125,11 @@ def build_specfile(target, source, env):
""" Builds a RPM specfile from a dictionary with string metadata and
by analyzing a tree of nodes.
"""
- with open(target[0].get_abspath(), 'w') as file:
+ with open(target[0].get_abspath(), 'w') as ofp:
try:
- file.write(build_specfile_header(env))
- file.write(build_specfile_sections(env))
- file.write(build_specfile_filesection(env, source))
+ ofp.write(build_specfile_header(env))
+ ofp.write(build_specfile_sections(env))
+ ofp.write(build_specfile_filesection(env, source))
# call a user specified function
if 'CHANGE_SPECFILE' in env:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_tarbz2.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_tarbz2.py
index 0787750d335..2089142237c 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_tarbz2.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_tarbz2.py
@@ -26,7 +26,7 @@ The tarbz2 SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.packaging import putintopackageroot
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_targz.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_targz.py
index 7ff2279768a..f7be89c7bd2 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_targz.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_targz.py
@@ -26,7 +26,7 @@ The targz SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.packaging import putintopackageroot
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_tarxz.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_tarxz.py
index e2d65615da6..9093d279d21 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_tarxz.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_tarxz.py
@@ -26,7 +26,7 @@ The tarxz SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_tarxz.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/src_tarxz.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.packaging import putintopackageroot
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_zip.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_zip.py
index d18aa3fdfe7..51859ec1812 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/src_zip.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/src_zip.py
@@ -26,7 +26,7 @@ The zip SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.packaging import putintopackageroot
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/tarbz2.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/tarbz2.py
index 613120308f9..6adae3b21ea 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/tarbz2.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/tarbz2.py
@@ -26,7 +26,7 @@ The tarbz2 packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/targz.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/targz.py
index 8ce2465adcf..402063f5744 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/targz.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/targz.py
@@ -26,7 +26,7 @@ The targz packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/targz.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/targz.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/tarxz.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/tarxz.py
index bfddb6d18de..0e3e44d03c0 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/tarxz.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/tarxz.py
@@ -26,7 +26,7 @@ The tarxz packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/tarxz.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/tarxz.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/zip.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/zip.py
index cb116f0b1ca..04bb2463df9 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/packaging/zip.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/packaging/zip.py
@@ -26,7 +26,7 @@ The zip SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/zip.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/zip.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdf.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdf.py
index 5b8d97148a7..c2b8d72ba9f 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdf.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdf.py
@@ -28,7 +28,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdf.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/pdf.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Builder
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdflatex.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdflatex.py
index 603dd29f7ac..92edf6ad9c1 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdflatex.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdflatex.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdflatex.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/pdflatex.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdftex.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdftex.py
index 85b45d23aec..3a4c8e1b5e5 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/pdftex.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/pdftex.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdftex.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/pdftex.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import SCons.Action
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/qt.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/qt.py
index 57175d0fb4c..082922491d0 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/qt.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/qt.py
@@ -33,7 +33,7 @@ selection method.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/qt.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/qt.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
import re
@@ -66,11 +66,17 @@ if SCons.Util.case_sensitive_suffixes('.h', '.H'):
cxx_suffixes = cplusplus.CXXSuffixes
-#
def find_platform_specific_qt_paths():
"""
- If the platform has non-standard paths which it installs QT in,return the likely default path
- :return:
+ find non-standard QT paths
+
+ If the platform does not put QT tools in standard search paths,
+ the path is expected to be set using QTDIR. SCons violates
+ the normal rule of not pulling from the user's environment
+ in this case. However, some test cases try to validate what
+ happens when QTDIR is unset, so we need to try to make a guess.
+
+ :return: a guess at a path
"""
# qt_bin_dirs = []
@@ -83,6 +89,7 @@ def find_platform_specific_qt_paths():
# Centos installs QT under /usr/{lib,lib64}/qt{4,5,-3.3}/bin
# so we need to handle this differently
# qt_bin_dirs = glob.glob('/usr/lib64/qt*/bin')
+ # TODO: all current Fedoras do the same, need to look deeper here.
qt_bin_dir = '/usr/lib64/qt-3.3/bin'
return qt_bin_dir
@@ -97,7 +104,7 @@ def checkMocIncluded(target, source, env):
# not really sure about the path transformations (moc.cwd? cpp.cwd?) :-/
path = SCons.Defaults.CScan.path(env, moc.cwd)
includes = SCons.Defaults.CScan(cpp, env, path)
- if not moc in includes:
+ if moc not in includes:
SCons.Warnings.warn(
GeneratedMocFileNotIncluded,
"Generated moc file '%s' is not included by '%s'" %
@@ -118,7 +125,7 @@ class _Automoc(object):
def __init__(self, objBuilderName):
self.objBuilderName = objBuilderName
-
+
def __call__(self, target, source, env):
"""
Smart autoscan function. Gets the list of objects for the Program
@@ -133,25 +140,25 @@ class _Automoc(object):
debug = int(env.subst('$QT_DEBUG'))
except ValueError:
debug = 0
-
+
# some shortcuts used in the scanner
splitext = SCons.Util.splitext
objBuilder = getattr(env, self.objBuilderName)
-
+
# some regular expressions:
# Q_OBJECT detection
- q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]')
+ q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]')
# cxx and c comment 'eater'
#comment = re.compile(r'(//.*)|(/\*(([^*])|(\*[^/]))*\*/)')
# CW: something must be wrong with the regexp. See also bug #998222
# CURRENTLY THERE IS NO TEST CASE FOR THAT
-
+
# The following is kind of hacky to get builders working properly (FIXME)
objBuilderEnv = objBuilder.env
objBuilder.env = env
mocBuilderEnv = env.Moc.env
env.Moc.env = env
-
+
# make a deep copy for the result; MocH objects will be appended
out_sources = source[:]
@@ -164,7 +171,7 @@ class _Automoc(object):
cpp = obj.sources[0]
if not splitext(str(cpp))[1] in cxx_suffixes:
if debug:
- print("scons: qt: '%s' is no cxx file. Discarded." % str(cpp))
+ print("scons: qt: '%s' is no cxx file. Discarded." % str(cpp))
# c or fortran source
continue
#cpp_contents = comment.sub('', cpp.get_text_contents())
@@ -260,7 +267,7 @@ def uicScannerFunc(node, env, path):
return result
uicScanner = SCons.Scanner.Base(uicScannerFunc,
- name = "UicScanner",
+ name = "UicScanner",
node_class = SCons.Node.FS.File,
node_factory = SCons.Node.FS.File,
recursive = 0)
@@ -336,7 +343,7 @@ def generate(env):
mocBld.prefix[cxx] = '$QT_MOCCXXPREFIX'
mocBld.suffix[cxx] = '$QT_MOCCXXSUFFIX'
- # register the builders
+ # register the builders
env['BUILDERS']['Uic'] = uicBld
env['BUILDERS']['Moc'] = mocBld
static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rmic.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rmic.py
index ab26e379176..ddf12e2153c 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rmic.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rmic.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rmic.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/rmic.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
@@ -110,11 +110,9 @@ def generate(env):
if env['PLATFORM'] == 'win32':
version = env.get('JAVAVERSION', None)
- default_paths=get_java_install_dirs(env['PLATFORM'], version=version)
-
# Ensure that we have a proper path for rmic
- rmic = SCons.Tool.find_program_path(env, 'rmic', default_paths=default_paths)
-
+ paths = get_java_install_dirs('win32', version=version)
+ rmic = SCons.Tool.find_program_path(env, 'rmic', default_paths=paths)
# print("RMIC: %s"%rmic)
if rmic:
rmic_bin_dir = os.path.dirname(rmic)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpcgen.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpcgen.py
index 69b275c766d..f1eebeafdc3 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpcgen.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpcgen.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rpcgen.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/rpcgen.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from SCons.Builder import Builder
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpm.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpm.py
index e91c7e92f81..7de20ccc877 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpm.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpm.py
@@ -33,7 +33,7 @@ tar.gz consisting of the source file and a specfile.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rpm.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/rpm.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import re
@@ -51,43 +51,44 @@ def get_cmd(source, env):
if SCons.Util.is_List(source):
tar_file_with_included_specfile = source[0]
return "%s %s %s"%(env['RPM'], env['RPMFLAGS'],
- tar_file_with_included_specfile.get_abspath() )
+ tar_file_with_included_specfile.get_abspath())
def build_rpm(target, source, env):
# create a temporary rpm build root.
- tmpdir = os.path.join( os.path.dirname( target[0].get_abspath() ), 'rpmtemp' )
+ tmpdir = os.path.join(os.path.dirname(target[0].get_abspath()), 'rpmtemp')
if os.path.exists(tmpdir):
shutil.rmtree(tmpdir)
# now create the mandatory rpm directory structure.
for d in ['RPMS', 'SRPMS', 'SPECS', 'BUILD']:
- os.makedirs( os.path.join( tmpdir, d ) )
+ os.makedirs(os.path.join(tmpdir, d))
# set the topdir as an rpmflag.
- env.Prepend( RPMFLAGS = '--define \'_topdir %s\'' % tmpdir )
+ env.Prepend(RPMFLAGS = '--define \'_topdir %s\'' % tmpdir)
# now call rpmbuild to create the rpm package.
handle = subprocess.Popen(get_cmd(source, env),
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
shell=True)
- output = SCons.Util.to_str(handle.stdout.read())
+ with handle.stdout:
+ output = SCons.Util.to_str(handle.stdout.read())
status = handle.wait()
if status:
- raise SCons.Errors.BuildError( node=target[0],
- errstr=output,
- filename=str(target[0]) )
+ raise SCons.Errors.BuildError(node=target[0],
+ errstr=output,
+ filename=str(target[0]))
else:
# XXX: assume that LC_ALL=C is set while running rpmbuild
- output_files = re.compile( 'Wrote: (.*)' ).findall( output )
+ output_files = re.compile('Wrote: (.*)').findall(output)
- for output, input in zip( output_files, target ):
+ for output, input in zip(output_files, target):
rpm_output = os.path.basename(output)
expected = os.path.basename(input.get_path())
assert expected == rpm_output, "got %s but expected %s" % (rpm_output, expected)
- shutil.copy( output, input.get_abspath() )
+ shutil.copy(output, input.get_abspath())
# cleanup before leaving.
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpmutils.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpmutils.py
index b2c5a1aa151..bacfe50fad5 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/rpmutils.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/rpmutils.py
@@ -36,7 +36,7 @@ exact syntax.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/rpmutils.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/rpmutils.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import platform
@@ -482,9 +482,11 @@ def updateRpmDicts(rpmrc, pyfile):
"""
try:
# Read old rpmutils.py file
- oldpy = open(pyfile,"r").readlines()
+ with open(pyfile,"r") as f:
+ oldpy = f.readlines()
# Read current rpmrc.in file
- rpm = open(rpmrc,"r").readlines()
+ with open(rpmrc,"r") as f:
+ rpm = f.readlines()
# Parse for data
data = {}
# Allowed section names that get parsed
@@ -511,24 +513,23 @@ def updateRpmDicts(rpmrc, pyfile):
# Insert data
data[key][tokens[1]] = tokens[2:]
# Write new rpmutils.py file
- out = open(pyfile,"w")
- pm = 0
- for l in oldpy:
- if pm:
- if l.startswith('# End of rpmrc dictionaries'):
- pm = 0
+ with open(pyfile,"w") as out:
+ pm = 0
+ for l in oldpy:
+ if pm:
+ if l.startswith('# End of rpmrc dictionaries'):
+ pm = 0
+ out.write(l)
+ else:
out.write(l)
- else:
- out.write(l)
- if l.startswith('# Start of rpmrc dictionaries'):
- pm = 1
- # Write data sections to single dictionaries
- for key, entries in data.items():
- out.write("%s = {\n" % key)
- for arch in sorted(entries.keys()):
- out.write(" '%s' : ['%s'],\n" % (arch, "','".join(entries[arch])))
- out.write("}\n\n")
- out.close()
+ if l.startswith('# Start of rpmrc dictionaries'):
+ pm = 1
+ # Write data sections to single dictionaries
+ for key, entries in data.items():
+ out.write("%s = {\n" % key)
+ for arch in sorted(entries.keys()):
+ out.write(" '%s' : ['%s'],\n" % (arch, "','".join(entries[arch])))
+ out.write("}\n\n")
except:
pass
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgiar.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgiar.py
index 356e430c1f4..a2f86cb7d1e 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgiar.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgiar.py
@@ -33,7 +33,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgiar.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgiar.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgic++.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgic++.py
index 73326b3a969..9d7da764783 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgic++.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgic++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgic++.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgic++.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
#forward proxy to the preffered cxx version
from SCons.Tool.sgicxx import *
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgicc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgicc.py
index 5ecd05f0967..df4cf2cd2ee 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgicc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgicc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgicc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgicc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
from . import cc
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgicxx.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgicxx.py
index 97a93c89575..3270faa3e85 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgicxx.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgicxx.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgicxx.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgicxx.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgilink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgilink.py
index 9e131d21719..402c28bd9a3 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sgilink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sgilink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgilink.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgilink.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunar.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunar.py
index a619ea662de..2fab8885df9 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunar.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunar.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunar.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunar.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunc++.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunc++.py
index 373ca6b8ecd..d33fcdf5128 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunc++.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunc++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunc++.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunc++.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
#forward proxy to the preffered cxx version
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/suncc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/suncc.py
index a232cd163c5..bc6bc9a6e56 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/suncc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/suncc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/suncc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/suncc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/suncxx.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/suncxx.py
index 24e0c185c27..b0e343bb662 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/suncxx.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/suncxx.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/suncxx.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/suncxx.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons
@@ -52,11 +52,17 @@ def get_package_info(package_name, pkginfo, pkgchk):
version = None
pathname = None
try:
- sadm_contents = open('/var/sadm/install/contents', 'r').read()
+ from subprocess import DEVNULL # py3k
+ except ImportError:
+ DEVNULL = open(os.devnull, 'wb')
+
+ try:
+ with open('/var/sadm/install/contents', 'r') as f:
+ sadm_contents = f.read()
except EnvironmentError:
pass
else:
- sadm_re = re.compile('^(\S*/bin/CC)(=\S*)? %s$' % package_name, re.M)
+ sadm_re = re.compile(r'^(\S*/bin/CC)(=\S*)? %s$' % package_name, re.M)
sadm_match = sadm_re.search(sadm_contents)
if sadm_match:
pathname = os.path.dirname(sadm_match.group(1))
@@ -64,12 +70,12 @@ def get_package_info(package_name, pkginfo, pkgchk):
try:
p = subprocess.Popen([pkginfo, '-l', package_name],
stdout=subprocess.PIPE,
- stderr=open('/dev/null', 'w'))
+ stderr=DEVNULL)
except EnvironmentError:
pass
else:
pkginfo_contents = p.communicate()[0]
- version_re = re.compile('^ *VERSION:\s*(.*)$', re.M)
+ version_re = re.compile(r'^ *VERSION:\s*(.*)$', re.M)
version_match = version_re.search(pkginfo_contents)
if version_match:
version = version_match.group(1)
@@ -78,7 +84,7 @@ def get_package_info(package_name, pkginfo, pkgchk):
try:
p = subprocess.Popen([pkgchk, '-l', package_name],
stdout=subprocess.PIPE,
- stderr=open('/dev/null', 'w'))
+ stderr=DEVNULL)
except EnvironmentError:
pass
else:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf77.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf77.py
index 8f24a1581e1..0bbb52f4064 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf77.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf77.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf77.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunf77.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf90.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf90.py
index 303eac29759..5c34a08978d 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf90.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf90.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf90.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunf90.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf95.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf95.py
index 621fdfaf730..71a684040f8 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunf95.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunf95.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf95.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunf95.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Util
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunlink.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunlink.py
index ae1b5dbf4cd..39a921aae4a 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/sunlink.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/sunlink.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunlink.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunlink.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/swig.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/swig.py
index 830e82ea228..a6ab3dee335 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/swig.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/swig.py
@@ -32,7 +32,7 @@ from __future__ import print_function
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/swig.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/swig.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
import sys
@@ -70,7 +70,9 @@ def _find_modules(src):
directors = 0
mnames = []
try:
- matches = _reModule.findall(open(src).read())
+ with open(src) as f:
+ data = f.read()
+ matches = _reModule.findall(data)
except IOError:
# If the file's not yet generated, guess the module name from the file stem
matches = []
@@ -135,21 +137,31 @@ def _swigEmitter(target, source, env):
def _get_swig_version(env, swig):
"""Run the SWIG command line tool to get and return the version number"""
+ version = None
swig = env.subst(swig)
+ if not swig:
+ return version
pipe = SCons.Action._subproc(env, SCons.Util.CLVar(swig) + ['-version'],
stdin = 'devnull',
stderr = 'devnull',
stdout = subprocess.PIPE)
- if pipe.wait() != 0: return
+ if pipe.wait() != 0:
+ return version
# MAYBE: out = SCons.Util.to_str (pipe.stdout.read())
- out = SCons.Util.to_str(pipe.stdout.read())
- match = re.search('SWIG Version\s+(\S+).*', out, re.MULTILINE)
+ with pipe.stdout:
+ out = SCons.Util.to_str(pipe.stdout.read())
+
+ match = re.search(r'SWIG Version\s+(\S+).*', out, re.MULTILINE)
if match:
- if verbose: print("Version is:%s"%match.group(1))
- return match.group(1)
+ version = match.group(1)
+ if verbose:
+ print("Version is: %s" % version)
else:
- if verbose: print("Unable to detect version: [%s]"%out)
+ if verbose:
+ print("Unable to detect version: [%s]" % out)
+
+ return version
def generate(env):
"""Add Builders and construction variables for swig to an Environment."""
@@ -172,9 +184,10 @@ def generate(env):
from SCons.Platform.mingw import MINGW_DEFAULT_PATHS
from SCons.Platform.cygwin import CYGWIN_DEFAULT_PATHS
+ from SCons.Platform.win32 import CHOCO_DEFAULT_PATH
if sys.platform == 'win32':
- swig = SCons.Tool.find_program_path(env, 'swig', default_paths=MINGW_DEFAULT_PATHS + CYGWIN_DEFAULT_PATHS + [r'C:\ProgramData\chocolatey\bin'] )
+ swig = SCons.Tool.find_program_path(env, 'swig', default_paths=MINGW_DEFAULT_PATHS + CYGWIN_DEFAULT_PATHS + CHOCO_DEFAULT_PATH)
if swig:
swig_bin_dir = os.path.dirname(swig)
env.AppendENVPath('PATH', swig_bin_dir)
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tar.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tar.py
index edaaa4639cb..6a59683fb4f 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tar.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tar.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/tar.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/tar.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tex.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tex.py
index 1632f8b2880..8c4ee965dbd 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tex.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tex.py
@@ -33,7 +33,7 @@ selection method.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Tool/tex.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/tex.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
import re
@@ -74,15 +74,15 @@ openout_bcf_re = re.compile(r"OUTPUT *(.*\.bcf)")
#printglossary_re = re.compile(r"^[^%]*\\printglossary", re.MULTILINE)
# search to find rerun warnings
-warning_rerun_str = '(^LaTeX Warning:.*Rerun)|(^Package \w+ Warning:.*Rerun)'
+warning_rerun_str = r'(^LaTeX Warning:.*Rerun)|(^Package \w+ Warning:.*Rerun)'
warning_rerun_re = re.compile(warning_rerun_str, re.MULTILINE)
# search to find citation rerun warnings
-rerun_citations_str = "^LaTeX Warning:.*\n.*Rerun to get citations correct"
+rerun_citations_str = r"^LaTeX Warning:.*\n.*Rerun to get citations correct"
rerun_citations_re = re.compile(rerun_citations_str, re.MULTILINE)
# search to find undefined references or citations warnings
-undefined_references_str = '(^LaTeX Warning:.*undefined references)|(^Package \w+ Warning:.*undefined citations)'
+undefined_references_str = r'(^LaTeX Warning:.*undefined references)|(^Package \w+ Warning:.*undefined citations)'
undefined_references_re = re.compile(undefined_references_str, re.MULTILINE)
# used by the emitter
@@ -297,7 +297,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
logfilename = targetbase + '.log'
logContent = ''
if os.path.isfile(logfilename):
- logContent = open(logfilename, "r").read()
+ with open(logfilename, "r") as f:
+ logContent = f.read()
# Read the fls file to find all .aux files
@@ -305,7 +306,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
flsContent = ''
auxfiles = []
if os.path.isfile(flsfilename):
- flsContent = open(flsfilename, "r").read()
+ with open(flsfilename, "r") as f:
+ flsContent = f.read()
auxfiles = openout_aux_re.findall(flsContent)
# remove duplicates
dups = {}
@@ -315,7 +317,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
bcffiles = []
if os.path.isfile(flsfilename):
- flsContent = open(flsfilename, "r").read()
+ with open(flsfilename, "r") as f:
+ flsContent = f.read()
bcffiles = openout_bcf_re.findall(flsContent)
# remove duplicates
dups = {}
@@ -338,7 +341,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
already_bibtexed.append(auxfilename)
target_aux = os.path.join(targetdir, auxfilename)
if os.path.isfile(target_aux):
- content = open(target_aux, "r").read()
+ with open(target_aux, "r") as f:
+ content = f.read()
if content.find("bibdata") != -1:
if Verbose:
print("Need to run bibtex on ",auxfilename)
@@ -361,7 +365,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
already_bibtexed.append(bcffilename)
target_bcf = os.path.join(targetdir, bcffilename)
if os.path.isfile(target_bcf):
- content = open(target_bcf, "r").read()
+ with open(target_bcf, "r") as f:
+ content = f.read()
if content.find("bibdata") != -1:
if Verbose:
print("Need to run biber on ",bcffilename)
@@ -647,7 +652,7 @@ def ScanFiles(theFile, target, paths, file_tests, file_tests_search, env, graphi
if incResult:
aux_files.append(os.path.join(targetdir, incResult.group(1)))
if Verbose:
- print("\include file names : ", aux_files)
+ print(r"\include file names : ", aux_files)
# recursively call this on each of the included files
inc_files = [ ]
inc_files.extend( include_re.findall(content) )
@@ -776,7 +781,7 @@ def tex_emitter_core(target, source, env, graphics_extensions):
# add side effects if feature is present.If file is to be generated,add all side effects
if Verbose and theSearch:
print("check side effects for ",suffix_list[-1])
- if (theSearch != None) or (not source[0].exists() ):
+ if theSearch is not None or not source[0].exists():
file_list = [targetbase,]
# for bibunit we need a list of files
if suffix_list[-1] == 'bibunit':
@@ -813,7 +818,8 @@ def tex_emitter_core(target, source, env, graphics_extensions):
# read fls file to get all other files that latex creates and will read on the next pass
# remove files from list that we explicitly dealt with above
if os.path.isfile(flsfilename):
- content = open(flsfilename, "r").read()
+ with open(flsfilename, "r") as f:
+ content = f.read()
out_files = openout_re.findall(content)
myfiles = [auxfilename, logfilename, flsfilename, targetbase+'.dvi',targetbase+'.pdf']
for filename in out_files[:]:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/textfile.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/textfile.py
index 7521a1bf549..8d19649e31e 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/textfile.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/textfile.py
@@ -44,7 +44,7 @@ Textfile/Substfile builder for SCons.
is unpredictable whether the expansion will occur.
"""
-__revision__ = "src/engine/SCons/Tool/textfile.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/textfile.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tlib.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tlib.py
index 69d891405a1..0e83c1723c7 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/tlib.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/tlib.py
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/tlib.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/tlib.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Tool
import SCons.Tool.bcc32
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/wix.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/wix.py
index 8c5f6032f76..6ee17843612 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/wix.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/wix.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/wix.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/wix.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import SCons.Builder
import SCons.Action
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/xgettext.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/xgettext.py
index 5b33ff50139..920255abbd4 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/xgettext.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/xgettext.py
@@ -24,7 +24,24 @@ Tool specific initialization of `xgettext` tool.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/xgettext.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/xgettext.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+
+import os
+import re
+import subprocess
+import sys
+
+import SCons.Action
+import SCons.Node.FS
+import SCons.Tool
+import SCons.Util
+from SCons.Builder import BuilderBase
+from SCons.Environment import _null
+from SCons.Platform.cygwin import CYGWIN_DEFAULT_PATHS
+from SCons.Platform.mingw import MINGW_DEFAULT_PATHS
+from SCons.Tool.GettextCommon import _POTargetFactory
+from SCons.Tool.GettextCommon import RPaths, _detect_xgettext
+from SCons.Tool.GettextCommon import _xgettext_exists
#############################################################################
@@ -41,10 +58,6 @@ class _CmdRunner(object):
self.commandstr = commandstr
def __call__(self, target, source, env):
- import SCons.Action
- import subprocess
- import os
- import sys
kw = {
'stdin': 'devnull',
'stdout': subprocess.PIPE,
@@ -57,11 +70,10 @@ class _CmdRunner(object):
self.out, self.err = proc.communicate()
self.status = proc.wait()
if self.err:
- sys.stderr.write(unicode(self.err))
+ sys.stderr.write(SCons.Util.UnicodeType(self.err))
return self.status
def strfunction(self, target, source, env):
- import os
comstr = self.commandstr
if env.subst(comstr, target=target, source=source) == "":
comstr = self.command
@@ -74,9 +86,6 @@ class _CmdRunner(object):
#############################################################################
def _update_pot_file(target, source, env):
""" Action function for `POTUpdate` builder """
- import re
- import os
- import SCons.Action
nop = lambda target, source, env: 0
# Save scons cwd and os cwd (NOTE: they may be different. After the job, we
@@ -154,10 +163,6 @@ def _update_pot_file(target, source, env):
#############################################################################
#############################################################################
-from SCons.Builder import BuilderBase
-
-
-#############################################################################
class _POTBuilder(BuilderBase):
def _execute(self, env, target, source, *args):
if not target:
@@ -175,10 +180,6 @@ class _POTBuilder(BuilderBase):
def _scan_xgettext_from_files(target, source, env, files=None, path=None):
""" Parses `POTFILES.in`-like file and returns list of extracted file names.
"""
- import re
- import SCons.Util
- import SCons.Node.FS
-
if files is None:
return 0
if not SCons.Util.is_List(files):
@@ -230,10 +231,6 @@ def _scan_xgettext_from_files(target, source, env, files=None, path=None):
#############################################################################
def _pot_update_emitter(target, source, env):
""" Emitter function for `POTUpdate` builder """
- from SCons.Tool.GettextCommon import _POTargetFactory
- import SCons.Util
- import SCons.Node.FS
-
if 'XGETTEXTFROM' in env:
xfrom = env['XGETTEXTFROM']
else:
@@ -261,10 +258,6 @@ def _pot_update_emitter(target, source, env):
#############################################################################
#############################################################################
-from SCons.Environment import _null
-
-
-#############################################################################
def _POTUpdateBuilderWrapper(env, target=None, source=_null, **kw):
return env._POTUpdateBuilder(target, source, **kw)
@@ -274,8 +267,6 @@ def _POTUpdateBuilderWrapper(env, target=None, source=_null, **kw):
#############################################################################
def _POTUpdateBuilder(env, **kw):
""" Creates `POTUpdate` builder object """
- import SCons.Action
- from SCons.Tool.GettextCommon import _POTargetFactory
kw['action'] = SCons.Action.Action(_update_pot_file, None)
kw['suffix'] = '$POTSUFFIX'
kw['target_factory'] = _POTargetFactory(env, alias='$POTUPDATE_ALIAS').File
@@ -288,13 +279,6 @@ def _POTUpdateBuilder(env, **kw):
#############################################################################
def generate(env, **kw):
""" Generate `xgettext` tool """
- import sys
- import os
- import SCons.Util
- import SCons.Tool
- from SCons.Tool.GettextCommon import RPaths, _detect_xgettext
- from SCons.Platform.mingw import MINGW_DEFAULT_PATHS
- from SCons.Platform.cygwin import CYGWIN_DEFAULT_PATHS
if sys.platform == 'win32':
xgettext = SCons.Tool.find_program_path(env, 'xgettext', default_paths=MINGW_DEFAULT_PATHS + CYGWIN_DEFAULT_PATHS )
@@ -359,7 +343,6 @@ def generate(env, **kw):
#############################################################################
def exists(env):
""" Check, whether the tool exists """
- from SCons.Tool.GettextCommon import _xgettext_exists
try:
return _xgettext_exists(env)
except:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/yacc.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/yacc.py
index 00e6ef7402b..aaf9a8a7992 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/yacc.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/yacc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/yacc.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/yacc.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
import sys
@@ -41,9 +41,15 @@ import SCons.Tool
import SCons.Util
from SCons.Platform.mingw import MINGW_DEFAULT_PATHS
from SCons.Platform.cygwin import CYGWIN_DEFAULT_PATHS
+from SCons.Platform.win32 import CHOCO_DEFAULT_PATH
YaccAction = SCons.Action.Action("$YACCCOM", "$YACCCOMSTR")
+if sys.platform == 'win32':
+ BINS = ['bison', 'yacc', 'win_bison']
+else:
+ BINS = ["bison", "yacc"]
+
def _yaccEmitter(target, source, env, ysuf, hsuf):
yaccflags = env.subst("$YACCFLAGS", target=target, source=source)
flags = SCons.Util.CLVar(yaccflags)
@@ -97,6 +103,29 @@ def ymEmitter(target, source, env):
def yyEmitter(target, source, env):
return _yaccEmitter(target, source, env, ['.yy'], '$YACCHXXFILESUFFIX')
+def get_yacc_path(env, append_paths=False):
+ """
+ Find the path to the yacc tool, searching several possible names
+
+ Only called in the Windows case, so the default_path
+ can be Windows-specific
+
+ :param env: current construction environment
+ :param append_paths: if set, add the path to the tool to PATH
+ :return: path to yacc tool, if found
+ """
+ for prog in BINS:
+ bin_path = SCons.Tool.find_program_path(
+ env,
+ prog,
+ default_paths=CHOCO_DEFAULT_PATH + MINGW_DEFAULT_PATHS + CYGWIN_DEFAULT_PATHS )
+ if bin_path:
+ if append_paths:
+ env.AppendENVPath('PATH', os.path.dirname(bin_path))
+ return bin_path
+ SCons.Warnings.Warning('yacc tool requested, but yacc or bison binary not found in ENV PATH')
+
+
def generate(env):
"""Add Builders and construction variables for yacc to an Environment."""
c_file, cxx_file = SCons.Tool.createCFileBuilders(env)
@@ -117,24 +146,21 @@ def generate(env):
cxx_file.add_emitter('.yy', yyEmitter)
if sys.platform == 'win32':
- bison = SCons.Tool.find_program_path(env, 'bison', default_paths=MINGW_DEFAULT_PATHS + CYGWIN_DEFAULT_PATHS )
- if bison:
- bison_bin_dir = os.path.dirname(bison)
- env.AppendENVPath('PATH', bison_bin_dir)
- else:
- SCons.Warnings.Warning('yacc tool requested, but bison binary not found in ENV PATH')
-
- env['YACC'] = env.Detect('bison') or 'yacc'
+ # ignore the return, all we need is for the path to be added
+ _ = get_yacc_path(env, append_paths=True)
+
+ env["YACC"] = env.Detect(BINS)
env['YACCFLAGS'] = SCons.Util.CLVar('')
env['YACCCOM'] = '$YACC $YACCFLAGS -o $TARGET $SOURCES'
env['YACCHFILESUFFIX'] = '.h'
-
env['YACCHXXFILESUFFIX'] = '.hpp'
-
env['YACCVCGFILESUFFIX'] = '.vcg'
def exists(env):
- return env.Detect(['bison', 'yacc'])
+ if sys.platform == 'win32':
+ return get_yacc_path(env)
+ else:
+ return env.Detect(BINS)
# Local Variables:
# tab-width:4
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/zip.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/zip.py
index ddc1377321b..1c482ebcbaa 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Tool/zip.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Tool/zip.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/zip.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Tool/zip.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Util.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Util.py
index 0a1ebdc61a9..7bb22cddff7 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Util.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Util.py
@@ -24,7 +24,7 @@ Various utility functions go here.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Util.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Util.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import sys
@@ -33,6 +33,7 @@ import re
import types
import codecs
import pprint
+import hashlib
PY3 = sys.version_info[0] == 3
@@ -656,13 +657,15 @@ except ImportError:
pass
RegError = _NoError
-WinError = None
+
# Make sure we have a definition of WindowsError so we can
# run platform-independent tests of Windows functionality on
# platforms other than Windows. (WindowsError is, in fact, an
# OSError subclass on Windows.)
+
class PlainWindowsError(OSError):
pass
+
try:
WinError = WindowsError
except NameError:
@@ -676,7 +679,7 @@ if can_read_reg:
HKEY_USERS = hkey_mod.HKEY_USERS
def RegGetValue(root, key):
- """This utility function returns a value in the registry
+ r"""This utility function returns a value in the registry
without having to open the key first. Only available on
Windows platforms with a version of Python that can read the
registry. Returns the same thing as
@@ -883,7 +886,7 @@ def PrependPath(oldpath, newpath, sep = os.pathsep,
# now we add them only if they are unique
for path in newpaths:
normpath = os.path.normpath(os.path.normcase(path))
- if path and not normpath in normpaths:
+ if path and normpath not in normpaths:
paths.append(path)
normpaths.append(normpath)
@@ -963,7 +966,7 @@ def AppendPath(oldpath, newpath, sep = os.pathsep,
# now we add them only if they are unique
for path in newpaths:
normpath = os.path.normpath(os.path.normcase(path))
- if path and not normpath in normpaths:
+ if path and normpath not in normpaths:
paths.append(path)
normpaths.append(normpath)
paths.reverse()
@@ -999,7 +1002,9 @@ if sys.platform == 'cygwin':
def get_native_path(path):
"""Transforms an absolute path into a native path for the system. In
Cygwin, this converts from a Cygwin path to a Windows one."""
- return os.popen('cygpath -w ' + path).read().replace('\n', '')
+ with os.popen('cygpath -w ' + path) as p:
+ npath = p.read().replace('\n', '')
+ return npath
else:
def get_native_path(path):
"""Transforms an absolute path into a native path for the system.
@@ -1176,10 +1181,13 @@ def unique(s):
# ASPN: Python Cookbook: Remove duplicates from a sequence
# First comment, dated 2001/10/13.
# (Also in the printed Python Cookbook.)
+# This not currently used, in favor of the next function...
def uniquer(seq, idfun=None):
- if idfun is None:
- def idfun(x): return x
+ def default_idfun(x):
+ return x
+ if not idfun:
+ idfun = default_idfun
seen = {}
result = []
for item in seq:
@@ -1444,56 +1452,53 @@ def RenameFunction(function, name):
function.__defaults__)
-md5 = False
-
+if hasattr(hashlib, 'md5'):
+ md5 = True
-def MD5signature(s):
- return str(s)
+ def MD5signature(s):
+ """
+ Generate md5 signature of a string
+ :param s: either string or bytes. Normally should be bytes
+ :return: String of hex digits representing the signature
+ """
+ m = hashlib.md5()
-def MD5filesignature(fname, chunksize=65536):
- with open(fname, "rb") as f:
- result = f.read()
- return result
+ try:
+ m.update(to_bytes(s))
+ except TypeError as e:
+ m.update(to_bytes(str(s)))
-try:
- import hashlib
-except ImportError:
- pass
-else:
- if hasattr(hashlib, 'md5'):
- md5 = True
+ return m.hexdigest()
- def MD5signature(s):
- """
- Generate a String of Hex digits representing the md5 signature of the string
- :param s: either string or bytes. Normally should be bytes
- :return: String of hex digits
- """
- m = hashlib.md5()
+ def MD5filesignature(fname, chunksize=65536):
+ """
+ Generate the md5 signature of a file
- try:
- m.update(to_bytes(s))
- except TypeError as e:
- m.update(to_bytes(str(s)))
-
- return m.hexdigest()
-
- def MD5filesignature(fname, chunksize=65536):
- """
- :param fname:
- :param chunksize:
- :return: String of Hex digits
- """
- m = hashlib.md5()
- f = open(fname, "rb")
+ :param fname: file to hash
+ :param chunksize: chunk size to read
+ :return: String of Hex digits representing the signature
+ """
+ m = hashlib.md5()
+ with open(fname, "rb") as f:
while True:
blck = f.read(chunksize)
if not blck:
break
m.update(to_bytes(blck))
- f.close()
- return m.hexdigest()
+ return m.hexdigest()
+else:
+ # if md5 algorithm not available, just return data unmodified
+ # could add alternative signature scheme here
+ md5 = False
+
+ def MD5signature(s):
+ return str(s)
+
+ def MD5filesignature(fname, chunksize=65536):
+ with open(fname, "rb") as f:
+ result = f.read()
+ return result
def MD5collect(signatures):
@@ -1509,7 +1514,6 @@ def MD5collect(signatures):
return MD5signature(', '.join(signatures))
-
def silent_intern(x):
"""
Perform sys.intern() on the passed argument and return the result.
@@ -1533,7 +1537,7 @@ def silent_intern(x):
class Null(object):
""" Null objects always and reliably "do nothing." """
def __new__(cls, *args, **kwargs):
- if not '_instance' in vars(cls):
+ if '_instance' not in vars(cls):
cls._instance = super(Null, cls).__new__(cls, *args, **kwargs)
return cls._instance
def __init__(self, *args, **kwargs):
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/BoolVariable.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/BoolVariable.py
index 174d3e58142..287a72ae643 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/BoolVariable.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/BoolVariable.py
@@ -34,7 +34,7 @@ Usage example::
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/BoolVariable.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Variables/BoolVariable.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__all__ = ['BoolVariable',]
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/EnumVariable.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/EnumVariable.py
index f0a8bdb826b..19cd9089065 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/EnumVariable.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/EnumVariable.py
@@ -37,7 +37,7 @@ Usage example::
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/EnumVariable.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Variables/EnumVariable.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__all__ = ['EnumVariable',]
@@ -45,7 +45,7 @@ __all__ = ['EnumVariable',]
import SCons.Errors
def _validator(key, val, env, vals):
- if not val in vals:
+ if val not in vals:
raise SCons.Errors.UserError(
'Invalid value for option %s: %s. Valid values are: %s' % (key, val, vals))
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/ListVariable.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/ListVariable.py
index 797a9b4ae98..89b04d3cf7f 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/ListVariable.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/ListVariable.py
@@ -46,7 +46,7 @@ Usage example::
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Variables/ListVariable.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Variables/ListVariable.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
# Known Bug: This should behave like a Set-Type, but does not really,
# since elements can occur twice.
@@ -96,7 +96,7 @@ def _converter(val, allowedElems, mapdict):
else:
val = [_f for _f in val.split(',') if _f]
val = [mapdict.get(v, v) for v in val]
- notAllowed = [v for v in val if not v in allowedElems]
+ notAllowed = [v for v in val if v not in allowedElems]
if notAllowed:
raise ValueError("Invalid value(s) for option: %s" %
','.join(notAllowed))
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/PackageVariable.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/PackageVariable.py
index 08ae43bbb23..2100314713f 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/PackageVariable.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/PackageVariable.py
@@ -50,7 +50,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/PackageVariable.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Variables/PackageVariable.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__all__ = ['PackageVariable',]
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/PathVariable.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/PathVariable.py
index ed4a078267b..88d277e5920 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/PathVariable.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/PathVariable.py
@@ -67,7 +67,7 @@ Usage example::
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/PathVariable.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Variables/PathVariable.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__all__ = ['PathVariable',]
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/__init__.py
index 028244069ac..9daad3f803b 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Variables/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Variables/__init__.py
@@ -26,7 +26,7 @@ customizable variables to an SCons build.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Variables/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Variables/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os.path
import sys
@@ -99,7 +99,7 @@ class Variables(object):
option.converter = converter
self.options.append(option)
-
+
# options might be added after the 'unknown' dict has been set up,
# so we remove the key and all its aliases from that dict
for alias in list(option.aliases) + [ option.key ]:
@@ -168,7 +168,7 @@ class Variables(object):
# first set the defaults:
for option in self.options:
- if not option.default is None:
+ if option.default is not None:
values[option.key] = option.default
# next set the value specified in the options file
@@ -288,7 +288,7 @@ class Variables(object):
env - an environment that is used to get the current values
of the options.
- cmp - Either a function as follows: The specific sort function should take two arguments and return -1, 0 or 1
+ cmp - Either a function as follows: The specific sort function should take two arguments and return -1, 0 or 1
or a boolean to indicate if it should be sorted.
"""
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Warnings.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Warnings.py
index 88db806d40f..064076ecd83 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Warnings.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Warnings.py
@@ -27,7 +27,7 @@ This file implements the warnings framework for SCons.
"""
-__revision__ = "src/engine/SCons/Warnings.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/Warnings.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import sys
@@ -193,9 +193,10 @@ def warn(clazz, *args):
break
def process_warn_strings(arguments):
- """Process string specifications of enabling/disabling warnings,
- as passed to the --warn option or the SetOption('warn') function.
-
+ """Process requests to enable/disable warnings.
+
+ The requests are strings passed to the --warn option or the
+ SetOption('warn') function.
An argument to this option should be of the form <warning-class>
or no-<warning-class>. The warning class is munged in order
@@ -210,7 +211,6 @@ def process_warn_strings(arguments):
As a special case, --warn=all and --warn=no-all will enable or
disable (respectively) the base Warning class of all warnings.
-
"""
def _capitalize(s):
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/__init__.py
index ea8f271c3b7..7ffc3bbd0c1 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/__init__.py
@@ -27,15 +27,15 @@ The main package for the SCons software construction utility.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
-__version__ = "3.0.4"
+__version__ = "3.1.1"
-__build__ = "3a41ed6b288cee8d085373ad7fa02894e1903864"
+__build__ = "72ae09dc35ac2626f8ff711d8c4b30b6138e08e3"
-__buildsys__ = "kufra"
+__buildsys__ = "octodog"
-__date__ = "2019-01-20 22:51:36"
+__date__ = "2019-08-08 14:50:06"
__developer__ = "bdeegan"
diff --git a/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/__main__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/__main__.py
new file mode 100644
index 00000000000..0dfbb9dc57d
--- /dev/null
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/__main__.py
@@ -0,0 +1,4 @@
+import SCons.Script
+# this does all the work, and calls sys.exit
+# with the proper exit status when done.
+SCons.Script.main()
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/compat/__init__.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/compat/__init__.py
index 990ebd1ad09..439d3f61954 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/compat/__init__.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/compat/__init__.py
@@ -57,31 +57,22 @@ function defined below loads the module as the "real" name (without the
rest of our code will find our pre-loaded compatibility module.
"""
-__revision__ = "src/engine/SCons/compat/__init__.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/compat/__init__.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import os
import sys
-import imp # Use the "imp" module to protect imports from fixers.
+import importlib
PYPY = hasattr(sys, 'pypy_translation_info')
-def import_as(module, name):
- """
- Imports the specified module (from our local directory) as the
- specified name, returning the loaded module object.
- """
- dir = os.path.split(__file__)[0]
- return imp.load_module(name, *imp.find_module(module, [dir]))
-
-
def rename_module(new, old):
"""
- Attempts to import the old module and load it under the new name.
+ Attempt to import the old module and load it under the new name.
Used for purely cosmetic name changes in Python 3.x.
"""
try:
- sys.modules[new] = imp.load_module(old, *imp.find_module(old))
+ sys.modules[new] = importlib.import_module(old)
return True
except ImportError:
return False
@@ -122,28 +113,28 @@ except AttributeError:
# intern into the sys package
sys.intern = intern
-# Preparing for 3.x. UserDict, UserList, UserString are in
-# collections for 3.x, but standalone in 2.7.x
+# UserDict, UserList, UserString are in # collections for 3.x,
+# but standalone in 2.7.x. Monkey-patch into collections for 2.7.
import collections
try:
collections.UserDict
except AttributeError:
- exec ('from UserDict import UserDict as _UserDict')
+ from UserDict import UserDict as _UserDict
collections.UserDict = _UserDict
del _UserDict
try:
collections.UserList
except AttributeError:
- exec ('from UserList import UserList as _UserList')
+ from UserList import UserList as _UserList
collections.UserList = _UserList
del _UserList
try:
collections.UserString
except AttributeError:
- exec ('from UserString import UserString as _UserString')
+ from UserString import UserString as _UserString
collections.UserString = _UserString
del _UserString
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/compat/_scons_dbm.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/compat/_scons_dbm.py
index 71b62ff24bf..c9682f872e8 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/compat/_scons_dbm.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/compat/_scons_dbm.py
@@ -30,7 +30,7 @@ that the whichdb.whichdb() implementstation in the various 2.X versions of
Python won't blow up even if dbm wasn't compiled in.
"""
-__revision__ = "src/engine/SCons/compat/_scons_dbm.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/compat/_scons_dbm.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
class error(Exception):
pass
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/cpp.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/cpp.py
index c7ae65e4334..d9b3a2cc127 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/cpp.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/cpp.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/cpp.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/cpp.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
__doc__ = """
SCons C Pre-Processor module
@@ -45,16 +45,16 @@ import re
cpp_lines_dict = {
# Fetch the rest of a #if/#elif as one argument,
# with white space optional.
- ('if', 'elif') : '\s*(.+)',
+ ('if', 'elif') : r'\s*(.+)',
# Fetch the rest of a #ifdef/#ifndef as one argument,
# separated from the keyword by white space.
- ('ifdef', 'ifndef',): '\s+(.+)',
+ ('ifdef', 'ifndef',): r'\s+(.+)',
# Fetch the rest of a #import/#include/#include_next line as one
# argument, with white space optional.
('import', 'include', 'include_next',)
- : '\s*(.+)',
+ : r'\s*(.+)',
# We don't care what comes after a #else or #endif line.
('else', 'endif',) : '',
@@ -64,10 +64,10 @@ cpp_lines_dict = {
# 2) The optional parentheses and arguments (if it's a function-like
# macro, '' if it's not).
# 3) The expansion value.
- ('define',) : '\s+([_A-Za-z][_A-Za-z0-9_]*)(\([^)]*\))?\s*(.*)',
+ ('define',) : r'\s+([_A-Za-z][_A-Za-z0-9_]*)(\([^)]*\))?\s*(.*)',
# Fetch the #undefed keyword from a #undef line.
- ('undef',) : '\s+([_A-Za-z][A-Za-z0-9_]*)',
+ ('undef',) : r'\s+([_A-Za-z][A-Za-z0-9_]*)',
}
# Create a table that maps each individual C preprocessor directive to
@@ -97,7 +97,7 @@ l = [override.get(x, x) for x in list(Table.keys())]
# a list of tuples, one for each preprocessor line. The preprocessor
# directive will be the first element in each tuple, and the rest of
# the line will be the second element.
-e = '^\s*#\s*(' + '|'.join(l) + ')(.*)$'
+e = r'^\s*#\s*(' + '|'.join(l) + ')(.*)$'
# And last but not least, compile the expression.
CPP_Expression = re.compile(e, re.M)
@@ -144,12 +144,12 @@ CPP_to_Python_Ops_Expression = re.compile(expr)
# A separate list of expressions to be evaluated and substituted
# sequentially, not all at once.
CPP_to_Python_Eval_List = [
- ['defined\s+(\w+)', '"\\1" in __dict__'],
- ['defined\s*\((\w+)\)', '"\\1" in __dict__'],
- ['/\*.*\*/', ''],
- ['/\*.*', ''],
- ['//.*', ''],
- ['(0x[0-9A-Fa-f]*)[UL]+', '\\1'],
+ [r'defined\s+(\w+)', '"\\1" in __dict__'],
+ [r'defined\s*\((\w+)\)', '"\\1" in __dict__'],
+ [r'/\*.*\*/', ''],
+ [r'/\*.*', ''],
+ [r'//.*', ''],
+ [r'(0x[0-9A-Fa-f]*)[UL]+', '\\1'],
]
# Replace the string representations of the regular expressions in the
@@ -165,7 +165,7 @@ def CPP_to_Python(s):
"""
s = CPP_to_Python_Ops_Expression.sub(CPP_to_Python_Ops_Sub, s)
for expr, repl in CPP_to_Python_Eval_List:
- s = expr.sub(repl, s)
+ s = re.sub(expr, repl, s)
return s
@@ -210,7 +210,7 @@ class FunctionEvaluator(object):
parts = []
for s in self.expansion:
- if not s in self.args:
+ if s not in self.args:
s = repr(s)
parts.append(s)
statement = ' + '.join(parts)
@@ -225,11 +225,11 @@ line_continuations = re.compile('\\\\\r?\n')
# Search for a "function call" macro on an expansion. Returns the
# two-tuple of the "function" name itself, and a string containing the
# arguments within the call parentheses.
-function_name = re.compile('(\S+)\(([^)]*)\)')
+function_name = re.compile(r'(\S+)\(([^)]*)\)')
# Split a string containing comma-separated function call arguments into
# the separate arguments.
-function_arg_separator = re.compile(',\s*')
+function_arg_separator = re.compile(r',\s*')
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/dblite.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/dblite.py
index 628182b6cfa..14bd93dc326 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/dblite.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/dblite.py
@@ -108,16 +108,19 @@ class dblite(object):
self._chgrp_to = -1 # don't chgrp
if self._flag == "n":
- self._open(self._file_name, "wb", self._mode)
+ with self._open(self._file_name, "wb", self._mode):
+ pass # just make sure it exists
else:
try:
f = self._open(self._file_name, "rb")
except IOError as e:
if self._flag != "c":
raise e
- self._open(self._file_name, "wb", self._mode)
+ with self._open(self._file_name, "wb", self._mode):
+ pass # just make sure it exists
else:
p = f.read()
+ f.close()
if len(p) > 0:
try:
if bytes is not str:
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/exitfuncs.py b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/exitfuncs.py
index cf484c57eaa..8f5207d6234 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/exitfuncs.py
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/exitfuncs.py
@@ -27,7 +27,7 @@ Register functions which are executed when SCons exits for any reason.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/exitfuncs.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/engine/SCons/exitfuncs.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import atexit
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/scons-3.0.4.egg-info b/src/third_party/scons-3.1.1/scons-local-3.1.1/scons-3.1.1.egg-info
index b3fcd7b8781..fc3f83e59b9 100644
--- a/src/third_party/scons-3.0.4/scons-local-3.0.4/scons-3.0.4.egg-info
+++ b/src/third_party/scons-3.1.1/scons-local-3.1.1/scons-3.1.1.egg-info
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: scons
-Version: 3.0.4
+Version: 3.1.1
Summary: Open Source next-generation build tool.
Home-page: http://www.scons.org/
Author: William Deegan
diff --git a/src/third_party/scons-3.0.4/scons-time.py b/src/third_party/scons-3.1.1/scons-time.py
index bef45579453..15e37008e08 100644..100755
--- a/src/third_party/scons-3.0.4/scons-time.py
+++ b/src/third_party/scons-3.1.1/scons-time.py
@@ -31,7 +31,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import division, print_function
-__revision__ = "src/script/scons-time.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/script/scons-time.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import getopt
import glob
@@ -41,21 +41,7 @@ import shutil
import sys
import tempfile
import time
-
-def make_temp_file(**kw):
- try:
- result = tempfile.mktemp(**kw)
- result = os.path.realpath(result)
- except TypeError:
- try:
- save_template = tempfile.template
- prefix = kw['prefix']
- del kw['prefix']
- tempfile.template = prefix
- result = tempfile.mktemp(**kw)
- finally:
- tempfile.template = save_template
- return result
+import subprocess
def HACK_for_exec(cmd, *args):
"""
@@ -121,7 +107,7 @@ class Line(object):
# in the line's index number. We might want to represent
# this some way rather than just drawing the line straight
# between the two points on either side.
- if not y is None:
+ if y is not None:
print(fmt % (x, y))
print('e')
@@ -155,13 +141,13 @@ class Gnuplotter(Plotter):
result = []
for line in self.lines:
result.extend(line.get_x_values())
- return [r for r in result if not r is None]
+ return [r for r in result if r is not None]
def get_all_y_values(self):
result = []
for line in self.lines:
result.extend(line.get_y_values())
- return [r for r in result if not r is None]
+ return [r for r in result if r is not None]
def get_min_x(self):
try:
@@ -248,14 +234,16 @@ def unzip(fname):
os.makedirs(dir)
except:
pass
- open(name, 'wb').write(zf.read(name))
+ with open(name, 'wb') as f:
+ f.write(zf.read(name))
def read_tree(dir):
for dirpath, dirnames, filenames in os.walk(dir):
for fn in filenames:
fn = os.path.join(dirpath, fn)
if os.path.isfile(fn):
- open(fn, 'rb').read()
+ with open(fn, 'rb') as f:
+ f.read()
def redirect_to_file(command, log):
return '%s > %s 2>&1' % (command, log)
@@ -264,7 +252,7 @@ def tee_to_file(command, log):
return '%s 2>&1 | tee %s' % (command, log)
-
+
class SConsTimer(object):
"""
Usage: scons-time SUBCOMMAND [ARGUMENTS]
@@ -360,7 +348,7 @@ class SConsTimer(object):
'SCons' : 'Total SCons execution time',
'commands' : 'Total command execution time',
}
-
+
time_string_all = 'Total .* time'
#
@@ -456,14 +444,20 @@ class SConsTimer(object):
def log_execute(self, command, log):
command = self.subst(command, self.__dict__)
- output = os.popen(command).read()
+ p = os.popen(command)
+ output = p.read()
+ p.close()
+ #TODO: convert to subrocess, os.popen is obsolete. This didn't work:
+ #process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
+ #output = process.stdout.read()
+ #process.stdout.close()
+ #process.wait()
if self.verbose:
sys.stdout.write(output)
# TODO: Figure out
# Not sure we need to write binary here
- open(log, 'w').write(output)
-
- #
+ with open(log, 'w') as f:
+ f.write(str(output))
def archive_splitext(self, path):
"""
@@ -628,13 +622,14 @@ class SConsTimer(object):
search_string = self.time_string_all
else:
search_string = time_string
- contents = open(file).read()
+ with open(file) as f:
+ contents = f.read()
if not contents:
sys.stderr.write('file %s has no contents!\n' % repr(file))
return None
result = re.findall(r'%s: ([\d\.]*)' % search_string, contents)[-4:]
result = [ float(r) for r in result ]
- if not time_string is None:
+ if time_string is not None:
try:
result = result[0]
except IndexError:
@@ -673,7 +668,8 @@ class SConsTimer(object):
search_string = self.memory_string_all
else:
search_string = memory_string
- lines = open(file).readlines()
+ with open(file) as f:
+ lines = f.readlines()
lines = [ l for l in lines if l.startswith(search_string) ][-4:]
result = [ int(l.split()[-1]) for l in lines[-4:] ]
if len(result) == 1:
@@ -685,14 +681,14 @@ class SConsTimer(object):
Returns the counts of the specified object_name.
"""
object_string = ' ' + object_name + '\n'
- lines = open(file).readlines()
+ with open(file) as f:
+ lines = f.readlines()
line = [ l for l in lines if l.endswith(object_string) ][0]
result = [ int(field) for field in line.split()[:4] ]
if index is not None:
result = result[index]
return result
- #
command_alias = {}
@@ -814,7 +810,9 @@ class SConsTimer(object):
self.title = a
if self.config_file:
- exec(open(self.config_file, 'r').read(), self.__dict__)
+ with open(self.config_file, 'r') as f:
+ config = f.read()
+ exec(config, self.__dict__)
if self.chdir:
os.chdir(self.chdir)
@@ -923,7 +921,7 @@ class SConsTimer(object):
elif o in ('-p', '--prefix'):
self.prefix = a
elif o in ('--stage',):
- if not a in self.stages:
+ if a not in self.stages:
sys.stderr.write('%s: mem: Unrecognized stage "%s".\n' % (self.name, a))
sys.exit(1)
stage = a
@@ -933,7 +931,9 @@ class SConsTimer(object):
self.title = a
if self.config_file:
- HACK_for_exec(open(self.config_file, 'r').read(), self.__dict__)
+ with open(self.config_file, 'r') as f:
+ config = f.read()
+ HACK_for_exec(config, self.__dict__)
if self.chdir:
os.chdir(self.chdir)
@@ -1035,7 +1035,7 @@ class SConsTimer(object):
elif o in ('-p', '--prefix'):
self.prefix = a
elif o in ('--stage',):
- if not a in self.stages:
+ if a not in self.stages:
sys.stderr.write('%s: obj: Unrecognized stage "%s".\n' % (self.name, a))
sys.stderr.write('%s Type "%s help obj" for help.\n' % (self.name_spaces, self.name))
sys.exit(1)
@@ -1053,7 +1053,9 @@ class SConsTimer(object):
object_name = args.pop(0)
if self.config_file:
- HACK_for_exec(open(self.config_file, 'r').read(), self.__dict__)
+ with open(self.config_file, 'r') as f:
+ config = f.read()
+ HACK_for_exec(config, self.__dict__)
if self.chdir:
os.chdir(self.chdir)
@@ -1191,7 +1193,9 @@ class SConsTimer(object):
sys.exit(1)
if self.config_file:
- exec(open(self.config_file, 'r').read(), self.__dict__)
+ with open(self.config_file, 'r') as f:
+ config = f.read()
+ exec(config, self.__dict__)
if args:
self.archive_list = args
@@ -1231,7 +1235,7 @@ class SConsTimer(object):
return os.path.join(dir, 'src', 'engine')
def prep_aegis_run(self, commands, removals):
- self.aegis_tmpdir = make_temp_file(prefix = self.name + '-aegis-')
+ self.aegis_tmpdir = tempfile.mkdtemp(prefix=self.name + '-aegis-')
removals.append((shutil.rmtree, 'rm -rf %%s', self.aegis_tmpdir))
self.aegis_parent_project = os.path.splitext(self.aegis_project)[0]
@@ -1239,21 +1243,19 @@ class SConsTimer(object):
self.scons_lib_dir = self.scons_lib_dir_path(self.aegis_tmpdir)
commands.extend([
- 'mkdir %(aegis_tmpdir)s',
(lambda: os.chdir(self.aegis_tmpdir), 'cd %(aegis_tmpdir)s'),
'%(aegis)s -cp -ind -p %(aegis_parent_project)s .',
'%(aegis)s -cp -ind -p %(aegis_project)s -delta %(run_number)s .',
])
def prep_subversion_run(self, commands, removals):
- self.svn_tmpdir = make_temp_file(prefix = self.name + '-svn-')
+ self.svn_tmpdir = tempfile.mkdtemp(prefix=self.name + '-svn-')
removals.append((shutil.rmtree, 'rm -rf %%s', self.svn_tmpdir))
self.scons = self.scons_path(self.svn_tmpdir)
self.scons_lib_dir = self.scons_lib_dir_path(self.svn_tmpdir)
commands.extend([
- 'mkdir %(svn_tmpdir)s',
'%(svn)s co %(svn_co_flag)s -r %(run_number)s %(subversion_url)s %(svn_tmpdir)s',
])
@@ -1300,11 +1302,9 @@ class SConsTimer(object):
if self.targets2 is None:
self.targets2 = self.targets
- self.tmpdir = make_temp_file(prefix = self.name + '-')
+ self.tmpdir = tempfile.mkdtemp(prefix=self.name + '-')
commands.extend([
- 'mkdir %(tmpdir)s',
-
(os.chdir, 'cd %%s', self.tmpdir),
])
@@ -1357,7 +1357,6 @@ class SConsTimer(object):
if not os.environ.get('PRESERVE'):
commands.extend(removals)
-
commands.append((shutil.rmtree, 'rm -rf %%s', self.tmpdir))
self.run_command_list(commands, self.__dict__)
@@ -1424,14 +1423,16 @@ class SConsTimer(object):
elif o in ('--title',):
self.title = a
elif o in ('--which',):
- if not a in list(self.time_strings.keys()):
+ if a not in list(self.time_strings.keys()):
sys.stderr.write('%s: time: Unrecognized timer "%s".\n' % (self.name, a))
sys.stderr.write('%s Type "%s help time" for help.\n' % (self.name_spaces, self.name))
sys.exit(1)
which = a
if self.config_file:
- HACK_for_exec(open(self.config_file, 'r').read(), self.__dict__)
+ with open(self.config_file, 'r') as f:
+ config = f.read()
+ HACK_for_exec(config, self.__dict__)
if self.chdir:
os.chdir(self.chdir)
diff --git a/src/third_party/scons-3.0.4/scons.bat b/src/third_party/scons-3.1.1/scons.bat
index 21ed3a876a2..a5b1b6e64ff 100644..100755
--- a/src/third_party/scons-3.0.4/scons.bat
+++ b/src/third_party/scons-3.1.1/scons.bat
@@ -1,38 +1,38 @@
-@REM Copyright (c) 2001 - 2019 The SCons Foundation
-@REM src/script/scons.bat 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan
-@echo off
-set SCONS_ERRORLEVEL=
-if "%OS%" == "Windows_NT" goto WinNT
-
-@REM for 9x/Me you better not have more than 9 args
-python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-3.0.4'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-3.0.4'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
-@REM no way to set exit status of this script for 9x/Me
-goto endscons
-
-@REM Credit where credit is due: we return the exit code despite our
-@REM use of setlocal+endlocal using a technique from Bear's Journal:
-@REM http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/
-
-:WinNT
-setlocal
-@REM ensure the script will be executed with the Python it was installed for
-pushd %~dp0..
-set path=%~dp0;%CD%;%path%
-popd
-@REM try the script named as the .bat file in current dir, then in Scripts subdir
-set scriptname=%~dp0%~n0.py
-if not exist "%scriptname%" set scriptname=%~dp0Scripts\%~n0.py
-@REM Handle when running from wheel where the script has no .py extension
-if not exist "%scriptname%" set scriptname=%~dp0%~n0
-python "%scriptname%" %*
-endlocal & set SCONS_ERRORLEVEL=%ERRORLEVEL%
-
-if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
-if errorlevel 9009 echo you do not have python in your PATH
-goto endscons
-
-:returncode
-exit /B %SCONS_ERRORLEVEL%
-
-:endscons
-call :returncode %SCONS_ERRORLEVEL%
+@REM Copyright (c) 2001 - 2019 The SCons Foundation
+@REM src/script/scons.bat 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan
+@echo off
+set SCONS_ERRORLEVEL=
+if "%OS%" == "Windows_NT" goto WinNT
+
+@REM for 9x/Me you better not have more than 9 args
+python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-3.1.1'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-3.1.1'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
+@REM no way to set exit status of this script for 9x/Me
+goto endscons
+
+@REM Credit where credit is due: we return the exit code despite our
+@REM use of setlocal+endlocal using a technique from Bear's Journal:
+@REM http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/
+
+:WinNT
+setlocal
+@REM ensure the script will be executed with the Python it was installed for
+pushd %~dp0..
+set path=%~dp0;%CD%;%path%
+popd
+@REM try the script named as the .bat file in current dir, then in Scripts subdir
+set scriptname=%~dp0%~n0.py
+if not exist "%scriptname%" set scriptname=%~dp0Scripts\%~n0.py
+@REM Handle when running from wheel where the script has no .py extension
+if not exist "%scriptname%" set scriptname=%~dp0%~n0
+python "%scriptname%" %*
+endlocal & set SCONS_ERRORLEVEL=%ERRORLEVEL%
+
+if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
+if errorlevel 9009 echo you do not have python in your PATH
+goto endscons
+
+:returncode
+exit /B %SCONS_ERRORLEVEL%
+
+:endscons
+call :returncode %SCONS_ERRORLEVEL%
diff --git a/src/third_party/scons-3.0.4/scons.py b/src/third_party/scons-3.1.1/scons.py
index 66031d52b95..1d9595e85e6 100644..100755
--- a/src/third_party/scons-3.0.4/scons.py
+++ b/src/third_party/scons-3.1.1/scons.py
@@ -25,15 +25,15 @@
from __future__ import print_function
-__revision__ = "src/script/scons.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/script/scons.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
-__version__ = "3.0.4"
+__version__ = "3.1.1"
-__build__ = "3a41ed6b288cee8d085373ad7fa02894e1903864"
+__build__ = "72ae09dc35ac2626f8ff711d8c4b30b6138e08e3"
-__buildsys__ = "kufra"
+__buildsys__ = "octodog"
-__date__ = "2019-01-20 22:51:36"
+__date__ = "2019-08-08 14:50:06"
__developer__ = "bdeegan"
@@ -68,7 +68,7 @@ Python 2.7 or >= 3.5 is required.\n"
# Strip the script directory from sys.path so on case-insensitive
# (WIN32) systems Python doesn't think that the "scons" script is the
# "SCons" package.
-script_dir = os.path.dirname(__file__)
+script_dir = os.path.dirname(os.path.realpath(__file__))
script_path = os.path.realpath(os.path.dirname(__file__))
if script_path in sys.path:
sys.path.remove(script_path)
diff --git a/src/third_party/scons-3.0.4/sconsign.py b/src/third_party/scons-3.1.1/sconsign.py
index 5a714384689..7c5dda5c03d 100644..100755
--- a/src/third_party/scons-3.0.4/sconsign.py
+++ b/src/third_party/scons-3.1.1/sconsign.py
@@ -25,15 +25,15 @@
from __future__ import print_function
-__revision__ = "src/script/sconsign.py 3a41ed6b288cee8d085373ad7fa02894e1903864 2019-01-20 22:51:36 bdeegan"
+__revision__ = "src/script/sconsign.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
-__version__ = "3.0.4"
+__version__ = "3.1.1"
-__build__ = "3a41ed6b288cee8d085373ad7fa02894e1903864"
+__build__ = "72ae09dc35ac2626f8ff711d8c4b30b6138e08e3"
-__buildsys__ = "kufra"
+__buildsys__ = "octodog"
-__date__ = "2019-01-20 22:51:36"
+__date__ = "2019-08-08 14:50:06"
__developer__ = "bdeegan"
@@ -59,7 +59,7 @@ Python 2.7 or >= 3.5 is required.\n"
# Strip the script directory from sys.path so on case-insensitive
# (WIN32) systems Python doesn't think that the "scons" script is the
# "SCons" package.
-script_dir = os.path.dirname(__file__)
+script_dir = os.path.dirname(os.path.realpath(__file__))
script_path = os.path.realpath(os.path.dirname(__file__))
if script_path in sys.path:
sys.path.remove(script_path)
@@ -117,7 +117,7 @@ else:
# check `pwd`/lib/scons*.
temp.append(os.getcwd())
else:
- if script_dir == '.' or script_dir == '':
+ if script_dir in ('.', ''):
script_dir = os.getcwd()
head, tail = os.path.split(script_dir)
if tail == "bin":
@@ -185,13 +185,13 @@ import SCons.compat
try:
import whichdb
+
whichdb = whichdb.whichdb
except ImportError as e:
from dbm import whichdb
import time
import pickle
-import imp
import SCons.SConsign
@@ -200,9 +200,8 @@ def my_whichdb(filename):
if filename[-7:] == ".dblite":
return "SCons.dblite"
try:
- f = open(filename + ".dblite", "rb")
- f.close()
- return "SCons.dblite"
+ with open(filename + ".dblite", "rb"):
+ return "SCons.dblite"
except IOError:
pass
return _orig_whichdb(filename)
@@ -217,6 +216,8 @@ whichdb = my_whichdb
#dbm.whichdb = my_whichdb
def my_import(mname):
+ import imp
+
if '.' in mname:
i = mname.rfind('.')
parent = my_import(mname[:i])
@@ -247,9 +248,8 @@ Readable = 0
Warns = 0
-
def default_mapper(entry, name):
- '''
+ """
Stringify an entry that doesn't have an explicit mapping.
Args:
@@ -258,10 +258,10 @@ def default_mapper(entry, name):
Returns: str
- '''
+ """
try:
val = eval("entry." + name)
- except:
+ except AttributeError:
val = None
if sys.version_info.major >= 3 and isinstance(val, bytes):
# This is a dirty hack for py 2/3 compatibility. csig is a bytes object
@@ -272,7 +272,7 @@ def default_mapper(entry, name):
def map_action(entry, _):
- '''
+ """
Stringify an action entry and signature.
Args:
@@ -281,7 +281,7 @@ def map_action(entry, _):
Returns: str
- '''
+ """
try:
bact = entry.bact
bactsig = entry.bactsig
@@ -289,8 +289,9 @@ def map_action(entry, _):
return None
return '%s [%s]' % (bactsig, bact)
+
def map_timestamp(entry, _):
- '''
+ """
Stringify a timestamp entry.
Args:
@@ -299,7 +300,7 @@ def map_timestamp(entry, _):
Returns: str
- '''
+ """
try:
timestamp = entry.timestamp
except AttributeError:
@@ -309,8 +310,9 @@ def map_timestamp(entry, _):
else:
return str(timestamp)
+
def map_bkids(entry, _):
- '''
+ """
Stringify an implicit entry.
Args:
@@ -319,7 +321,7 @@ def map_bkids(entry, _):
Returns: str
- '''
+ """
try:
bkids = entry.bsources + entry.bdepends + entry.bimplicit
bkidsigs = entry.bsourcesigs + entry.bdependsigs + entry.bimplicitsigs
@@ -448,8 +450,8 @@ class Do_SConsignDB(object):
def __call__(self, fname):
# The *dbm modules stick their own file suffixes on the names
- # that are passed in. This is causes us to jump through some
- # hoops here to be able to allow the user
+ # that are passed in. This causes us to jump through some
+ # hoops here.
try:
# Try opening the specified file name. Example:
# SPECIFIED OPENED BY self.dbm.open()
@@ -461,16 +463,17 @@ class Do_SConsignDB(object):
print_e = e
try:
# That didn't work, so try opening the base name,
- # so that if the actually passed in 'sconsign.dblite'
+ # so that if they actually passed in 'sconsign.dblite'
# (for example), the dbm module will put the suffix back
# on for us and open it anyway.
db = self.dbm.open(os.path.splitext(fname)[0], "r")
except (IOError, OSError):
# That didn't work either. See if the file name
- # they specified just exists (independent of the dbm
+ # they specified even exists (independent of the dbm
# suffix-mangling).
try:
- open(fname, "r")
+ with open(fname, "rb"):
+ pass # this is a touch only, we don't use it here.
except (IOError, OSError) as e:
# Nope, that file doesn't even exist, so report that
# fact back.
@@ -486,6 +489,9 @@ class Do_SConsignDB(object):
except Exception as e:
sys.stderr.write("sconsign: ignoring invalid `%s' file `%s': %s\n"
% (self.dbm_name, fname, e))
+ exc_type, _, _ = sys.exc_info()
+ if exc_type.__name__ == "ValueError" and sys.version_info < (3,0,0):
+ sys.stderr.write("Python 2 only supports pickle protocols 0-2.\n")
return
if Print_Directories:
@@ -512,23 +518,23 @@ class Do_SConsignDB(object):
def Do_SConsignDir(name):
try:
- fp = open(name, 'rb')
+ with open(name, 'rb') as fp:
+ try:
+ sconsign = SCons.SConsign.Dir(fp)
+ except KeyboardInterrupt:
+ raise
+ except pickle.UnpicklingError:
+ err = "sconsign: ignoring invalid .sconsign file `%s'\n" % (name)
+ sys.stderr.write(err)
+ return
+ except Exception as e:
+ err = "sconsign: ignoring invalid .sconsign file `%s': %s\n" % (name, e)
+ sys.stderr.write(err)
+ return
+ printentries(sconsign.entries, args[0])
except (IOError, OSError) as e:
sys.stderr.write("sconsign: %s\n" % e)
return
- try:
- sconsign = SCons.SConsign.Dir(fp)
- except KeyboardInterrupt:
- raise
- except pickle.UnpicklingError:
- err = "sconsign: ignoring invalid .sconsign file `%s'\n" % (name)
- sys.stderr.write(err)
- return
- except Exception as e:
- err = "sconsign: ignoring invalid .sconsign file `%s': %s\n" % (name, e)
- sys.stderr.write(err)
- return
- printentries(sconsign.entries, args[0])
##############################################################################
@@ -536,7 +542,7 @@ def Do_SConsignDir(name):
import getopt
helpstr = """\
-Usage: sconsign [OPTIONS] FILE [...]
+Usage: sconsign [OPTIONS] [FILE ...]
Options:
-a, --act, --action Print build action information.
-c, --csig Print content signature information.
@@ -552,13 +558,17 @@ Options:
-v, --verbose Verbose, describe each field.
"""
-opts, args = getopt.getopt(sys.argv[1:], "acd:e:f:hirstv",
- ['act', 'action',
- 'csig', 'dir=', 'entry=',
- 'format=', 'help', 'implicit',
- 'raw', 'readable',
- 'size', 'timestamp', 'verbose'])
-
+try:
+ opts, args = getopt.getopt(sys.argv[1:], "acd:e:f:hirstv",
+ ['act', 'action',
+ 'csig', 'dir=', 'entry=',
+ 'format=', 'help', 'implicit',
+ 'raw', 'readable',
+ 'size', 'timestamp', 'verbose'])
+except getopt.GetoptError as err:
+ sys.stderr.write(str(err) + '\n')
+ print(helpstr)
+ sys.exit(2)
for o, a in opts:
if o in ('-a', '--act', '--action'):
@@ -586,7 +596,7 @@ for o, a in opts:
# this was handled by calling my_import('SCons.dblite')
# again in earlier versions...
SCons.dblite.ignore_corrupt_dbfiles = 0
- except:
+ except ImportError:
sys.stderr.write("sconsign: illegal file format `%s'\n" % a)
print(helpstr)
sys.exit(2)
@@ -613,6 +623,8 @@ if Do_Call:
for a in args:
Do_Call(a)
else:
+ if not args:
+ args = [".sconsign.dblite"]
for a in args:
dbm_name = whichdb(a)
if dbm_name: