Scons

Latest version: v4.9.0

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 14

4.0.1

From Rob Boehne:
- Fix fortran tools to set SHFORTRAN variables to $FORTRAN, similarly SHF77, SHF90, SHF95,
SHF03 and SHF08 will default to the variables $F77, $F90, $F95, $F03 and $F08 respectively.
If you were depending on changing the value of FORTRAN (or $F[0-9][0-9]) having no effect
on the value of SHFORTRAN, this change will break that. The values of FORTRAN, F77, F90,
F95, F03, F08 and SHFORTRAN, SHF77 (etc.) now are not overridden in generate if alredy set
by the user.
- Fix subprocess execution of 'lslpp' on AIX to produce text standard i/o.
- Re-do the fix for suncxx tool (Oracle Studio compiler) now that only Python 3 is supported,
to avoid decoding errors.

From William Deegan:
- Added Environment() variable TEMPFILEDIR which allows setting the directory which temp
files createdby TEMPFILEMUNGE are created in.

From Daniel Moody:
- Added method on Node to test if its node used in SConf. (Github Issue 3626)

4.0.0

From Dirk Baechle:
- Updated documentation toolchain to work properly under Python3, also
removed libxslt support from the Docbook Tool. (issue 3580)
- Added Docker images for building and testing SCons. (issue 3585)


From James Benton:
- Improve Visual Studio solution/project generation code to add support
for a per-variant cppflags. Intellisense can be affected by cppflags,
this is especially important when it comes to /std:c++* which specifies
what C++ standard version to target. SCons will append /Zc:__cplusplus
to the project's cppflags when a /std:c++* flag is found as this is
required for intellisense to use the C++ standard version from cppflags.

From Rob Boehne
- Specify UTF-8 encoding when opening Java source file as text. By default, encoding is the output
of locale.getpreferredencoding(False), and varies by platform.

From Joseph Brill:
- MSVC updates: When there are multiple product installations (e.g, Community and
Build Tools) of MSVC 2017 or MSVC 2019, an Enterprise, Professional,
or Community installation will be selected before a Build Tools installation when
"14.1" or "14.2" is requested, respectively. (GH Issue 3699).
- MSVC updates: When there are multiple product installations of MSVC 2017 (e.g.,
Community and Express), 2017 Express is no longer returned when "14.1" is
requested. Only 2017 Express will be returned when "14.1Exp" is requested.
(GH Issue 3699).
- MSVC updates: An MSVC 6.0 installation now appears in the installed versions list
when msvc debug output is enabled (GH Issue 3699).
- MSVS test updates: Tests for building a program using generated MSVS project and
solution files using MSVS 2015 and later now work as expected on x86 hosts.
- Test update: Reduce the number of "false negative" test failures for the interactive
configuration test (test/interactive/configure.py).
- MSVS update: Fix the development environment path for MSVS 7.0.

From William Deegan:
- Fix broken clang + MSVC 2019 combination by using MSVC configuration logic to
propagate'VCINSTALLDIR' and 'VCToolsInstallDir' which clang tools use to locate
header files and libraries from MSVC install. (Fixes GH Issue 3480)
- Added C:\msys64\mingw64\bin to default mingw and clang windows PATH's. This
is a reasonable default and also aligns with changes in Appveyor's VS2019 image.
- Drop support for Python 2.7. SCons will be Python 3.5+ going forward.
- Change SCons.Node.ValueWithMemo to consider any name passed when memoizing Value() nodes
- Fix Github Issue 3550 - When using Substfile() with a value like Z:\mongo\build\install\bin
the implementation using re.sub() would end up interpreting the string and finding regex escape
characters where it should have been simply replacing existing text. Switched to use string.replace().
- Fix Github Issue 2904 - Provide useful error message when more than one Configure Contexts are opened.
Only one open is allowed. You must call conf.Finish() to complete the currently open one before creating another
- Add msys2 installed mingw default path to PATH for mingw tool.
- C:\msys64\mingw64\bin
- Purge obsolete internal build and tooling scripts
- Allow user specified location for vswhere.exe specified by VSWHERE.
NOTE: This must be set at the time the 'msvc' 'msvs' and/or 'mslink' tool(s) are initialized to have any effect.
- Resolve Issue 3451 and Issue 3450 - Rewrite SCons setup.py and packaging. Move script logic to entry points so
package can create scripts which use the correct version of Python.
- Resolve Issue 3248 - Removing '-Wl,-Bsymbolic' from SHLIBVERSIONFLAGS
NOTE: If your build depends on the above you must now add to your SHLIBVERSIONFLAGS
- Speedup bin/docs-update-generated by caching parsed docbook schema. (60x speedup)
- Reorganized source tree. Moved src/engine/SCons to SCons to be more in line with current Python source
tree organization practices.
- Renamed as.py to asm.py and left redirecting tool. 'as' is a reserved word and so
changing the name was required as we wanted to import symbols for use in compilation_db
tool.
- Add CompilationDatabase() builder in compilation_db tool. Contributed by MongoDB.
Setting COMPILATIONDB_USE_ABSPATH to True|False controls whether the files are absolute or relative
paths. Address Issue 3693 and 3694 found during development.
- Fixed Github Issue 3628 - Hardcoding pickle protocol to 4 (supports python 3.4+)
and skipping Python 3.8's new pickle protocol 5 whose main advantage is for out-of-band data buffers.
NOTE: If you used Python 3.8 with SCons 3.0.0 or above, you may get a a pickle protocol error. Remove your
.sconsign.dblite. You will end up with a full rebuild.

From Andrii Doroshenko:
- Extended `Environment.Dump()` to select a format to serialize construction variables (pretty, json).

From Jeremy Elson:
- Updated design doc to use the correct syntax for Depends()

From Adam Gross:
- Added support for scanning multiple entries in an action string if
IMPLICIT_COMMAND_DEPENDENCIES is set to 2 or 'all'. This enables more thorough
action scanning where every item in each command line is scanned to determine
if it is a non-source and non-target path and added to the list of implicit dependencies
for the target.
- Added support for taking instances of the Value class as implicit
dependencies.
- Added new module SCons.Scanner.Python to allow scanning .py files.
- Added support for explicitly passing a name when creating Value() nodes. This may be useful
when the value can't be converted to a string or if having a name is otherwise desirable.
- Fixed usage of abspath and path for RootDir objects on Windows. Previously
env.fs.Dir("T:").abspath would return "T:\T:" and now it correctly returns "T:".

From Ivan Kravets, PlatformIO
- New conditional C Scanner (`SCons.Scanner.C.CConditionalScanner()`)
which interprets C/C Preprocessor conditional syntax (ifdef, if, else,
elif, define, etc.)
- Improvements for virtual C Pre-Processor:
* Handle UNSIGNED LONG and LONG numeric constants in DEC (keep support for HEX)
* Skip unrecognized directives, such as `if( defined ...)`
* Ignore `include DYNAMIC_INCLUDE` directive that depends on a dynamic
macro which is not located in a state TABLE.
* Cleanup CPP expressions before evaluating (strip comments, carriage returns)

From Iosif Kurazs:
- Added a new flag called "linedraw" for the command line argument "--tree"
that instructs scons to use single line drawing characters to draw the dependency tree.

From Daniel Moody:
- Add no_progress (-Q) option as a set-able option. However, setting it in the
SConstruct/SConscript will still cause "scons: Reading SConscript files ..." to be
printed, since the option is not set when the build scripts first get read.
- Added check for SONAME in environment to setup symlinks correctly (Github Issue 3246)
- User callable's called during substition expansion could possibly throw a TypeError
exception, however SCons was using TypeError to detect if the callable had a different
signature than expected, and would silently fail to report user's exceptions. Fixed to
use signature module to detect function signature instead of TypeError. (Github Issue 3654)
- Added storage of SConstructs and SConscripts nodes into global set for checking
if a given node is a SConstruct/SConscript.
Added new node function SCons.Node.is_sconscript(self) (Github Issue 3625)

From Andrew Morrow:
- Fix Issue 3469 - Fixed improper reuse of temporary and compiled files by Configure when changing
the order and/or number of tests. This is done by using the hash of the generated temporary files
content and (For the target files) the hash of the action.
So where previously files would be named:
- config_1.c, config_1.o, config_1
The will now be named (For example)
- conftest_68b375d16e812c43e6d72d6e93401e7c_0.c,
conftest_68b375d16e812c43e6d72d6e93401e7c_0_5713f09fc605f46b2ab2f7950455f187.o
or
conftest_68b375d16e812c43e6d72d6e93401e7c_0.o
conftest_68b375d16e812c43e6d72d6e93401e7c_0_5713f09fc605f46b2ab2f7950455f187 (for executable)

From Mathew Robinson:
- Improve performance of Subst by preventing unnecessary frame
allocations by no longer defining the *Subber classes inside of their
respective function calls.
- Improve performance of Subst in some cases by preventing
unnecessary calls to eval when a token is surrounded in braces
but is not a function call.
- Improve performance of subst by removing unnecessary recursion.
- Cleanup dangling symlinks before running builders (Issue 3516)

From Mats Wichmann:
- Remove deprecated SourceCode
- str.format syntax errors fixed
- a bunch of linter/checker syntax fixups
- Convert remaining uses of insecure/deprecated mktemp method.
- Clean up some duplications in manpage. Clarify portion of manpage on Dir and File nodes.
- Reduce needless list conversions.
- Fixed regex in Python scanner.
- Accommodate VS 2017 Express - it's got a more liberal license then VS
Community, so some people prefer it (from 2019, no more Express)
- vswhere call should also now work even if programs aren't on the C: drive.
- Add an alternate warning message if cl.exe is not found and msvc config
cache is in use (SCONS_CACHE_MSVC_CONFIG was given) - config cache
may be out of date.
- Fixed bug where changing TEXTFILESUFFIX would cause Substfile() to rebuild. (Github Issue 3540)
- Script/Main.py now uses importlib instead of imp module.
- Drop some Python 2-isms.
- MSVC updates: pass on VSCMD_DEBUG and VSCMD_SKIP_SENDTELEMETRY to msvc
tool setup if set in environment. Add Powershell to default env
(used to call telemetry script).
- Microsoft Visual Studio - switch to using uuid module to generate GUIDs rather than hand rolled
method using md5 directly.
NOTE: This change affects the following builders' output. If your build depends on the output of these builders
you will likely see a rebuild.
* Package() (with PACKAGETYPE='msi')
* MSVSSolution()
* MSVSProject()
- Docbook builder provides a fallback if lxml fails to generate
a document with tostring().
- Fix description of ARCOMSTR constr. var. (issue 3636). Previously the text was a copy of ASCOMSTR which
has different function.
- Update xml files in SCons to reflect changed relative paths after
code restructuring (src/engine/SCons -> SCons)
- Preliminary Python 3.9 support - elimination of some warnings.
- Drop the with_metaclass jig which was designed to let class
definitions using a metaclass be written the same for Py2/Py3.
- Bump python_version_unsupported (and deprecated) to indicate 3.5
is lowest supported Python.
- ParseFlags should not modify the user's passed in dict in case it's
a compound data structure (e.g. values are lists) (issue 3665)
- In Py3 classes no longer need to be listed as deriving from object.
- Remove deprecated check for Task subclasses needing a needs_execute
method - this is now enforced via an abstract base class, so the
check and test is no longer needed.
- Close various logfiles (trace, cache, taskmastertrace, configure)
when done using atexit calls.
- Rebase forked copy of shutil.copytree to Python 3.7 stlib version.
- Significant rework of documentation: API docs are now generated
using Sphinx; manpage and user guide now use more "standard"
markup elements (which could facilitate later conversion to a
different doc format, should that choice be made); significant
rewordings in manpage. Manpage Examples moved to an external
repository / website (scons-cookbook.readthedocs.io).
- Clean up test harness and tests' use of subdir, file_fixture and
dir_fixture.
- SubstitutionEnvironment and OverrideEnvironment now have keys()
and values() methods to better emulate a dict (already had items()).
- Rename internal Warning base class to SConsWarning to avoid any
possible confusion with Python's own Warning class.

3.12

embedded in SCons/ActionTests.py may need to change later, but
based on what is known now, 3.12 itself should work with this release.
- Add "append" keyword argument to Configure context's CheckLib and
CheckLibWithHeader to control whether to append or prepend (issue 2767)
Also added "unique" keyword, to control whether a library is added
or not if it is already in the $LIBS construction var in the
configure context. (issue 2768).
- Completely refactored the CPPDEFINES logic in Append/AppendUnique/Prepend/PrependUnique
This change fixes the following GH Issues:
- GH Issue 3876 - Append() and AppendUnique() will handle CPPDEFINES the same
- GH Issue 4254 - Make handling tuples in CPPDEFINES consistent.
- We no longer sort the keys added to CPPDEFINES by their dictionary keys.
We take advantage that their order is now stable based on insertion order
in Python 3.5+
- Added/modifed unit and system tests to verify these changes.

3.1.2

Not secure
From Edoardo Bezzeccheri
- Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target.

From Rob Boehne
- Fix suncxx tool (Oracle Studio compiler) when using Python 3. Previously would throw an exception.
Resolved by properly handling tool version string output as unicode.

From Tim Gates
- Resolved a typo in engine.SCons.Tool

From Adam Gross:
- Resolved a race condition in multithreaded Windows builds with Python 2
in the case where a child process is spawned while a Python action has a
file open. Original author: Ryan Beasley.
- Added memoization support for calls to Environment.Value() in order to
improve performance of repeated calls.


From Jason Kenny
- Update Command() function to accept target_scanner, source_factory, and target_factory arguments.
This makes Command act more like a one-off builder.

From Ivan Kravets
- Added support for "-imacros" to ParseFlags

From Jacek Kuczera:
- Fix CheckFunc detection code for Visual 2019. Some functions
(e.g. memmove) were incorrectly recognized as not available.

From Jakub Kulik
- Fix stacktrace when using SCons with Python 3.5+ and SunOS/Solaris related tools.

From Philipp Maierhöfer:
- Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in
non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when
the fontenc package is included with \usepackage[T1]{fontenc}) is read.

From Mathew Robinson:
- Improved threading performance by ensuring NodeInfo is shared
across threads. Results in ~13% improvement for parallel builds
(-j > 1) with many shared nodes.
- Improve performance of Entry.disambiguate() by making check for
most common case first, preventing unnecessary IO.
- Improved DAG walk performance by reducing unnecessary work when
there are no un-visited children.

From Mats Wichmann
- Replace instances of string find method with "in" checks where
the index from find() was not used.
- CmdStringHolder fix from issue 3428
- Turn previously deprecated debug options into failures:
--debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer.
- Experimental New Feature: Enable caching MSVC configuration
If SCONS_CACHE_MSVC_CONFIG shell environment variable is set,
SCons will cache the results of past calls to vcvarsall.bat to
a file; integrates with existing memoizing of such vars.
On vs2019 saves 5+ seconds per SCons invocation, which really
helps test suite runs.
- Remove deprecated SourceSignatures, TargetSignatures
- Remove deprecated Builder keywords: overrides and scanner
- Remove deprecated env.Copy
- Remove deprecated BuildDir plus SConscript keyword build_dir
- A number of documentation improvements.

3.1.1

Not secure
From William Deegan:
- Remove obsoleted references to DeciderNeedsNode which could cause crash when using --debug=explain

From Jason Kenny
- Add Fix and test for crash in 3.1.0 when using Decider('MD5-timestamp') and --debug=explain

From Ben Reed:
- Added -fmerge-all-constants to flags that get included in both CCFLAGS and LINKFLAGS.

From Mathew Robinson:
- Fix issue 3415 - Update remaining usages of EnvironmentError to SConsEnvironmentError
this patch fixes issues introduced in 3.1.0 where any of the
following would cause SCons to error and exit:
- CacheDir not write-able
- JSON encoding errors for CacheDir config
- JSON decoding errors for CacheDir config

3.1.0

Not secure
From Joseph Brill:
- Code to supply correct version-specifier argument to vswhere for
VS version selection.

From William Deegan:
- Enhanced --debug=explain output. Now the separate components of the dependency list are split up
as follows:

scons: rebuilding `file3' because:
the dependency order changed:
->Sources
Old:xxx New:zzz
Old:yyy New:yyy
Old:zzz New:xxx
->Depends
->Implicit
Old:/usr/bin/python New:/usr/bin/python
- Fix Issue 3350 - SCons Exception EnvironmentError is conflicting with Python's EnvironmentError.
- Fix spurious rebuilds on second build for cases where builder has > 1 target and the source file
is generated. This was causing the > 1th target to not have it's implicit list cleared when the source
file was actually built, leaving an implicit list similar to follows for 2nd and higher target
['/usr/bin/python', 'xxx', 'yyy', 'zzz']
This was getting persisted to SConsign and on rebuild it would be corrected to be similar to this
['zzz', 'yyy', 'xxx', '/usr/bin/python']
Which would trigger a rebuild because the order changed.
The fix involved added logic to mark all shared targets as peers and then ensure they're implicit
list is all cleared together.
- Fix Issue 3349 - SCons Exception EnvironmentError is conflicting with Python's EnvironmentError.
Renamed to SConsEnvironmentError
- Fix Issue 3350 - mslink failing when too many objects. This is resolved by adding TEMPFILEARGJOIN variable
which specifies what character to join all the argements output into the tempfile. The default remains a space
when mslink, msvc, or mslib tools are loaded they change the TEMPFILEARGJOIN to be a line separator (\r\n on win32)
- Fix performance degradation for MD5-timestamp decider. NOTE: This changes the Decider() function arguments.
From:
def my_decider(dependency, target, prev_ni):
To:
def my_decider(dependency, target, prev_ni, repo_node):
Where repo_node is the repository (or other) node to use to check if the node is out of date instead of dependency.

From Peter Diener:
- Additional fix to issue 3135 - Also handle 'pure' and 'elemental' type bound procedures
- Fix issue 3135 - Handle Fortran submodules and type bound procedures

From Adam Gross:
- Upgraded and improved Visual Studio solution/project generation code using the MSVSProject builder.
- Added support for Visual Studio 2017 and 2019.
- Added support for the following per-variant parameters to the builder:
- cpppaths: Provides per-variant include paths.
- cppdefines: Provides per-variant preprocessor definitions.

From Michael Hartmann:
- Fix handling of Visual Studio Compilers to properly reject any unknown HOST_PLATFORM or TARGET_PLATFORM

From Bert Huijben:
- Added support for Visual Studio 2019 toolset.

From Mathew Robinson:
- Update cache debug output to include cache hit rate.
- No longer unintentionally hide exceptions in Action.py
- Allow builders and pseudo-builders to inherit from OverrideEnvironments

From Leonard de Ruijter:
- Add logic to derive correct version argument to vswhere

From Lukas Schrangl:
- Enable LaTeX scanner to find more than one include per line

From Sergey Torokhov:
- Recognize jdk on Gentoo systems.

From Mats Wichmann:
- scons-time takes more care closing files and uses safer mkdtemp to avoid
possible races on multi-job runs.
- Use importlib to dynamically load tool and platform modules instead of imp module
- sconsign: default to .sconsign.dblite if no filename is specified.
Be more informative in case of unsupported pickle protocol (py2 only).
- Fix issue 3336 - on Windows, paths were being added to PATH even if
tools were not found in those paths.
- More fixes for newer Java versions (since 9): handle new jdk directory
naming (jdk-X.Y instead of jdkX.Y) on Windows; handle two-digit major
version. Docstrings improved.
- Fixups for pylint: exception types, redefined functions,
globals, etc. Some old code removed to resolve issues (hashlib is
always present on modern Pythons; no longer need the code for
2.5-and-earlier optparse). cmp is not a builtin function in Py3,
drop one (unused) use; replace one. Fix another instance of
renaming to SConsEnvironmentError. Trailing whitespace.
Consistently use not is/in (if not x is y -> if x is not y).
- Add a PY3-only function for setting up the cachedir that should be less
prone to races. Add a hack to the PY2 version (from Issue 3351) to
be less prone to a race in the check for old-style cache.
- Fix coding error in docbook tool only exercised when using python lxml
- Recognize two additional GNU compiler header directory options in
ParseFlags: -iquote and -idirafter.
- Fix more re patterns that contain \ but not specified as raw strings
(affects scanners for D, LaTeX, swig)

Page 3 of 14

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.