NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4997 most downloaded on PyPI
Open Source next-generation build tool.
Last release 1 months ago
27 Aug 2026
Release timing varies
gaps range from 2 weeks to 9 months
Nearly every release is documented
notes for 38 of 40 stable releases
1 version withdrawn
withdrawn after publishing
13 years old
41 releases · first in 2013
A new SCons release, 4.11.1, is now available on the SCons download page:
A new SCons release, 4.11.1, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.11.0:
.. code-block:: text
git shortlog --no-merges -ns 4.11.0..HEAD
6 William Deegan
1 Mats Wichmann
From Mats Wichmann: - Undo, for now, the 4.11.0 change (from PR 4875) to read a saved-Variables file using a File node. There were unanticipated side effects not caught by any existing test. Will be reintroduced when the issues can be resolved cleanly without backwards compatibility concerns.
One column per quarter.
Deprecated Python 3.7 & 3.8 support.
A new SCons release, 4.11.0, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.10.1:
SCons.Util.UtilTests.py to individual packages where appropriate... code-block:: text
git shortlog --no-merges -ns 4.10.1..HEAD
87 William Deegan
74 Mats Wichmann
14 Thaddeus Crews
10 Prabhu Singh Khalsa
5 Joseph Brill
4 Keith F. Prussing
4 Prabhu S. Khalsa
1 Cornelii Sandberg
1 Paul Movall
1 Vassili Tchersky
From Joseph Brill: - Add possible build failure when targeting 32-bit arm using Visual Studio 2022 with Windows SDK version 10.0.26100.0 or later installed to the known issues in SCons/Tool/MSCommon/README.rst. - MSVC: Added a host/target batch file configuration table for Visual Studio 2026. Visual Studio 2026 removed support for 32-bit arm targets.
From Thaddeus Crews:
- Purge vim/emac local variable bloat.
- Implement type hints for Node subclasses.
- Ruff: Handle F401 exclusions more granularly, remove per-file exclusions.
- Simplified and sped up compilation database generation. No longer requires
each entry to have a dedicated node that's always built; instead, the database
itself is set to always build.
- Implement type hints for Environment and environment utilities.
- Deprecated Python 3.7 & 3.8 support.
- Modernized GitHub Actions test runner. This consolidates the logic of
existing test environments into a single package. Adjusted AppVeyor to
only run for targets unsupported by GitHub runners.
- Split SCons.Util.UtilTests.py to individual packages where appropriate.
From William Deegan: - Fix SCons Docbook schema to work with lxml > 5 - Update pyproject.toml to support Python 3.14 and remove restrictions on lxml version install - Used Gemini to refactor runtest.py to better organized the code and add docstrings. - Added script for release process to find all contributors in a release and highlight new contributors. (Using Gemini AI) - Fix Appveyor scripting to install unavailable python versions when needed and use them for testing. - Subst: Fixed ListSubber.expanded(), which never detected an already-expanded string (dead code since its 2019 introduction), so fully-expanded values are no longer recursively re-processed during scons_subst_list(). - Subst: scons_subst() and scons_subst_list() no longer leak a builtins key into the construction environment's dictionary if an exception is raised during substitution. - Subst: the result of the inspect.signature() check for callable construction variables is now cached per callable, speeding up expansion of function-valued variables. Callables whose signature cannot be determined (some C/builtin callables) are now treated as not matching the (target, source, env, for_signature) convention instead of raising. - Subst: variable values which are plain strings with no further '$' expansions are now returned directly, skipping an unneeded dict copy and recursive substitution pass. Combined, the substitution speedups measured on a representative command line (this from a micro benchmark and not on a full build) are: ('$CC $CCFLAGS $CPPDEFINES $GEN -c -o $TARGET $SOURCES'): old new improvement scons_subst 20.7 us 12.8 us ~38% faster scons_subst_list 37.4 us 25.1 us ~33% faster - Subst: a NameError raised during scons_subst_list() now includes the name of the unknown variable in the error message. - Subst: the overrides argument to scons_subst()/scons_subst_list() no longer mutates a caller-supplied lvars dictionary; also removed mutable default arguments. Removed Literal.neq, a misspelled (and therefore never-invoked) version of ne; Python derives inequality from Literal.eq.
From Prabhu S. Khalsa: - Fix typo in preface - Remove word "below" when content is not actually located below - Fix typos in preface, Chapter 6, Chapter 9 and Chapter 10 of User Guide - Fix broken links in Chapter 1 of User Guide
From Dillan Mills: - Fix handling of AddOption for option-arguments with spaces (when omitting the = sign or when an option takes multiple option-arguments). Arguments unknown at the time the first pass splits the command line into arguments and targets would put such arguments into targets, and they remained there even after the AddOption calls were seen. Closes #2748, #2805, #2977.
From Paul Movall: - Fix a problem where AlwaysBuild was not honored by ninja - Fix --no-exec when using ninja tool
From Keith F. Prussing: - Add RequiredPackage to the LaTeX scanner for recursive scanning of custom LaTeX packages.
From Cornelii Sandberg: - Fix Variables() not reading a saved-variables file (e.g. custom.py) from the source directory when building in a separate variant directory. The file is now resolved through the File() node infrastructure, so it is found in the source directory or a repository (issue #816).
From Vassili Tchersky: - Add 'bsd' platform definition. - The default tool search order now prefers the LLVM/clang toolchain over GCC on FreeBSD and OpenBSD (PR #4887).
From Mats Wichmann: - Introduce some unit tests for the file locking utility routines - Subst: Improved variable substitution by consolidating dictionary merging operations, reducing unnecessary copy operations when no TARGET/SOURCE variables or overrides need to be applied. Combined with other substitution improvements (lru_cache for callable signature caching, action hashability, for_signature bug fix, f-string modernization), typical builds see up to 8-12% improvement with larger gains (up to 20-30%) on builds with many callable construction variables. - Reduce unneeded computation of overrides. The Mkdir builder used an unknown argument ('explain') on creation, causing it to be considered an override. Also, if override dict is empty, don't even call the Override factory function. - Handle the default (unset) ProgressObject differently for the sole purpose of avoiding Sphinx 9.0+ blowing up on it (it's been giving a warning for years, but now it's a fatal error). - Improve coverage of "API docs" build by ignoring any setting of all in a package and not showing inherited members from optparse. Add a trick to make sure the build sees PathListCache while generating docs (in normal operation, it's removed so was not visible). - Fix --debug=includes for case of multiple source files. - Unify internal "_null" sentinel usage. - All functions/classes/non-dunder methods in Environment have docstrings. - Docbook tests: improve skip message, more clearly indicate which test need actual installed system programs (add -live suffix). - Test runner reworked to use Python logging; the portion of the test suite which tests the runner was adjusted to match. - Switch remaining "original style" docstring parameter listings to Google style. - Additional small tweaks to Environment.py type hints, fold some overly long function signature lines, and some linting-insipired cleanups. - Deprecated using signature-file-per-directory (aka old-style SConsign) via the SConsignFile(name=None) call. - Test framework: tweak module docstrings - Test suite: end to end tests don't use assert in result checks - The qt3 tool module, deprecated since version 4.3, is removed due to the general unavailablility of the obsolete build-time Qt3 package. - A few more typing cleanups in Environment (and in one case which affected it in the Node package). - Adjust race protection for CacheDir - now uses a unique temporary directory for each writer before doing the move, instead of depending on a one-time uuid to make a path to the file. - Clarify VariantDir behavior when switching to not duplicate sources and tweak wording a bit. - Complete the work from PR #3799 on AddOption handling (original work credited to Dillan Mills) - Update documentation of the three file-finding functions in the API (FindFile, FindInstalledFiles, FindSourceFiles) as well as FindPathDirs. Also add a test for FindFile to be sure it locates non-existing derived files as advertised. - Don't duplicate the creation of Tool objects if "default" is part of the tool list. - Test suite: add support for Python 3.15 in the Action unit tests. - Add a test for FindFile to be sure it locates non-existing derived files as advertised. - zip tool now uses zipfile module's "from_file" method to populate ZipInfo records, rather than doing manually. - Fix CPPDEFINES test using pkg-config, which was failing on GH Actions. - Some cleanups in Subst.py. Functionality does not change. - Deprecate the legacy job scheduler and feature flag. The feature flag is renamed to "legacy_sched_deprecated". - Java tool recognizes all released versions, and no longer needs manual updating as new releases are made. Default is now latest LTS - v25. - Clarify internal usage of zipimporter (not user-visible code) - Fixed an old problem in PDF doc generation where the path to an image file ended up with a "not found" error. - Fixed PDF doc build problems relating to illegal margin widths ("") and table column alignment. - Handle missing/malformed manifest in mslink more gracefully (issue 4866). - Change the way ldc D compiler specifies including libdruntime when making a shared object. ldc version 1.3 (2017) introduced shared druntime on some platforms, with an odd library naming scheme. SCons specification was "too precise" to work cross-platform with the new scheme, let the linker pass pick. - Reference manual improvements: * More clarifications in Builder Methods section. * Clarify VariantDir behavior when switching from duplicate=True (the default) to duplicate=False, and tweak wording a bit. * Update documentation of the three file-finding functions (FindFile, FindInstalledFiles, FindSourceFiles) as well as FindPathDirs. * Update linking-related construction variables. * Add a few more live links. * Clarify CacheDir and related option flags. * Drop old example section from manpage (not a visible change: has been commented out since v4.0, when the content moved to the new Cookbook) * Reword IMPLICIT_COMMAND_DEPENDENCIES construction variable. * Add info on the type of an option variable to GetOption and SetOption. * Tighten up the doc for Variables-Add() and add a note on file contents not being preserved to Variables-Save() * Tweak the wording for $PRINT_CMD_LINE_FUNC.
Switch test framework from using profile to cProfile. profile generates deprecation warnings starting with Python 3.15.
A new SCons release, 4.10.1, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since PREVIOUS_RELEASE:
Enable membership tests on instances of Literal (non-substituting string).
In the SequenceTypes tuple used for dynamic type checks, include
the dict contents views, exclude the dictionary view itself as it
is not an iterable sequence type.
Improve documentation of builder methods and builder objects.
Make links clickable in the SetOption and GetOption manpage entries.
.. code-block:: text
git shortlog --no-merges -ns 4.10.0..HEAD
12 Mats Wichmann
4 William Deegan
1 Thaddeus Crews
From Thaddeus Crews: - Add support for Visual Studio 2026.
From William Deegan: - Fix copyright date in API docs to match that in the rest of the build.
From Mats Wichmann: - Switch test framework from using profile to cProfile. profile generates deprecation warnings starting with Python 3.15. - Improve documentation of builder methods and builder objects. - Make links clickable in the SetOption and GetOption manpage entries. - Enable membership tests on instances of Literal (non-substituting string). - In the SequenceTypes tuple used for dynamic type checks, include the dict contents views, exclude the dictionary view itself as it is not an iterable sequence type. - Internal: where the find method on a string was used to determine if a substring is present, use the more readable "in" and "not in".
A new SCons release, 4.9.10, is now available on the SCons download page:
A new SCons release, 4.9.10, is now available on the SCons download page:
Here is a summary of the changes since 4.9.1:
Nodes are now treated as PathLike objects.
Replace use of old conditional expression idioms with the official one from PEP 308 introduced in Python 2.5 (2006). The idiom being replaced (using and/or) is regarded as error prone.
MSVC: The following shell environment variables are now included in the environment used by SCons to initialize MSVC when defined: VCPKG_DISABLE_METRICS, VCPKG_ROOT, POWERSHELL_TELEMETRY_OPTOUT, PSDisableModuleAnalysisCacheCleanup, and PSModuleAnalysisCachePath. A subset of the shell environment PSModulePath is included in the environment used by SCons to initialize MSVC when defined. None of these variables and values are propagated to the user's SCons environment after running the MSVC batch files.
TEMPFILE: A UserError exception is raised when encoding the contents of the tempfile fails due to a limited set of expected exceptions (e.g., UnicodeError).
Fixed SCons.Variables.PackageVariable to correctly test the default setting against both enable & disable strings. (Fixes #4702)
MSVC: Fixed a significant delay experienced in the Github Actions windows 2022 and 2025 runners due to the environment used by SCons to initialize MSVC when the Visual Studio vcpkg component is installed. The Github Actions windows 2019 runner was not affected.
Fix the variant dir component being missing from generated source file paths with CompilationDatabase() builder (Fixes #4003).
Ninja tool generate_command() fixed to call subst() with correct arguments in ListAction case. Unit tests added for generate_command.
Fix the SCons.Scanner.LaTeX to mimic LaTeX's search method.
Ninja tool now quotes targets (if necessary) when calling back to SCons - both in the POST request constructed to contact the daemon, and in the command eventually issued from the deamon.
Ninja tool is adjusted to recognize and emit the right rule in the case of special actions that the tool recognizes, like Copy. This was working in the case of single commands, but not when part of a list of actions. Recognition only happens if the special action is first in the list.
Fix a test problem on Windows where UNC tests failed due to incorrect path munging if a non-default %TEMP% was defined (as in moving to a Dev Drive).
Fix Issue #4746. The TEMPFILE is written in utf-8 encoding by default. If the tempfile contents cannot be decoded by the command the tempfile is passed to, (new) TEMPPFILEENCODING can be used to speficy a different encoding to use. On Windows, the username may be a cause of this, as the default path for temporary files includes the username. Setting (existing) TEMPFILEDIR may also help in this case.
Tweak runtest.py and test framework to more reliably get the requested Python binary (for odd Windows setups + Python launcher)
Fix the tempfile encoding test regex strings to remove warnings in python 3.12 and 3.13.
Incremental builds in Interactive mode could fail on platforms that support batch mode (currently: Windows). Change the way the changed and unchanged target and source lists are accounted for to resolve. Fixes #3029.
Virtualenv support module modernized: previously looked first for an unofficial approach from before venv support was made part of Python in 3.3; now looks for the official approach first. This in an internal detail, the API is unchanged.
Add internal routines to manipulate publicly visible argument and target lists. These interfaces are not part of the public API.
Improve the error message when an environment method is called which does not exist in that environment. Mostly this is intended to be a bit more helpful in the case of a builder which did not instantiate.
The generated roff (.1) manpages are now included in the scons-doc tarball built at part of the release process, in addition to the html and txt versions. For distribution packaging, the manpages can be extracted from here (downloadable from https://scons.org/doc/ using a a version-specific URL, e.g. https://scons.org/doc/4.9.1/scons-doc-4.9.1.tar.gz).
Clarify how pre/post actions on an alias work.
Improve the description of PackageVariable.
The "API Docs" build (Sphinx) configuration is improved, and SConsDoc and SConsExample are now included - their API is interesting to developers working on SCons (needed to write docs), even if not part of "The SCons API" itself.
Missing documentation for the Virtualenv() function is added. Note that the User Guide previously described a negative outcome as returning None. It is now explicit that the path is returned if running in a virtualenv, and an empty (falsy) string if not.
Improve the wording of Configure methods.
Improve the wording of AppendENVPath and PrependENVPath in manpage.
Improve documentation of builder methods and builder objects.
All the User Guide sections now have textual anchors, meaning there no longer be build-generated numeric tags like https://scons.org/doc/production/HTML/scons-user.html#id1514
runtest.py once again finds "external" tests, such as the tests for tools in scons-contrib. An earlier rework had broken this. Fixes #4699.
Clean up C and C++ FLAGS tests. Tests which use a real compiler are now more clearly distinguished (-live.py suffix and docstring).
Fix a couple of unit tests to not fail with Python 3.14. These involve expectations for bytecode strings and error message contents; there was no problem with SCons itself using 3.14.
Move the GitHub workflow test runner files from the SCons root to the ci subdirectory of the testing directory.
GitHub: Enable the interactive tests on windows.
GitHub: Enable the packaging tar xz test on windows.
GitHub: Exclude two ninja tests that consistently fail on MacOS in the experimental tests workflow.
GitHub: Add a workflow file to test MSVC with optional environment variables.
GitHub: Populate the MSVC cache before running the test suite for select windows workflow files.
GitHub: Upload the failed_tests.log artifact on failure in select workflow files.
GitHub: Change the runtest workflow to allow the python version to be specified with the OS version.
Testing: Increase the default timeout from 20 seconds to 60 seconds in the testing framework wait_for method. The timeout was increased during isolated experiments of the interactive tests on windows.
Testing: Update the packaging tar bz2 and xz tests on on Windows. The packaging tar bz2 and xz tests should be skipped on Windows 10 and GitHub windows-2022. The packaging tar bz2 and xz tests should be run on Windows 11 and GitHub windows-2025.
Ninja: Increase the number of generated source files in the iterative speedup test from 200 to 250. Increasing the workload should reduce the likelihood that the ninja tests are slower.
Add more unit tests to internal AppendPath, PrependPath functions.
git shortlog --no-merges -ns 4.9.1..HEAD
61 Mats Wichmann
46 Joseph Brill
25 William Deegan
6 Keith F. Prussing
1 Bill Prendergast
1 Edward Peek
1 Thaddeus Crews
From Joseph Brill: - MSVC: A significant delay was experienced in the Github Actions windows 2022 and 2025 runners due to the environment used by SCons to initialize MSVC when the Visual Studio vcpkg component is installed. The Visual Studio vcpkg component is not installed in the Github Actions windows 2019 runner. The Visual Studio vcpkg component invokes a powershell script when the MSVC batch files are called. The significant delay in the Github Actions windows 2022 and 2025 runners appears due to the environment used by SCons to initialize MSVC not including the pwsh executable on the system path, not including the powershell module analysis cache location, and not including the powershell module path. Adding the pwsh and powershell executable paths in the order discovered on the shell environment path, passing the powershell module analysis cache location, and adding a subset of the powershell module path to the environment used by SCons to initialize MSVC appears to have eliminated the significant delays in the Github Actions windows 2022 and 2025 runners. In the Github Actions windows 2022 and 2025 runners, any one of the three additions appears to eliminate the significant delays. It is hoped that the combination of all three additions will guard against significant delays in other environment configurations as well. - MSVC: The following shell environment variables are now included in the environment used by SCons to initialize MSVC when defined: VCPKG_DISABLE_METRICS, VCPKG_ROOT, POWERSHELL_TELEMETRY_OPTOUT, PSDisableModuleAnalysisCacheCleanup, and PSModuleAnalysisCachePath. A subset of the shell environment PSModulePath is included in the environment used by SCons to initialize MSVC when defined. None of these variables and values are propagated to the user's SCons environment after running the MSVC batch files. - GitHub workflow changes: * Add directory testing/ci for test runner files. Move the existing windows ci skip file from the SCons root to the ci testing directory. * Remove the interactive tests from the windows ci skip file. * Add an exclude test file for MacOS that skips the two ninja tests that consistently fail. * Add a test file containing one test for the MSVC optional environment workflow. * Modify the experimental workflow to pass the exclude test file as an argument to the test runner for macos. * Add a workflow file to test MSVC with the optional environment variables. * Add a script in the testing/ci directory to populate the MSVC cache before running the test suite in select windows workflow files. The experimental test suite and the full test suite workflow files populate the MSVC cache before running the test suite on windows. The script is also run after the test suite in the optional MSVC environment variables workflow file to display the MSVC cache. * Upload the failed_tests.log artifact on failure in select workflow files. Prior to this change, the failed test log was uploaded only when none of the tests failed. * Modify the runtest workflow file to pair an OS version with a python version. - Ninja: Increase the number of generated source files in the ninja iterative speedup test from 200 to 250. Increasing the workload should reduce the likelihood that the ninja tests are slower. - Testing: Increase the default timeout from 20 seconds to 60 seconds in the testing framework wait_for method. At present, the wait_for method is only used for the interactive tests. - GitHub: Remove the packaging tar xz test from the windows ci skip file. - Testing: Update the packaging tar bz2 and xz tests on on Windows. Detect if the tar bz2 and xz formats are supported for the windows system tar executable using the reported version string. The packaging tar bz2 and xz tests should be skipped on Windows 10 and GitHub windows-2022. The packaging tar bz2 and xz tests should be run on Windows 11 and GitHub windows-2025. - TEMPFILE: Move encoding the tempfile contents before creating the tempfile due to possible encoding errors. Ensure the tempfile file handle is closed after writing the tempfile contents. Raise a UserError exception when the tempfile contents encoding fails for known exception types. - TEMPFILE: Fix the tempfile encoding test regex strings to eliminate warnings in python 3.12 and 3.13.
From William Deegan: - Fix Issue #4746. TEMPFILE's are written with utf-8 encoding, In case of decoding errors, TEMPFILEENCODING can now be specified to give more explicit instructions to SCons.
From Edward Peek: - Fix the variant dir component being missing from generated source file paths with CompilationDatabase() builder (Fixes #4003).
From Bill Prendergast: - Fixed SCons.Variables.PackageVariable to correctly test the default setting against both enable & disable strings. (Fixes #4702) - Extended unittests (crudely) to test for correct/expected response when default setting is a boolean string.
From Keith Prussing: - Fixed LaTeX SCanner to mimic LaTeX's search behavior for included files.
From Mats Wichmann: - Clean up C and C++ FLAGS tests. Tests which use a real compiler are now more clearly distinguished (-live.py suffix and docstring). - runtest.py once again finds "external" tests, such as the tests for tools in scons-contrib. An earlier rework had broken this. Fixes #4699. - Clarify how pre/post actions on an alias work. - Rearrange Fortran e2e tests - "live" tests now live in a separate test file and don't share with flags-only mocked tests. - Tweak the two doc-generation modules. The significant change is turning the introductory comment in bin/SConsExamples into a docstring that can be rendered by Sphinx, and updating that text. The rest is minor fiddling like switching to f-strings small doc changes. - Fix a couple of unit tests to not fail with Python 3.14. These involve bytecode strings and error message contents; there was no problem with SCons itself using 3.14. Since 3.14 is now in Beta, there should be no further changes. - Replace use of old conditional expression idioms with the official one from PEP 308 introduced in Python 2.5 (2006). The idiom being replaced (using and/or) is regarded as error prone. - Improve the description of PackageVariable. - Tweak the "API Docs" build (Sphinx) configuration a bit. Some one-file modules were reported as duplicated, this is fixed. SConsDoc and SConsExample are now included - their API is interesting to developers working on SCons (needed to write docs), even if not part of "The SCons API" itself. Reworded the API Docs intro sectios a bit. - Include the roff (.1) manpages in the scons-doc tarball as a better long-term home than in the sdist. - Virtualenv support module modernized: previously looked first for an obsolete mechanism the external virtualenv tool used to use, now checks first for the official approach introduced in PEP 405. - Add missing manpage entry for Virtualenv(). Return type is documented as an empty string in case of a negative result (rather than None), and the code adjusted. All internal usage, including tests, was dont boolean-style anyway ("if Virtualenv():"). - Add internal routines _Remove_Targets and _Remove_Arguments to allow taking away values placed the public attributes BUILD_TARGETS, COMMAND_LINE_TARGETS, ARGUMENTS and ARGLIST. This is a step towards fixing the handling of option-arguments specified with a space separator (multiple issues, harvested from PR #3799 created by Dillan Mills). These interfaces are not part of the public API. - Minor test tweaks to clean up and add DefaultEnvironment call. - Ninja tool generate_command() fixed to call subst() with correct arguments in ListAction case. Unit tests added for generate_command. Fixes #4580. - Ninja tool now quotes targets (if necessary) when calling back to SCons - both in the POST request constructed to contact the daemon, and in the command eventually issued from the deamon. Initial suggestion from Julien Pommier. Fixes #4730. - Ninja tool is adjusted to recognize and emit the right rule in the case of special actions that the tool recognizes, like Copy. This was working in the case of single commands, but not when part of a list of actions. Recognition only happens if the special action is first in the list. Initial suggestion from Julien Pommier. Fixes #4731. - Fix a test problem on Windows where UNC tests failed due to incorrect path munging if a non-default %TEMP% was defined (as in moving to a Dev Drive). Also some cleanup. - Improve the wording of Configure methods. - Add unit test cases for AppendUnique, PrependUnique - verify behavior if existing value already contained more than one of added value. - Tweak runtest.py and test framework to more reliably get the requested Python binary (for odd Windows setups + Python launcher) - Improve the wording of AppendENVPath and PrependENVPath in manpage. - Add more unit tests to internal AppendPath, PrependPath functions. - Add unit tests to show .filebase method strips only the last suffix if several apparent suffixes are present, and .suffix returns the last. - Improve the error message when an environment method is called which does not exist in that environment. Mostly this is intended to be a bit more helpful in the case of a builder which did not instantiate. - Incremental builds in Interactive mode could fail on platforms that support batch mode (currently: Windows). Change the way the changed and unchanged target and source lists are accounted for to resolve. Fixes #3029. - Improve documentation of builder methods and builder objects. - Add tags to the remaining section headers in the User Guide. This is visible only in two ways: it's possible to link to any section now, and the generated html will no longer have obscure links (e.g. https://scons.org/doc/production/HTML/scons-user.html#id1514) that may change over time.
A new SCons release, 4.9.1, is now available on the SCons download page:
A new SCons release, 4.9.1, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.4.0:
New CacheDir initialization code failed on Python 3.7 for unknown reason (worked on 3.8+). Adjusted the approach a bit. Fixes #4694.
Fixed a hang in wait_for_process_to_die() on Windows, affecting
clean-up of the SCons daemon used for Ninja builds.
git shortlog --no-merges -ns 4.9.0..HEAD
7 Mats Wichmann
4 William Deegan
2 Adam Simpkins
From Adam Simpkins:
- Fixed a hang in wait_for_process_to_die() on Windows, affecting
clean-up of the SCons daemon used for Ninja builds.
From Thaddeus Crews: - Nodes are now treated as PathLike objects.
From Mats Wichmann: - Fix typos in CCFLAGS test. Didn't affect the test itself, but didn't correctly apply the DefaultEnvironment speedup.
- New CacheDir initialization code failed on Python 3.7 for unknown
reason (worked on 3.8+). Adjusted the approach a bit. Fixes #4694.
- Try to fix Windows fails on Docbook tests in case xsltproc is found.
It's still not certain why this started failing. On both GitHub
Actions and AppVeyor, it's found as part of StrawberryPerl, part of
the default install - maybe this wasn't the case before? The xsltproc
from choco install is considerably older and may have been more lenient?
Anyway, intermittent fails seem caused by something network related,
so propagate two xsltproc flags that avoid loading the dtd that were
present in three of the 11 "live" tests, but not the other eight.
Also, all 11 now pass the test-discovered xslt processor the same
way, which was not the case previously.
- Update progress printing on three tools for SCons developers -
the test runner and two of the doc generators.
A new SCons release, 4.9.0, is now available on the SCons download page:
A new SCons release, 4.9.0, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.8.1:
NOTE: Since SCons 4.9.0, Python 3.7.0 or above is required.
Expose the extra_libs keyword argument in CheckLibWithHeader and 'CheckLib'
Removed Python 3.6 support.
Override environments, created when giving construction environment keyword arguments to Builder calls (or manually, through the undocumented Override method), were modified not to "leak" on item deletion. The item will now not be deleted from the base environment.
Added support for tracking beamer themes in the LaTeX scanner.
MSVS: msvs project files are always generated before the corresponding msvs solution files. This changes the behavior of clean for a project generated with auto_build_solution disabled and explicit solution generation: when the solution files are cleaned, the project files are also cleaned. The tests for vs 6.0-7.1 were updated accordingly.
MSVS: Add an optional keyword argument, auto_filter_projects, to MSVSSolution. Accepted values for auto_filter_projects are:
Solution file names and/or nodes in the project argument list cause erroneous Project records to be produced in the generated solution file. As a convenience, a user may elect to ignore solution file names and nodes in the projects argument list rather than manually removing solution file names and nodes from the MSVSProject return values.
SCons C preprocessor:
Add a tag to each CacheDir to let systems ignore backing it up (per https://bford.info/cachedir/). Update the way a CacheDir is created, since it now has to create two files.
The Dictionary method now has an as_dict flag. If true, Dictionary always returns a dict. The default remains to return different types depending on whether zero, one, or multiple construction
A Variables object now makes available a "defaulted" attribute, a list of variable names that were set in the environment with their values taken from the default in the variable description (if a variable was set to the same value as the default in one of the input sources, it is not included in this list).
If a build Variable is created with no aliases, the name of the Variable is no longer listed in its aliases. Internally, the name and aliases are considered together anyway so this should not have any effect except for being visible to custom help text formatters.
PackageVariable now does what the documentation always said it does if the variable is used on the command line with one of the enabling string as the value: the variable's default value is produced (previously it always produced True in this case).
Temporary files created by TempFileMunge() are now cleaned up on scons exit, instead of at the time they're used. Fixes #4595.
AddOption now correctly adds short (single-character) options. Previously an added short option would always report as unknown, while long option names for the same option worked. Short options that take a value require the user to specify the value immediately following the option, with no spaces (e.g. -j5 and not -j 5).
Fix a problem with compilation_db component initialization - the entries for assembler files were not being set up correctly.
On Darwin, PermissionErrors are now handled while trying to access /etc/paths.d. This may occur if SCons is invoked in a sandboxed environment (such as Nix).
Added error handling when creating MSVC detection debug log file specified by SCONS_MSCOMMON_DEBUG.
MSVS: Modify select msvs test scripts to run on platforms not supported by the msvs/msvc tool implementation via a default host architecture for unsupported platforms.
MSVS: Fixed early loop exit in select msvs test scripts. Select msvs test scripts were being invoked for msvc version 8.0 only. Additional msvs tool and test changes due to the msvs test scripts being run for all msvc versions (i.e., minor test and tool issues went undetected).
MSVS: for variant build configurations, msvs solution files are generated in the source directory and a placeholder file is generated in the variant build directory. This mirrors the behavior of generated msvs project files.
MSVS: msvs project files are generated before the corresponding msvs solution file. User-specified project GUIDs should now be correctly written to the solution file.
SCons C preprocessor: Preserve literals that contain valid integer substring specifications. Previously, the integer suffix could be stripped from a symbol that contained an integer and suffix substring.
SCons C preprocessor: Update the optional integer suffixes to include support for the alternate orderings of unsigned with long or long long as defined in the c/cpp grammar.
SCons C preprocessor: Update the optional integer suffixes for case insensitive specifications as defined in the c/cpp grammar.
Fix nasm test for missing include file, cleanup.
Skip running a few validation tests if the user is root and the test is not designed to work for the root user.
Make sure unknown variables from a Variables file are recognized as such. Previously only unknowns from the command line were recognized (issue #4645).
Update ninja tool to use ninja.BIN_DIR to find pypi packaged ninja binary. python ninja package version 1.11.1.2 changed the location and previous logic no longer worked.
The (optional) C Conditional Scanner now does limited macro replacement on the contents of CPPDEFINES, to improve finding deps that are conditionally included. Previously replacement was only done on macro definitions found in the file being scanned. Only object-like macros are replaced (not function-like), and only on a whole-word basis; recursion is limited to five levels and does not error out if that limit is reached (issue #4523).
Minor modernization: make use of stat object's st_mode, st_mtime and other attributes rather than indexing into stat return.
Ninja's TEMPLATE rule pool changed from local_pool to install_pool
hoping it will fix a race condition that can occurs when Ninja defers
to SCons to build.
Renamed env.Help() & Help()'s argument keep_local to local_only, previously the documentation
specified local_only, but the code and tests were using keep_local. The functionality
more closely matches local only. NOTE: It doesn't seem like any code in the wild was using
local_only as we'd not received any reports of such until PR #4606 from hedger.
Fix Issue #2281, AddPreAction() & AddPostAction() were being ignored if no action was specified when the Alias was initially created.
Handle case of "memoizer" as one member of a comma-separated --debug string - this was previously missed.
For consistency with the optparse "add_option" method, AddOption accepts an SConsOption object as a single argument (this failed previously). Calling AddOption with the full set of arguments (option names and attributes) to set up the option is still the recommended approach.
Add clang and clang++ to the default tool search orders for POSIX and Windows platforms. These will be searched for after gcc and g++, respectively. Does not affect explicitly requested tool lists. Note: on Windows, SCons currently only has builtin support for clang, not for clang-cl, the version of the frontend that uses cl.exe-compatible command line switches.
Some manpage cleanup for the gettext and pdf/ps builders.
Some clarifications in the User Guide "Environments" chapter.
Clarify documentation of Repository() in manpage and user guide.
Many grammatical and spelling fixes in the documentation.
Update Clean and NoClean documentation.
Improved Variables documentation.
Update the User Guide Command() example which now shows a target name being created from '${SOURCE.base}.out' to use a valid special attribute and to explain what's being done in the example.
Ruff/Mypy: Excluded items now synced.
Ruff: Linter includes new rules - FA, UP006, UP007, and UP037 - to
detect and upgrade legacy type-hint syntax.
Removed "SCons.Util.sctyping.py", as the functionality can now be substituted
via top-level from __future__ import annotations.
Implemented type hints for Nodes.
Added TestSCons.NINJA_BINARY to TestSCons to centralize logic to find ninja binary
Refactored SCons.Tool.ninja -> SCons.Tool.ninja_tool, and added alias so env.Tool('ninja') will still work. This avoids conflicting with the pypi module ninja.
.. code-block:: text
git shortlog --no-merges -ns 4.8.1..HEAD
50 Mats Wichmann
46 William Deegan
19 Joseph Brill
10 Alex Thiessen
4 Thaddeus Crews
3 Ruben Di Battista
2 Adam Scott
2 Keith F. Prussing
2 Prabhu Singh Khalsa
1 Adam Simpkins
1 Alex James
1 Yevhen Babiichuk (DustDFG)
From Ruben Di Battista:
- Expose extra_libs kwarg in Configure checks CheckLibWithHeader
and 'CheckLib' and forward it downstream to CheckLib
From Joseph Brill: - Added error handling when creating MSVC detection debug log file specified by SCONS_MSCOMMON_DEBUG. - MSVS: Added default HOST_ARCH values to sconstruct/sconscript environment for select msvs test scripts to allow tests to run on platforms not recognized by the msvs/msvc tool implementations. Fixes #4608. - MSVS: Fix early exit after the first msvc version loop execution in select msvs test scripts. Select msvs test scripts were being invoked for msvc version 8.0 only. Fixes #4609. - MSVS: Additional minor select msvs test script fixes as a result of the msvs tests being invoked for all msvc versions: fix vs version number for vc version 14.3, fix expected platform toolset version, add and use a default known project GUID for some select tests, add AdditionalOptions Condition to expected vcx project file. - MSVS: Additional minor changes to the msvs tool as a result of the msvs tests being invoked for all msvc versions: use environment MSVS_PROJECT_GUID when generating project files information, fix the visual studio string for VS2015, add .vcxproj as an expected suffix for assigning the name to the file basename. - MSVS: Add additional msvs tests for multi-project and solution builds. - MSVS: Check for variant directory build of MSVSSolution and adjust the source node similar to the handling for MSVSProject. The solution was generated in the build directory instead of the source directory. The placeholder solution file is not generated in the build directory and the solution file is generated in the source directory similar to the handling for project files. Fixes #4612. - MSVS: Add project dsp nodes to the dsw source node list in the msvs tool. This appears to always cause the project files to be generated before the solution files which is necessary to retrieve the project GUIDs for use in the solution file. This does change the behavior of clean for a project generated with auto_build_solution disabled and explicit solution generation: when the solution files are cleaned, the project files are also cleaned. The tests for vs 6.0-7.1 were changed accordingly. - MSVS: Add an optional keyword argument, auto_filter_projects, to MSVSSolution. Accepted values for auto_filter_projects are: - None [default]: raise an exception when solution file names or nodes are detected in the projects argument list. - True or evaluates True: automatically remove solution file names and nodes from the project argument list. - False or evaluates False: leave solution file names and nodes in the project argument list. An exception is not raised. Solution file names and/or nodes in the project argument list cause erroneous Project records to be produced in the generated solution file. As a convenience, an end-user may elect to ignore solution file names and nodes in the projects argument list rather than manually removing solution file names and nodes from the MSVSProject return values. Resolves #4613. - MSVS: Remove the platform specification (i.e., platform = 'win32') from select test script environments. The platform specification appears superfluous. - SCons C preprocessor changes: - Preserve literals that contain valid integer substring specifications. Previously, the integer suffix could be stripped from a symbol that contained an integer and suffix substring. - Update the optional integer suffixes to include the z|Z and wb|WB suffixes. - Update the optional integer suffixes to include support for alternate orderings of unsigned with long or long long as defined in the c/cpp grammar. - Update the optional integer suffixes for case insensitive specifications as defined in the c/cpp grammar. - Add support for binary integer constants. - Add support for octal integer constants. Previously, octal integers were evaluated as decimal integers. A literal zero (0) is treated as an octal number. - Change the attempted conversion of a define expansion from using int() to a constant expression evaluation.
From Thaddeus Crews:
- Removed Python 3.6 support.
- Ruff/Mypy: Excluded items now synced.
- Ruff: Linter includes new rules - FA, UP006, UP007, and UP037 - to
detect and upgrade legacy type-hint syntax.
- Removed "SCons.Util.sctyping.py", as the functionality can now be substituted
via top-level from __future__ import annotations.
- Implemented type hints for Nodes.
From William Deegan:
- Update ninja tool to use ninja.BIN_DIR to find pypi packaged ninja binary.
python ninja package version 1.11.1.2 changed the location and previous
logic no longer worked.
- Added TestSCons.NINJA_BINARY to TestSCons to centralize logic to find ninja binary
- Refactored SCons.Tool.ninja -> SCons.Tool.ninja_tool, and added alias so
env.Tool('ninja') will still work. This avoids conflicting with the pypi module ninja.
- Renamed env.Help() & Help()'s argument keep_local to local_only, previously the documentation
specified local_only, but the code and tests were using keep_local. The functionality
more closely matches local only. NOTE: It doesn't seem like any code in the wild was using
local_only as we'd not received any reports of such until PR #4606 from hedger.
- Fix Issue #2281, AddPreAction() & AddPostAction() were being ignored if no action
was specified when the Alias was initially created.
From Alex James: - On Darwin, PermissionErrors are now handled while trying to access /etc/paths.d. This may occur if SCons is invoked in a sandboxed environment (such as Nix).
From Prabhu S. Khalsa: - Fix typo in man page
From Dillan Mills:
- Fix support for short options (-x).
From Keith F Prussing: - Added support for tracking beamer themes in the LaTeX scanner.
From Adam Scott:
- Changed Ninja's TEMPLATE rule pool to use install_pool instead of
local_pool, hoping it will fix a race condition that can occurs when
Ninja defers to SCons to build.
From Alex Thiessen: - Many grammatical and spelling fixes in the documentation.
From Mats Wichmann: - PackageVariable now does what the documentation always said it does if the variable is used on the command line with one of the enabling string as the value: the variable's default value is produced (previously it always produced True in this case). - Minor updates to test framework. The functional change is that test.must_exist() and test.must_exist_one_of() now take an optional 'message' keyword argument which is passed on to fail_test() if the test fails. The rest is cleanup and type annotations. Be more careful that the returns from stderr() and stdout(), which can return None, are not used without checking. - The optparse add_option method supports an additional calling style that is not directly described in SCons docs, but is included by reference ("see the optparse documentation for details"): a single arg consisting of a premade option object. Because optparse detects that case based on seeing zero kwargs and we always added at least one (default=) that would fail for AddOption. Fix for consistency, but don't advertise it further - not added to manpage synopsis/description. - Temporary files created by TempFileMunge() are now cleaned up on scons exit, instead of at the time they're used. Fixes #4595. - Override environments, created when giving construction environment keyword arguments to Builder calls (or manually, through the undocumented Override method), were modified not to "leak" on item deletion. The item will now not be deleted from the base environment. Override Environments now also pretend to have a _dict attribute so that regular environment methods don't have a problem if passed an OE instance. - Fix a problem with compilation_db component initialization - the entries for assembler files were not being set up correctly. - Add clang and clang++ to the default tool search orders for POSIX and Windows platforms. These will be searched for after gcc and g++, respectively. Does not affect explicitly requested tool lists. Note: on Windows, SCons currently only has builtin support for clang, not for clang-cl, the version of the frontend that uses cl.exe-compatible command line switches. - Some manpage cleanup for the gettext and pdf/ps builders. - Some clarifications in the User Guide "Environments" chapter. - Fix nasm test for missing include file, cleanup. - Change long-standing irritant in Environment tests - instead of using a while loop to pull test info from a list of tests and then delete the test, structure the test data as a list of tuples and iterate it. - Skip running a few validation tests if the user is root and the test is not designed to work for the root user. - Clarify documentation of Repository() in manpage and user guide. - Add a tag to each CacheDir to let systems ignore backing it up (per https://bford.info/cachedir/). Update the way a CacheDir is created, since it now has to create two files. - The Dictionary method now has an as_dict flag. If true, Dictionary always returns a dict. The default remains to return different types depending on whether zero, one, or multiple construction variable names are given. - Update Clean and NoClean documentation. - Make sure unknown variables from a Variables file are recognized as such. Previously only unknowns from the command line were recognized (issue #4645). - A Variables object now makes available a "defaulted" attribute, a list of variable names that were set in the environment with their values taken from the default in the variable description (if a variable was set to the same value as the default in one of the input sources, it is not included in this list). - If a build Variable is created with no aliases, the name of the Variable is no longer listed in its aliases. Internally, the name and aliases are considered together anyway so this should not have any effect except for being visible to custom help text formatters. - A build Variable is now a dataclass, with initialization moving to the automatically provided method; the Variables class no longer writes directly to a Variable (makes static checkers happier). - Improved Variables documentation. - The (optional) C Conditional Scanner now does limited macro replacement on the contents of CPPDEFINES, to improve finding deps that are conditionally included. Previously replacement was only done on macro definitions found in the file being scanned. Only object-like macros are replaced (not function-like), and only on a whole-word basis; recursion is limited to five levels and does not error out if that limit is reached (issue #4523). - Minor modernization: make use of stat object's st_mode, st_mtime and other attributes rather than indexing into stat return. - The update-release-info test is adapted to accept changed help output introduced in Python 3.12.8/3.13.1. - Update the User Guide Command() example which now shows a target name being created from '${SOURCE.base}.out' to use a valid special attribute and to explain what's being done in the example. - Test framework reformatted using settings from pyproject.toml. Includes code embedded in docstrings. - Handle case of "memoizer" as one member of a comma-separated --debug string - this was previously missed. - test YACC/live.py fixed - finally started failing on an "old-style" (K&R flavor) function declaration, updated. - Test framework - add recognizing list-of-path-components for the destination of fixtures too (matches docstrings now).
A new SCons release, 4.8.1, is now available on the SCons download page:
A new SCons release, 4.8.1, is now available on the SCons download page:
Here is a summary of the changes since 4.8.0:
env.Dump() previously accepted a single optional "key" argument. It now accepts any number of optional "key" arguments; any supplied keys will be serialized with their values in a Python dict style. As a result there is a small change in behavior: if a single key argument is given, where it previously would return a string containing just the value, now it will return a string that looks like a dictionary including the key. For example, from "'gcc'" to "{'CC': 'gcc'}". This should not have any impact as the result of calling Dump is intended for diagnostic output, not for use by other interfaces.
SCons 4.8.0 added an __all__ specifier at the top of the Variables module (Variables/__init__.py) to control what is made available in a star import. However, there was existing usage of doing from SCons.Variables import * which expected the variable types to be avaiable. BoolVariable, EnumVariable, ListVariable, PackageVariable and PathVariable are added to __all__, so this form of import should now work again.
Fix a problem with AppendUnique and PrependUnique where a value could be erroneously removed due to a substring match.
Fix handling of ListVariable when supplying a quoted choice containing a space character (issue #4585).
On win32 platform, SCons 4.7.0 modified the determination of the output encoding of piped processes. Instead of using the default encoding, it relied on the encoding attribute of the output stream. If the encoding attribute of the output stream was set to None, it was triggering an invalid argument exception. This was the case with streams of type io.StringIO for example. This has been changed to always use the oem encoding which should be the encoding in the shell where the command was spawned.
Improve wording of manpage "Functions and Environment Methods" section.
Make doc function signature style more consistent - tweaks to AddOption, DefaultEnvironment and Tool,.
sctypes is_* functions given explicit return types. Python 3.13+ uses TypeIs for a near-equivalent of isinstance. Python 3.10 through 3.12 uses TypeGuard, a less accurate implementation but still provides usable type hinting. Python 3.9 and earlier simply returns bool, same as before.
git shortlog --no-merges -ns 4.8.0..HEAD
9 Mats Wichmann
8 William Deegan
1 SIEGRIST Anthony
1 Thaddeus Crews
1 siegria
From Thaddeus Crews:
- Add explicit return types to sctypes is_* functions. For Python <=3.9,
the return type is simply bool, same as before. Python 3.10 and later
will benefit from TypeGuard/TypeIs, to produce intellisense similar
to using isinstance directly.
From Anthony Siegrist; - On win32 platform, handle piped process output more robustly. Output encoding now uses 'oem' which should be the systems default encoding for the shell where the process is being spawned.
From Mats Wichmann:
- env.Dump() now considers the "key" positional argument to be a varargs
type (zero, one or many). However called, it returns a serialized
result that looks like a dict. Previously, only a single "key" was
accepted, and unlike the zero-args case, it was serialized to a
string containing just the value (without the key). For example, if
"print(repr(env.Dump('CC'))" previously returned "'gcc'", it will now
return "{'CC': 'gcc'}".
- Add a timeout to test/ninja/default_targets.py - it's gotten stuck on
the GitHub Windows action and taken the run to the full six hour timeout.
Usually runs in a few second, so set the timeout to 3min (120).
- SCons 4.8.0 added an __all__ specifier at the top of the Variables
module (Variables/__init__.py) to control what is made available in
a star import. However, there was existing usage of doing
from SCons.Variables import * which expected the variable types
to be available. While we never advertised this usage, there's no
real reason it shouldn't keep working - add to __all__.
- Switch SCons build to use setuptools' supported version fetcher from
the old homegrown one.
- Improve wording of manpage "Functions and Environment Methods" section.
Make doc function signature style more consistent - tweaks to AddOption,
DefaultEnvironment and Tool,.
- Fix a problem with AppendUnique and PrependUnique where a value could
be erroneously removed due to a substring match.
- Fix handling of ListVariable when supplying a quoted choice containing
a space character (issue #4585).
Mark Python 3.6 support as deprecated. Use --warn=no-python-version to quiet the warning.
A new SCons release, 4.8.0, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.7.0:
lf, with the exception of a few
Windows-only files using crlf instead. Any files not already fitting
this format have been explicitly converted... code-block:: text
git shortlog --no-merges -ns 4.7.0..HEAD
70 Mats Wichmann
35 Joseph Brill
26 William Deegan
7 Raymond Li
7 Thaddeus Crews
From Joseph Brill: - For msvc version specifications without an 'Exp' suffix, an express installation is used when no other edition is detected for the msvc version. Similarly, an express installation of the IDE binary is used when no other IDE edition is detected. - VS2015 Express (14.0Exp) does not support the sdk version argument. VS2015 Express does not support the store argument for target architectures other than x86. Script argument validation now takes into account these restrictions. - VS2015 BuildTools (14.0) does not support the sdk version argument and does not support the store argument. Script argument validation now takes into account these restrictions. - The Windows SDK for Windows 7 and .NET Framework 4" (SDK 7.1) populates the registry keys in a manner in which the msvc detection would report that VS2010 (10.0) is installed when only the SDK was installed. The installed files are intended to be used via the sdk batch file setenv.cmd. The installed msvc batch files will fail. The msvc detection logic now ignores SDK-only VS2010 installations. Similar protection is implemented for the sdk-only installs that populate the installation folder and registry keys for VS2008 (9.0), if necessary. - For VS2005 (8.0) to VS2015 (14.0), vsvarsall.bat is employed to dispatch to a dependent batch file when configuring the msvc environment. Previously, only the existence of the compiler executable was verified. In certain installations, the dependent batch file (e.g., vcvars64.bat) may not exist while the compiler executable does exist resulting in build failures. The existence of vcvarsall.bat, the dependent batch file, and the compiler executable are now validated. - MSVC configuration data specific to versions VS2005 (8.0) to VS2008 (9.0) was added as the dependent batch files have different names than the batch file names used for VS2010 (10.0) and later. The VS2008 (9.0) Visual C++ For Python installation is handled as a special case as the dependent batch files are: (a) not used and (b) in different locations. - When VS2008 (9.0) Visual C++ For Python is installed using the ALLUSERS=1 option (i.e., msiexec /i VCForPython27.msi ALLUSERS=1), the registry keys are written to HKEY_LOCAL_MACHINE rather than HKEY_CURRENT_USER. An entry was added to query the Visual C++ For Python keys in HKLM following the HKCU query, if necessary. - For VS2008, a full development edition (e.g., Professional) is now selected before a Visual C++ For Python edition. Prior to this change, Visual C++ For Python was selected before a full development edition when both editions are installed. - The registry detection of VS2015 (14.0), and earlier, is now cached at runtime and is only evaluated once for each msvc version. - The vswhere executable is frozen upon initial detection. Specifying a different vswhere executable via the construction variable VSWHERE after the initial detection now results in an exception. Multiple bugs in the implementation of specifying a vswhere executable via the construction variable VSWHERE have been fixed. Previously, when a user specified vswhere executable detects new msvc installations after the initial detection, the internal msvc installation cache and the default msvc version based on the initial detection are no longer valid. For example, when no vswhere executable is found for the initial detection and then later an environment is constructed with a user specified vswhere executable that detects new msvc installations. - The vswhere detection of VS2017 (14.1), and later, is now cached at runtime and is only evaluated once using a single vswhere invocation for all msvc versions. Previously, the vswhere executable was invoked for each supported msvc version. - The vswhere executable locations for the WinGet and Scoop package managers were added to the default vswhere executable search list after the Chocolatey installation location. - Fix issue #4543: add support for msvc toolset versions 14.4X installed as the latest msvc toolset versions for msvc buildtools v143. The v143 msvc buildtools may contain msvc toolset versions from 14.30 to 14.4X.
From Thaddeus Crews: - GetSConsVersion() to grab the latest SCons version without needing to access SCons internals. - Migrate setup.cfg logic to pyproject.toml; remove setup.cfg. - Update .gitattributes to match .editorconfig; enforce eol settings. - Replace black/flake8 with ruff for more efficient formatting & linting. - When debugging (--debug=pdb), the filename SCsub is now recognized when manipulating breakpoints.
From Raymond Li: - Fix issue #3935: OSErrors are now no longer hidden during execution of Actions. All exceptions during the execution of an Action are now returned by value rather than by raising an exception, for more consistent behavior. NOTE: With this change, user created Actions should now catch and handle expected exceptions (whereas previously many of these were silently caught and suppressed by the SCons Action execution code).
From Ryan Carsten Schmidt: - Teach ParseFlags to put a --stdlib=libname argument into CXXFLAGS. If placed in CCFLAGS (the default location), it could be fed to the C compiler (gcc, clang) where it is not applicable and causes a warning message.
From Mats Wichmann: - Updated Value Node docs and tests. - Python 3.13 compat: re.sub deprecated count, flags as positional args, caused update-release-info test to fail. - Dump() with json format selected now recognizes additional compound types (UserDict and UserList), which improves the detail of the display. json output is also sorted, to match the default display. - Python 3.13 (alpha) changes the behavior of isabs() on Windows. Adjust SCons usage of in NodeInfo classes to match. Fixes #4502, #4504. - Drop duplicated getstate and setstate methods in AliasNodeInfo, FileNodeInfo and ValueNodeInfo classes, as they are identical to the ones in parent NodeInfoBase and can just be inherited. - Update manpage for Tools, and for TOOL, which also gets a minor tweak for how it's handled (should be more accurate in a few situations). - Test framework now uses a subdirectory named "scons" below the base temporary directory. This gives something invariant to tell antivirus to ignore without having to exclude tmpdir itself. Fixes #4509. - MSVS "live" tests of project files adjusted to look for the generated executable with an exe sufffix - Documentation build now properly passes through skipping the PDF (and EPUB) builds of manpage and user guide; this can also be done manually if directly calling doc/man/SConstruct and doc/user/SConstruct by adding SKIP_PDF=1. This should help with distro packaging of SCons, which now does not need "fop" and other tools to be set up in order to build pdf versions which are then ignored. - Add the ability to print a Variables object for debugging purposes (provides a str method in the class). - Mark Python 3.6 support as deprecated. - Clean up Variables: more consistently call them variables (finish the old change from Options) in docstrings, etc.; some typing and other tweaks. Update manpage and user guide for Variables usage. - Regularize internal usage of Python version strings and drop one old Python 2-only code block in a test. - scons-time tests now supply a "filter" argument to tarfile.extract to quiet a warning which was added in Python 3.13 beta 1. - Improved the conversion of a "foreign" exception from an action into BuildError by making sure our defaults get applied even in corner cases. Fixes #4530. - Restructured API docs build (Sphinx) so main module contents appear on a given page before the submodule docs, not after. Also tweaked the Util package doc build so it's structured more like the other packages (a missed part of the transition when it was split). - Updated manpage description of Command "builder" and function. - Framework for scons-time tests adjusted so a path with a long username Windows has squashed doesn't get re-expanded. Fixes a problem seen on GitHub Windows runner which uses a name "runneradmin". - SCons.Environment.is_valid_construction_var() now returns a boolean to match the convention that functions beginning with "is" have yes/no answers (previously returned either None or an re.match object). Now matches the annotation and docstring (which were prematurely updated in 4.6). All SCons usage except unit test was already fully consistent with a bool. - When a variable is added to a Variables object, it can now be flagged as "don't perform substitution" by setting the argument subst. This allows variables to contain characters which would otherwise cause expansion. Fixes #4241. - The test runner now recognizes the unittest module's return code of 5, which means no tests were run. SCons/Script/MainTests.py currently has no tests, so this particular error code is expected - should not cause runtest to give up with an "unknown error code". - Updated the notes about reproducible builds with SCons and the example. - The Clone() method now respects the variables argument (fixes #3590) - is_valid_construction_var() (not part of the public API) moved from SCons.Environment to SCons.Util to avoid the chance of import loops. Variables and Environment both use the routine and Environment() uses a Variables() object so better to move to a safer location. - Performance tweak: the setitem method of an Environment, used for setting construction variables, now uses the string method isidentifier to validate the name (updated from microbenchmark results). - AddOption and the internal add_local_option which AddOption calls now recognize a "settable" keyword argument to indicate a project-added option can also be modified using SetOption. Fixes #3983. NOTE: If you were using ninja and using SetOption() for ninja options in your SConscripts prior to loading the ninja tool, you will now see an error. The fix is to move the SetOption() to after you've loaded the ninja tool. - ListVariable now has a separate validator, with the functionality that was previously part of the converter. The main effect is to allow a developer to supply a custom validator, which previously could be inhibited by the converter failing before the validator is reached. - Regularized header (copyright, licens) at top of documentation files using SPDX. - Updated introductory section of manual page. - Minor cleanups in tests - drop unused "% locals()" stanzas.
Dropped three unused warning classes: DeprecatedSourceCodeWarning, TaskmasterNeedsExecuteWarning, DeprecatedMissingSConscriptWarning.
A new SCons release, 4.7.0, is now available on the SCons download page:
Here is a summary of the changes since 4.6.0:
Method unlink_files was added to the TestCmd class that unlinks a list of files from a specified directory. An attempt to unlink a file is made only when the file exists; otherwise, the file is ignored.
Add an optional argument list string to configure's CheckFunc method so that the generated function argument list matches the function's prototype when including a header file. Fixes GH Issue #4320
Now supports pre-release Python 3.13
Support for Python versions without support for the threading package has been removed
Dropped three unused warning classes: DeprecatedSourceCodeWarning, TaskmasterNeedsExecuteWarning, DeprecatedMissingSConscriptWarning.
Two warning classes that are actually used were added to manpage section on enabling warnings (cache-cleanup-error, future-reserved-variable).
Fix of the --debug=sconscript option to return exist statements when using return statement with stop flag enabled
MSVS: prevent overwriting the SCons environment variable SCONS_HOME with the OS environment value of SCONS_HOME in the msvs tool.
MSVC: Fix the detection of Visual Studio 2015 Express ('14.0Exp') by adding a registry key definition and updating the installation root-relative registry value at runtime for the location of the VC folder.
MSVS: Fix the msvs project generation test for MSVS 6.0 to use the correct name of the generated project file.
MSVS: Fix the msvs project generation test scripts so that "false positive" tests results are not possible when the initial build is successful and the command-line build of the project file fails.
On Windows platform, when collecting command output (Configure checks), make sure decoding of bytes doesn't fail.
Documentation indicated that both Pseudo() and env.Pseudo() were usable, but Pseudo() did not work; is now enabled.
Improve handling of file data that SCons itself processes - as in scanners - try harder to decode non-UTF-8 text.
PyPackageDir no longer fails if passed a module name which cannot be found, now returns None.
Add locking around creation of CacheDir config file. Fixes issue #4489.
Use of NotImplemented instead of NotImplementedError for special methods of _ListVariable class
The NewParallel scheduler is now the default, the tm_v2 flag is removed, and the old scheduler is opt-in under --experimental=legacy_sched. Additionally, the new scheduler is now used for -j1 builds as well. NOTE: This should significantly improve SCons performance for larger parallel builds
(Larger -j values)
CacheDir writes no longer happen within the taskmaster critical section, and therefore can run in parallel with both other CacheDir writes and the taskmaster DAG walk.
The NewParallel scheduler now only adds threads as new work requiring execution is discovered, up to the limit set by -j. This should reduce resource utilization when the achievable parallelism in the DAG is less than the -j limit.
Dumping an environment with json formatting will now explicitly specify if a given value cannot be serialized.
Remove unnecessary dependencies on pypi packages from setup.cfg
SCons documentation build can now be controlled through SKIP_DOC variable - rather than just true/false can now specify skip none, skip all, skip pdf docs, skip api docs.
Fixed the Scanner examples in the User Guide to be runnable and added some more explanation. Clarified discussion of the scanner function in the Scanner Objects section of the manpage.
The manpage entry for Pseudo was clarified.
The manpage entry for SharedLibrary was clarified.
Update API docs for Warnings framework; add two warns to manpage enable/disable control.
More consistent use of &Python; in the manpage. A few links added. A warning about overwriting env['ENV'] and one about Configure checks possibly not running in in no-exec mode also added.
Clarify how SCons finds the project top directory, and what that is used for.
Clarify MergeFlags usage of a dict argument.
Fix sphinx config to handle SCons versions with post such as: 4.6.0.post1
Created SCons.Util.sctyping to contain complex type information, allowing for repo-wide type hinting without causing cyclical dependencies.
git shortlog --no-merges -ns 4.6.0..HEAD
26 Andrew Morrow
24 Mats Wichmann
14 William Deegan
7 Joseph Brill
6 StenGruener
3 Prabhu S. Khalsa
3 Thaddeus Crews
2 fazledyn-or
1 Michał Górny
1 Piotr Siupa
From Ataf Fazledin Ahamed: - Use of NotImplemented instead of NotImplementedError for special methods of _ListVariable class
From Joseph Brill: - Fix issue #2755: the msvs tool no longer writes the OS environment SCONS_HOME value into the SCons environment when the SCONS_HOME variable already exists in the SCons environment. Prior to this change, a valid user-defined SCons environment value for SCONS_HOME would be overwritten with the OS environment value of SCONS_HOME which could be None (i.e., undefined). - Update the windows registry keys for detection of Visual Studio 2015 Express ('14.0Exp'): the VS2015 registry key ('WDExpress') appears to be different than the registry key ('VCExpress') for earlier Visual Studio express versions. The registry key value is relative to the installation root rather than the VC folder and requires additional path components during evaluation. - Fix the vs-6.0-exec.py test script: the msvs generated project is 'foo.dsp' and the command-line invocation of the Visual Studio development environment program was attempting to build 'test.dsp'. The command-line invocation was changed to build 'foo.dsp'. - Update the msvs project generation test scripts: the msvs project execution tests could produce a "false positive" test result when the test executable is correctly built via the SConstruct env.Program() call and the command-line invocation of the Visual Studio development environment program fails. The test passes due to the existence of the test executable from the initial build. The tests were modified to delete the test executable, object file, and sconsign file prior to the command-line invocation of the VS development binary. - Method unlink_files was added to the TestCmd class that unlinks a list of files from a specified directory. An attempt to unlink a file is made only when the file exists; otherwise, the file is ignored. - Fix issue #4320: add an optional argument list string to configure's CheckFunc method so that the generated function argument list matches the function's prototype when including a header file.
From Thaddeus Crews:
- Explicitly wrap non-serializable values in json dump
- Implemented SCons.Util.sctyping as a safe means of hinting complex types. Currently
only implemented for Executor as a proof-of-concept.
From William Deegan: - Fix sphinx config to handle SCons versions with post such as: 4.6.0.post1
From Michał Górny: - Remove unnecessary dependencies on pypi packages from setup.cfg
From Sten Grüner: - Fix of the --debug=sconscript option to return exist statements when using return statement with stop flag enabled
From Prabhu S. Khalsa: - Fix typo in user documentation (issue #4458)
From Andrew Morrow:
- The NewParallel scheduler is now the default, the tm_v2 flag is removed,
and the old scheduler is opt-in under --experimental=legacy_sched. Additionally,
the new scheduler is now used for -j1 builds as well.
- A python interpreter with support for the threading package is now required,
and this is enforced on startup. SCons currently sets its minimum supported
Python to 3.6, and it was not until Python 3.7 where threading became
default supported. In practice, we expect most real world Python 3.6 deployments
will have threading support enabled, so this will not be an issue.
- CacheDir writes no longer happen within the taskmaster critical section,
and therefore can run in parallel with both other CacheDir writes and the
taskmaster DAG walk.
- The NewParallel scheduler now only adds threads as new work requiring execution
is discovered, up to the limit set by -j. This should reduce resource utilization
when the achievable parallelism in the DAG is less than the -j limit.
From Mats Wichmann: - Add support for Python 3.13 (as of alpha 2). So far only affects expected bytecodes in ActionTests.py. - sconsign cleanup - remove some dead code, minor manpage tweaks. - Be more cautious about encodings fetching command output on Windows. Problem occurs in piped-spawn scenario, used by Configure tests. Fixes #3529. - Clarify/fix documentation of Scanners in User Guide and Manpage. Fixes #4468. - Fix bad typing in Action.py: process() and strfunction(). - Add Pseudo() to global functions, had been omitted. Fixes #4474. - Improve handling of file data that SCons itself processes - try harder to decode non-UTF-8 text. SCons.Util.to_Text now exists to convert a byte stream, such as "raw" file data. Fixes #3569, #4462. The Pseudo manpage entry was updated to provide more clarity. - Clarify how SCons finds the project top directory, and what that is used for. - The internal routine which implements the PyPackageDir function would fail with an exception if called with a module which is not found. It will now return None. Updated manpage entry and docstring.. - Doc update: standardized on the use of a new entity &MSVC; to describe the Microsoft C++ compiler. Update the version table slightly. Amplified the usage of MSVC_VERSION. - Improve SharedLibrary docs a bit. - More consistent use of &Python; in the manpage. A few links added. A warning about overwriting env['ENV'] and one about Configure checks possibly not running in in no-exec mode also added. - Update warnings module: adds docstrings, drop three unused warnings (DeprecatedSourceCodeWarning, TaskmasterNeedsExecuteWarning, DeprecatedMissingSConscriptWarning) add two warnings to manpage (cache-cleanup-error, future-reserved-variable), improve unittest, tweak Sphinx build. - Add locking around creation of CacheDir config file. Fixes #4489. - Clarify MergeFlags usage of a dict argument. - SCons documentation build can now be controlled through SKIP_DOC variable - rather than just true/false can now specify skip none, skip all, skip pdf docs, skip api docs.
Nothing published for this version
A new SCons release, 4.6.0, is now available on the SCons download page:
A new SCons release, 4.6.0, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.5.2:
Mkdir which can happen when two SConscript
are processed simultaneously by two separate build commands.kpsewhich glossaries.sty fails... code-block:: text
git shortlog --no-merges -ns 4.5.2..HEAD
97 Mats Wichmann
39 William Deegan
20 Joseph Brill
12 Alex Burton
4 StenGruener
2 Jonathon Reinhart
2 LiuYinCarl
2 Max Bachmann
1 Kenshin
1 Shohei YOSHIDA
1 Vitaly Cheptsov
From Max Bachmann: - Add missing directories to searched paths for mingw installs
From Joseph Brill: - Fix issue #4312: the cached installed msvc list had an indirect dependency on the target architecture in the environment dictionary. The first call to construct the installed msvc list now forces the target architecture to be undefined, constructs the installed msvc list, and then restores the original target architecture. Note: an indirect dependency on the VSWHERE construction variable in the environment remains. - Fix issue #4312: explicitly guard against an empty regular expression list when msvc is not installed. - When trying to find a valid msvc batch file, check that the compiler executable (cl.exe) exists for VS6 to VS2015 to avoid executing the msvc batch file. Always check that the compiler executable is found on the msvc script environment path after running the msvc batch file. Only use the sdk batch files when all of the msvc script host/target combinations have been exhausted and a valid script was not found. - Add ARM64 host configurations for windows and msvc. Note: VS2013 and earlier has not been tested on ARM64. - If necessary, automatically define VSCMD_SKIP_SENDTELEMETRY for VS2019 and later on ARM64 hosts when using an arm32 build of python to prevent a powershell dll not found error pop-up window. - Fix an issue where test SConfTests.py would fail when mscommon debugging was enabled. The mscommon debug filter class registered with the logging module was refactored. - Add arm64 to the MSVS supported architectures list for VS2017 and later to be consistent with the current documentation of MSVS_ARCH. - Fix an issue with an unhandled MissingConfiguration exception due to an msvc registry query that returns a path that does not exist. Multiple invocation paths were not prepared to handle the MissingConfiguration exception. The MissingConfiguration exception type was removed. - The MSCommon module import was changed from a relative import to a top-level absolute import in the following Microsoft tools: midl, mslib, mslink, mssdk, msvc, msvs. Moving any of these tools that used relative imports to the scons site tools folder would fail on import (i.e., the relative import paths become invalid when moved). - The detection of the msvc compiler executable (cl.exe) has been modified: * The host os environment path is no longer evaluated for the existence of the msvc compiler executable when searching the detection dictionary. * The existence of the msvc compiler executable is checked in the detection dictionary and the scons ENV path before the detection dictionary is merged into the scons ENV. * Different warnings are produced when the msvc compiler is not detected in the detection dictionary based on whether or not an msvc compiler was detected in the scons ENV path (i.e., a msvc compiler executable already exists in the user's ENV path prior to detection). * The warning message issued when a msvc compiler executable is not found in the detection dictionary was modified by adding the word "requested": Old warning: "Could not find MSVC compiler 'cl'." New warning: "Could not find requested MSVC compiler 'cl'.". * An additonal sentence is appended to the warning message issued when an msvc compiler executable is not found in the msvc detection dictionary and is found in the user's ENV path prior to detection: " A 'cl' was found on the scons ENV path which may be erroneous."
From Vitaly Cheptsov:
- Fix race condition in Mkdir which can happen when two SConscript
are processed simultaneously by two separate build commands.
From William Deegan: - The --debug flag now has a 'json' option which will write information generated by --debug={count, memory, time, action-timestamps} and about the build. - Obsoleted YACCVCGFILESUFFIX, being replaced by YACC_GRAPH_FILE_SUFFIX. If YACC_GRAPH_FILE_SUFFIX is not set, it will respect YACCVCGFILESUFFIX.
From Sten Grüner - The newly added --debug=sconscript option (new) will output notices when entering an exiting each SConscript as they are processed.
From Philipp Maierhöfer: - Fix gfortran tool initialization. Defaults to using binary named gfortran as would be expected, and properly set's SHFORTRAN flags to include -fPIC where previously it was only doing so for the other fortran versions (F77,..)
From Jonathon Reinhart:
- Fix another instance of int main() in CheckLib() causing failures
when using -Wstrict-prototypes.
From Mats Wichmann
- C scanner's dictifyCPPDEFINES routine did not understand the possible
combinations of CPPDEFINES - not aware of a "name=value" string either
embedded in a sequence, or by itself. The conditional C scanner thus
did not always properly apply the defines. The regular C scanner does
not use these, so was not affected. [fixes #4193]
- Minor cleanup for ValidateOptions - docs and docstring tweaked,
add missed versionadded indicator.
- Added some typing annotations generated by a tool, to eliminate manual
work in future on things which are safe for the tool to produce.
Then manually fixed up some things related to bool that the tool did
not handly ideally. For example, simple functions which just did
"return 1" were interpreted by the tool as returning int, when bool
was really the intent. Functions/methods named like "is_", "has_",
"exists" are now pretty consistently marked as "-> bool".
- Simplify some code due to pylint observation: "C2801: Unnecessarily
calls dunder method call. Invoke instance directly."
- Python 3.9 dropped the alias base64.decodestring, deprecated since 3.1.
Only used in msvs.py. Use base64.decodebytes instead.
- When debugging (--debug=pdb), the filenames SConstruct and SConscript
are now recognized when manipulating breakpoints. Previously,
only a full pathname to an sconscript file worked, as pdb requires
a .py extension to open a file that is not an absolute path.
- SCons test runner now uses pathlib to normalize and compare paths
to test files.
- D compilers : added support for generation of .di interface files.
New variables DI_FILE_DIR, DI_FILE_DIR_PREFIX, DI_FILE_DIR_SUFFIX,
DI_FILE_SUFFIX.
- Fixed: when using the mingw tool, if an msys2 Python is used (os.sep
is '/' rather than the Windows default ''), certain Configure checks
could fail due to the construction of the path to run the compiled check.
- Added effort to find mingw if it comes from Chocolatey install of msys2.
- Minor doc fixes: signature of Alias() now matches implementation
to avoid problem if kwargs used; case of Alias with no targets is
mentioned in text (was already shown in example); now mention that
Action([item]) does not return a ListAction - previously implied
that if arg was a list, a ListAction was always returned; mention
default Decider and sort the names of available decider functions,
and add a version marking. Minor fiddling with Alias.py docstrings.
- Python 3.12 support: new bytecodes for ActionTests.py, adapt to
changes to pathlib module in runtest.py (PosixPath no longer
converts slashes if given a Windows-style path). Also switch to
using subTest in ActionTests, so that we can see all 21 fails
due to bytecode changes (previously testcases aborted on the first
assert fail so we only saw seven), and use unittest asserts to
simplify complex printing stanzas.
- Added copyright headers to files in test/ that didn't have them.
- Drop three unused methods from the Environment Base class:
get_src_sig_type and get_tgt_sig_type, as well as "private"
_changed_source. These were orphaned when the long-deprecated
Source Signatures and Target Signatures were removed, these were
missed at that time.
- Remove dead code: some mocked classes in unit tests had methods
which have been removed from the Node class they're mocking,
there's no need to shadow those any more as there are no callers.
The methods are depends_on (base functionality removed in 2005)
and is_pseudeo_derived (base functionality removed in 2006). There
may well be more!
- Added pass_test() call to test/MSVC/MSVC_BATCH-spaces-targetdir.py.
It looked it was missing a more detailed check, but it should be
sufficient just to check the build worked. Renamed the fixture
dir to follow naming convention in test/MSVC overall, and added
a sconstest.skip file, also to follow convention.
- Marked some scanner methods as @staticmethod.
- Class ActionBase is now an abstract base class to more accurately
reflect its usage. Derived _ActionAction inherits the ABC, so it
now declares (actually raises NotImplementedError) two methods it
doesn't use so it can be instantiated by unittests and others.
- The yacc tool now understands the bison behavior of --header,
--defines and --graph being called without option-argument as being
synonyms for -d (first two) and -g. -H also recognized as a synonym
for -d. Default value for $YACC_GRAPH_FILE_SUFFIX changed to '.gv'
to match current bison default (since bison 3.8). Set this variable
to '.dot' if using byacc. The graph file name (-g) is now generated
relative to the requested target file name, not to the source file
name, to match actual current behavior (only affects if target
explicitly requested with a different base name
than source). Docs updated. Fixes #4326 and #4327.
- Cleaned up dblite module (checker warnings, etc.).
- Some cleanup in the FortranCommon tool.
- Rewrite the internal _subproc routine - a new scons_subproc_run() now
makes use of Python's subprocess.run in a more natural way, getting
around some of the issues with attempted context manager use, fetching
output, etc. - we let the subprocess module do the hard work,
since it's well debugged and supported. _subproc is no longer
called by internal code, but remains in place in case there are builds
which call to it (even though it was never "published API").
- Changed the message about scons -H to clarify it shows built-in options.
- Improve CacheDir() Documentation.
- Release-building setup tweaked. (most of) the targets listed in
SCons' own "scons --help" now work again.
- Fix platform unit test on Windows for Py 3.12+. Fixes #4376.
- More tweaking of test framework overview (which is duplicated onto
the website, but not in the regular documentation section).
- Extend range of recognized Java versions to 20.
- Builder calls now accept PathLike objects in source lists. Fixes #4398.
- The Help() function now takes an additional keyword argument
keep_local: when starting to build a help message, you can now
retain help from AddOption calls, but omit help for SCons' own
command-line options with "Help(newtext, append=True, local_only=True)".
- A little more code "modernization", done via "pypgrade" tool set
to "3.6 and above" setting.
- Finish the change to make calling SConscript() with a nonexistent
file an error. It has issued a warning since 3.0, with "warn instead
of fail" deprecated since 3.1. Fixes #3958.
- Minor (non-functional) cleanup of some tests, particuarly test/MSVC.
- Added more error handling while reading msvc config cache.
(Enabled/specified by SCONS_CACHE_MSVC_CONFIG).
The existing cache will be discarded if there's a decode error reading it.
It's possible there's a race condition creating this issue in certain CI
builds. Also add a simple filesystem-based locking protocol to try to
avoid the problem occuring.
- Update the first two chapters on building with SCons in the User Guide.
- Update docs on Export/Import - make sure mutable/immutable status has
been mentioned.
- Some cleanup to the Util package, including renaming SCons.Util.types
to SCons.Util.sctypes to avoid any possible confusion with the
Python stdlib types module.
- TeX tests: skip tests that use makeindex or epstopdf not installed, or
if kpsewhich glossaries.sty fails.
- Added a .note.GNU-stack section to the test assembler files to
avoid the GNU linker issuing warnings for its absence.
- Eliminate more http: references (mostly in comments/docstrings where
they really weren't harmful). A few links labeled dead with no alt.
- Add JDK 21 LTS support
- Add a LIBLITERALPREFIX variable which can be set to the linker's
prefix for considering a library argument unmodified (e.g. for the
GNU linker, the ':' in '-l:libfoo.a'). Fixes Github issue #3951.
- Update PCH builder docs with some usage notes.
A new SCons release, 4.5.2, is now available on the SCons download page:
A new SCons release, 4.5.2, is now available on the SCons download page:
Here is a summary of the changes since 4.5.1:
Fix a problem (#4321) in 4.5.0/4.5.1 where ParseConfig could cause an exception in MergeFlags when the result would be to add preprocessor defines to existing CPPDEFINES. The following code illustrates the circumstances that could trigger this:
env=Environment(CPPDEFINES=['a']) env.Append(CPPDEFINES=['b']) env.MergeFlags({'CPPDEFINES': 'c'})
Remove the redundant wheel dependency from pyproject.toml, as it is added automatically by the setuptools PEP517 backend.
git shortlog --no-merges -ns 4.5.1..HEAD
3 Mats Wichmann
2 William Deegan
1 Michał Górny
From Michał Górny:
- Remove the redundant wheel dependency from pyproject.toml,
as it is added automatically by the setuptools PEP517 backend.
From Mats Wichmann - Fix a problem (#4321) in 4.5.0/4.5.1 where ParseConfig could cause an exception in MergeFlags when the result would be to add preprocessor defines to existing CPPDEFINES. The following code illustrates the circumstances that could trigger this: env=Environment(CPPDEFINES=['a']) env.Append(CPPDEFINES=['b']) env.MergeFlags({'CPPDEFINES': 'c'})
A new SCons release, 4.5.1, is now available on the SCons download page:
A new SCons release, 4.5.1, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.5.0:
git shortlog --no-merges -ns 4.5.0..HEAD
3 William Deegan
1 Mats Wichmann
If you are still using SCons to build QT 3 code, you'll need to update your SConscripts. Note that using 'qt' tool has been deprecated for some time.
A new SCons release, 4.5.0, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.4.0:
NOTE: If you build with Python 3.10.0 and then rebuild with 3.10.1 (or higher), you may see unexpected rebuilds. This is due to Python internals changing which changed the signature of a Python Action Function.
NOTE: If you use a dictionary to specify your CPPDEFINES, you may see an unexpected rebuild. The insertion order of dictionary keys is now preserved when generating the command line. Previously these were sorted alphabecially. This change to the command line, while generating identical set of CPPDEFINES can change order and cause a rebuild.
.. code-block:: text
git shortlog --no-merges -ns 4.4.0..HEAD
93 Mats Wichmann
85 William Deegan
9 Anatoli Babenia
8 Daniel Moody
4 Andrew Morrow
3 Ryan Saunders
2 Flaviu Tamas
1 Dan Mezhiborsky
1 Lukas Schrangl
1 Nickolai Korshunov
1 TZe
1 Thad Guidry
1 djh
From Anatoli Babenia: - Do not initialize DefaultEnvironment when calling EnsureSConsVersion(), EnsurePythonVersion(), Exit(), GetLaunchDir() and SConscriptChdir(). - Remove unused private method SConsEnvironment._exceeds_version().
From William Deegan: - Added ValidateOptions() which will check that all command line options are in either those specified by SCons itself, or by AddOption() in SConstruct/SConscript. It should not be called until all AddOption() calls are completed. Resolves Issue #4187 - Refactored SCons/Taskmaster into a package. Moved SCons/Jobs.py into that package. NOTE: If you hook into SCons.Jobs, you'll have to change that to use SCons.Taskmaster.Jobs - Changed the Taskmaster trace logic to use python's logging module. The output formatting should remain (mostly) the same. Minor update to unittest for this to adjust for 1 less newline. - Migrated logging logic for --taskmastertrace to use Python's logging module. Added logging to NewParallel Job class (Andrew Morrow's new parallel job implementation) - Ninja: Fix execution environment sanitation for launching ninja. Previously if you set an execution environment variable set to a python list it would crash. Now it will create a string joining the list with os.pathsep - Move execution environment sanitation from Action.subproc() to SCons.Util.sanitize_shell_env(ENV) - Moved rpm and debian directories under packaging - Added logic to help packagers enable reproducible builds into packaging/etc/. Please read packaging/etc/README.txt if you are interested. - Added --experimental=tm_v2, which enables Andrew Morrow's new NewParallel Job implementation. This should scale much better for highly parallel builds. You can also enable this via SetOption(). - Fixed command line argument --diskcheck: previously a value of 'none' was ignored. SetOption('diskcheck','none') is unaffected, as it did not have the problem. - Added overrides argument to SCons.Subst.scons_subst(), subst_list(), subst(), and Action's process(), strfunction(). This allows passing a dictionary of envvars to override when evaluating subst()'d strings/lists - Fixed Issue #4275 - when outputting compilation db and TEMPFILE was in use, the compilation db would have command lines using the generated tempfile for long command lines, instead of the full command line for the compilation step for the source/target pair. - Renamed the qt tools to qt3 since the logic in that tool is only for QT version 3. Renamed all env vars which affect qt3 from QT to QT3_. If you are still using SCons to build QT 3 code, you'll need to update your SConscripts. Note that using 'qt' tool has been deprecated for some time.
From David H: - Added JAVAPROCESSORPATH construction variable which populates -processorpath. - Updated JavaScanner to scan JAVAPROCESSORPATH.
From Nickolai Korshunov - Added FILE_ENCODING, to allow explicitly setting the text encoding for files written by the Textfile() and Substfile() builders. If not specified, Textfile() and Substfile() builders will write files as UTF-8. Fixed Issue #4302.
From Dan Mezhiborsky: - Add newline to end of compilation db (compile_commands.json).
From Daniel Moody: - Added error message to handle the case when SCons attempts to retrieve all the targets for a specified builder from the CacheDir, fails to do so, and then runs into an error when deleting the files which were retrieved. Previously if this happened there was no errors or warnings. - Fix issue #2757, where Configure checks that perform a check which reads a modified source (including program, source or header file(s)) would incorrectly mark that file "up to date" so the actual build would not see the file as modified. Leading to incorrect incremental builds. Now configure checks now clear node info for non conftest nodes, so they will be re-evaluated for the real taskmaster run when the build commences.
From Andrew Morrow
- Avoid returning UniqueList for children and other Executor APIs. This type
iterates more slowly than the builtin types. Also simplify uniquer_hashables to
use an faster implementation under the assumption of ordered dictionaries.
From Ryan Saunders: - Fixed runtest.py failure on Windows caused by excessive escaping of the path to python.exe.
From Lukas Schrangl: - Run LaTeX after biber/bibtex only if necessary
From Flaviu Tamas: - Added -fsanitize support to ParseFlags(). This will propagate to CCFLAGS and LINKFLAGS.
From Mats Wichmann: - A list argument as the source to the Copy() action function is now correctly handled by converting elements to string. Copy errors out if asked to copy a list to an existing non-directory destination. Both the implementation and the strfunction which prints the progress message were adjusted. Fixes #3009. - doc: EnsureSConsVersion, EnsurePythonVersion, Exit, GetLaunchDir and SConscriptChdir are now listed as Global functions only; the Environment versions still work but are not documented. - The Java scanner processing of JAVACLASSPATH for dependencies was changed to split on os.pathsep instead of space, to match usage of passing a path string like "xxx:yyy:zzz". This is not portable - passing a POSIX-style path string (with ':') won't work on Windows (';') - which is now documented with a hint to use a list instead to be portable. Splitting on space broke paths with embedded spaces. Fixes #4243. - Cleanup: make sure BoolVariable usage in tests and examples uses Python boolean values instead of 0/1. - Stop telling people to run "python setup.py install" in the User Guide. Adds new content on using virtualenvs to be able to have multiple different SCons versions available on one system. - Added the "DefaultEnvironment(tools=[])" stanza to a number of tests that are known to be particularly slow. It's still just a tiny speedup, but the Windows CI had been occasionally timing out, so maybe this helps a bit. - Remove an extra existence check in one ninja test that caused it to be skipped on some otherwise-valid Windows installations. - test framework tests now pass on Linux and Windows (the latter can still run into problems on some configurations), and automated tests are now run on changes in this area so future problems can be spotted. - The single-file Util module was split into a package with a few functional areas getting their own files - Util.py had grown to over 2100 lines. - Add a zipapp package of scons-local: can use SCons from a local file which does not need unpacking. - Additional explanations for MSVSProject and MSVSSolution builders. - Fix a problem (present in 4.4.0 only) where a Java inner class could not be cached because the emitted filename contained a '$' and when looked up through a node ended up generating a Python SyntaxError because it was passed through scons_subst(). - Have the gfortran tool do a better job of honoring user preferences for the dialect tools (F77, F90, F03 and F09, as well as the shared-library equivalents SHF77, SHF90, SHF03, SHF09). Previously these were unconditionally overwritten to 'gfortran'; the change should be more in line with expectations of how these variables should work. Also cleaned a few Fortran tests - test behavior does not change. - Updated MSVC documentation - adds "version added" annotations on recently added construction variables and provides a version-mapping table. - Add Python 3.12 support, and indicate 3.11/3.12 support in package. 3.12 is in alpha for this SCons release, the bytecode sequences 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.
A new SCons release, 4.4.0, is now available on the SCons download page:
A new SCons release, 4.4.0, is now available on the SCons download page:
https://scons.org/pages/download.html
Here is a summary of the changes since 4.3.0:
NOTE: If you build with Python 3.10.0 and then rebuild with 3.10.1 (or higher), you may see unexpected rebuilds. This is due to Python internals changing which changed the signature of a Python Action Function.
On Windows, %AllUsersProfile%\scons\site_scons is now the default "system"
location for a site_scons directory.
%AllUsersProfile%\Application Data\scons\site_scons will continue to work.
There does not seem to be any existing convention to use an
"Application Data" subdirectory here.
Action._subproc() can now be used as a python context manager to ensure that the POpen object is properly closed.
SCons help (-H) no longer prints the "ignored for compatibility" options, which are still listed in the manpage.
Help is now sensitive to the size of the terminal window: the width of the help text will scale to wider (or narrower) terminals than 80 characters.
Ninja: Changed generated build.ninja file to run SCons only build Actions via a SCons Deamon. Added logic for starting and connecting to SCons daemon (currently only used for ninja)
The change to "content" and "content-timestamp" Decider names is reflected in the User Guide as well, since the hash function may be other than md5 (tidying up from earlier change)
If the (experimental) SCONS_CACHE_MSVC_CONFIG feature is used, it will now attempt a sanity check for the cached compiler information, and regenerate it if needed. Previously, this cache would fail if a compiler upgrade caused a change to internal paths (e.g. upgrading from 17.1 to 17.2 causes a necessary path component in some of the cached vars to need to 14.32.31326 instead of 14.31.31103), and the cache file needed to be manually removed. The default cachefile name is now "scons_msvc_cache.json" rather than ".scons_msvc_cache" so there should be no transition problem if using the default; if using a custom cache file name, the cache should still be manually removed if there are problems to transition to the new style.
Ninja: Update ninja file generation to only create response files for build commands which exceed MAXLINELENGTH
Update the debug output written to stdout for MSVC initialization which is enabled by setting SCONS_MSCOMMON_DEBUG=- to use the logging module. Also changed the debug output format written to stdout to include more information about the source for each message of MSVC initialization debugging output. A single space was added before the message for all debugging output records written to stdout and to files.
Ninja: Made ninja tool force the ninja file as the only target. Also improved the default targets setup and made sure there is always a default target for the ninja file, which excludes targets that start and stop the daemon.
Ninja: Update ninja tool so targets passed to SCons are propgated to ninja when scons automatically executes ninja.
Add JavaScanner to include JAVACLASSPATH as a dependency when using the Java tool.
The build argument (i.e., x86) is no longer passed to the MSVC 6.0 to 7.1 batch files. This may improve the effectiveness of the internal msvc cache when using MSVC detection and when bypassing MSVC detection as the MSVC 6.0 to 7.1 batch files do not expect any arguments.
Propagate the OS and windir environment variables from the system environment to the msvc environment. The OS and windir environment variables are used in the MSVC 6.0 batch file and the SDK 6.0-7.1 SetEnv.cmd batch files. Inclusion of the OS and windir environment variables eliminates some partial paths and warnings generated by the MSVC 6.0 and SDK 6.0-7.1 batch files when the variables are not defined.
An exception is raised when MSVC_UWP_APP is enabled for Visual Studio 2013 and earlier. Previous behavior was to silently ignore MSVC_UWP_APP when enabled for Visual Studio 2013 and earlier. Refer to the documentation for additional requirements and validation details. MSVC_UWP_APP was extended to accept True, False, and None in addition to '1' and '0'.
Ninja: added option "--skip-ninja-regen" to enable skipping regeneration of the ninja file if scons can determine the ninja file doesnot need to be regenerated, which will also skip restarting the scons daemon. Note this option is could result in incorrect rebuilds if scons Glob or scons generated files are used in ninja build target's command lines.
Tool loading used to have a special case for Jython, it no longer does. This effectively means SCons doesn't work with Jython, which has in reality been the case ever since SCons dropped Python 2 support - there is still no timeline for Jython switching to Python 3 compatibility.
.. code-block:: text
git shortlog --no-merges -ns 4.3.0..HEAD
174 Joseph Brill
126 Mats Wichmann
93 William Deegan
64 Daniel Moody
4 SergBobrovsky
2 dependabot[bot]
1 djh
1 Ivan Kravets
1 Vishwajith-K
1 Zhichang Yu
.. _page: http://sourceforge.net/projects/scons/files/scons/4.4.0/ .. _ChangeLog: https://raw.githubusercontent.com/SCons/scons/rel_4.4.0/CHANGES.txt
From Joseph Brill: - Verify that a user specified msvc script (via MSVC_USE_SCRIPT) exists and raise an exception when the user specified msvc script does not exist. - Fix issue where if you only had mingw installed on a Windows system and no MSVC compiler, and did not explicitly request the mingw tool, mingw tool initialization would fail and set the default compiler to MSVC which wasn't installed, yielding broken build. Updated mingw tool so that the generate and exists methods use the same mingw search paths (issue #4134). - Update the debug output written to stdout for MSVC initialization which is enabled by setting SCONS_MSCOMMON_DEBUG=- to use the logging module. Also changed the debug output format written to stdout to include more information about the source for each message of MSVC initialization debugging output. A single space was added before the message for all debugging output records written to stdout and to files. - Refactor the data definitions for msvc configurations to allow derived data structures to be constructed during initialization that removes the need for special case handling during runtime execution. Special case handling of host/target combinations is eliminated and replaced with pre-computed search lists that implicitly handle the differences between full versions and express versions of msvc. This fixes an issue where Express versions of the MSVC compiler were not detected due to differences in initial msvc detection and msvc batch file determination when configuring the build environment. This could lead to build failures when only an MSVC Express instance is installed and the MSVC version is not explicitly specified (issue #2668 and issue #2697). - Added MSVC_USE_SETTINGS construction variable to pass a dictionary to configure the msvc compiler system environment as an alternative to bypassing Visual Studio autodetection entirely. - Added MSVC_SDK_VERSION construction variable which allows building with a specific Microsoft SDK version. This variable is used with the msvc batch file determined via autodetection subject to validation constraints. Refer to the documentation for additional requirements and validation details. - Added MSVC_TOOLSET_VERSION construction variable which allows building with a specific toolset version. This variable is used with the msvc batch file determined via autodetection subject to validation constraints. This variable does not affect the autodetection and selection of msvc instances. The toolset version is applied after an msvc instance is selected. This could be the default version of msvc. Refer to the documentation for additional requirements and validation details. Addresses issue #3265, issue #3664, and pull request #4149. - Added MSVC_SPECTRE_LIBS construction variable which allows building with spectre-mitigated Visual C++ libraries. This variable is used with the msvc batch file determined via autodetection subject to validation constraints. Refer to the documentation for additional requirements and validation details. - Added MSVC_SCRIPT_ARGS construction variable which specifies command line arguments that are passed to the msvc batch file determined via autodetection subject to validation constraints. Refer to the documentation for additional requirements and validation details. Addresses enhancement issue #4106. - An exception is raised when MSVC_UWP_APP is enabled for Visual Studio 2013 and earlier. Previous behavior was to silently ignore MSVC_UWP_APP when enabled for Visual Studio 2013 and earlier. Refer to the documentation for additional requirements and validation details. MSVC_UWP_APP was extended to accept True, False, and None in addition to '1' and '0'. - The imported system environment variable names for MSVC 7.0 and 6.0 have been changed to the names set by their respective installers. Prior to this change, bypassing MSVC detection by specifying the MSVC 7.0 batch file directly would fail due to using an erroneous environment variable name. Arguments are no longer passed to the MSVC 6.0 to 7.1 batch files as no arguments are required and could improve the effectiveness of the internal MSVC cache. - Propagate the OS and windir environment variables from the system environment to the msvc environment. The OS and windir environment variables are used in the MSVC 6.0 batch file and the SDK 6.0-7.1 SetEnv.cmd batch files. Inclusion of the OS and windir environment variables eliminates some partial paths and warnings generated by the MSVC 6.0 and SDK 6.0-7.1 batch files when the variables are not defined. Note: Attempting to run the SDK 6.0-7.1 batch files directly via MSVC_USE_SCRIPT can lead to build failures and/or incomplete build environments. The SDK 6.0-7.1 batch files require delayed expansion to be enabled which is currently not supported and is typically not enabled by default on the host system. The batch files may also require environment variables that are not included by default in the msvc environment. - Suppress issuing a warning when there are no installed Visual Studio instances for the default tools configuration (issue #2813). When msvc is the default compiler because there are no compilers installed, a build may fail due to the cl.exe command not being recognized. At present, there is no easy way to detect during msvc initialization if the default environment will be used later to build a program and/or library. There is no error/warning issued for the default tools as there are legitimate SCons uses that do not require a c compiler. - Added a global policy setting and an environment construction variable for specifying the action to be taken when an msvc request cannot be satisfied. The available options are "error", "exception", "warning", "warn", "ignore", and "suppress". The global policy variable may be set and retrieved via the functions msvc_set_notfound_policy and msvc_get_notfound_policy, respectively. These two methods may be imported from SCons.Tool.MSCommon. The environment construction variable is MSVC_NOTFOUND_POLICY. When defined, the environment construction variable overrides the global policy setting for a given environment. When the active policy is "error" or "exception", an MSVCVersionNotFound exception is raised. When the active policy is "warning" or "warn", a VisualCMissingWarning warning is issued and the constructed environment is likely incomplete. When the active policy is "ignore" or "suppress", no action is taken and the constructed environment is likely incomplete. As implemented, the default global policy is "warning". The ability to set the global policy via an SCons command-line option may be added in a future enhancement. - Added a global policy setting and an environment construction variable for specifying the action to be taken when msvc script errors are detected. The available options are "error", "exception", "warning", "warn", "ignore", and "suppress". The global policy variable may be set and retrieved via the functions msvc_set_scripterror_policy and msvc_get_scripterror_policy, respectively. These two methods may be imported from SCons.Tool.MSCommon. The environment construction variable is MSVC_SCRIPTERROR_POLICY. When defined, the environment construction variable overrides the global policy setting for a given environment. When the active policy is "error" or "exception", an MSVCScriptExecutionError exception is raised when msvc batch file errors are detected. When the active policy is "warning" or "warn", an MSVCScriptExecutionWarning warning is issued when msvc batch file errors are detected. When the active policy is "ignore" or "suppress", msvc batch error messages are suppressed. As implemented, the default global policy is "ignore". The ability to set the global policy via an SCons command-line option may be added in a future enhancement. - Added experimental function msvc_query_version_toolset to SCons.Tool.MSCommon. Given a version specification, this function will return an msvc version and an msvc toolset version. The msvc toolset version may be None. The msvc version and msvc toolset version can be used in the environment construction variables MSVC_VERSION and MSVC_TOOLSET_VERSION, respectively. The version specification may be an msvc version or an msvc toolset version. This is a proxy for using an msvc toolset version to select an msvc instance. This function may be removed when an msvc toolset version is used during msvc instance selection. - Modify the MSCommon logger configuration to be independent of the root logger. This fixes an issue when multiple loggers are created and the MSCommon logger added computed fields to the root logger that are not present in other logging instances. - Modify the MSVC_USE_SCRIPT_ARGS test fixture to disable the msvc cache. This fixes an issue where the MSVC_USE_SCRIPT_ARGS test for success relied on a debug log message that was not produced when the msvc cache file exists and the test keys are already in the cache as the msvc script invocation was bypassed.
From William Deegan: - Fix check for unsupported Python version. It was broken. Also now the error message will include what is the minimum supported version of Python - Fix ActionTests to work with python 3.10.1 (and higher) NOTE: If you build with Python 3.10.0 and then rebuild with 3.10.1 (or higher), you may see unexpected rebuilds. This is due to Python internals changing which changed the signature of a Python Action Function. - Fix a number of Python ResourceWarnings which are issued when running SCons and/or it's tests with python 3.9 (or higher) - Action._subproc() can now be used as a python context manager to ensure that the POpen object is properly closed. (Thanks to Mats Wichmann for catching that DummyPopen needed additional logic) - Added project_url for mailing lists and Discord - Updated project url in steup.cfg to be https instead of http - Updated setup.cfg to remove Python 3.5 and add Python 3.10 - Added default values for source and target arguments to _defines() function. This is used to expand CPPDEFINES (and others). Previous change added those arguments with no defaults, so old usage where _defines() was called without source and target arguments would yield an exception. This issue was found via qt4 and qt5 tools in scons-contrib https://github.com/SCons/scons-contrib/issues/45
From David H: - Add JavaScanner to include JAVACLASSPATH as a dependency when using the Java tool. - Fix incorrect Java classpath generation when a NodeList is used as part of any JAVA*PATH variables.
From Daniel Moody: - Add cache-debug messages for push failures. - Ninja: Changed generated build.ninja file to run SCons only build Actions via a SCons Deamon. Added logic for starting and connecting to SCons daemon (currently only used for ninja) - Ninja: Fix issue where Configure files weren't being properly processed when build run via ninja. - Ninja: Added ninja mingw support and improved ninja CommandGeneratorAction support. - Ninja: Update ninja file generation to only create response files for build commands which exceed MAXLINELENGTH - Ninja: Added NINJA_GENERATED_SOURCE_ALIAS_NAME which allows user to specify an Alias() which the ninja tool can use to determine which files are generated sources. If this is not set by the user then the ninja tool will still dynamically determine which files are generated sources based on NINJA_GENERATED_SOURCE_SUFFIXES, and create a phony target _ninja_generated_sources. Generated sources will be built first by ninja. This is needed because ninja cannot determine which generated sources are required by other build targets. Code contributed by MongoDB The downstream commit is here: https://github.com/mongodb/mongo/commit/2fef432fa6e7cf3fd4f22ba3b193222c2887f14f - Ninja: Added special case for ninja scons daemon to work in win32 python3.6 environments. This particular environment does a bad job managing popen standard file handles, so some special workarounds are needed. - Ninja:Added user configurable setting of ninja depfile format via NINJA_DEPFILE_PARSE_FORMAT. Now setting NINJA_DEPFILE_PARSE_FORMAT to [msvc,gcc,clang] can force the ninja expected format. Compiler tools will also configure the variable automatically. - Ninja: Made ninja tool force the ninja file as the only target. - Ninja: Improved the default targets setup and made sure there is always a default target for the ninja file, which excludes targets that start and stop the daemon. - Ninja: Update ninja tool so targets passed to SCons are propagated to ninja when scons automatically executes ninja. - Small refactor of scons daemons using a shared StateInfo class for communication between the scons interactive thread and the http server thread. Added error handling for scons interactive failing to startup. - Ninja: Updated ninja scons daemon scripts to output errors to stderr as well as the daemon log. - Ninja: Fix typo in ninja scons daemon startup which causes ConnectionRefusedError to not retry - Added SHELL_ENV_GENERATORS construction variable. This variable should be set to a list (or an iterable) which contains functions to be called in order when constructing the execution environment (Generally this is the shell environment variables). This allows the user to customize how (for example) PATH is constructed. Note that these are called for every build command run by SCons. It could have considerable performance impact if not used carefully. to connect to the server during start up. - lex: Fixed an issue with the lex tool where file arguments specified to either "--header-file=" or "--tables-file=" which included a space in the path to the file would be processed incorrectly - Ninja: added option "--skip-ninja-regen" to enable skipping regeneration of the ninja file if scons can determine the ninja file doesnot need to be regenerated, which will also skip restarting the scons daemon. Note this option is could result in incorrect rebuilds if scons Glob or scons generated files are used in ninja build target's command lines. - Ninja: Added new alias "shutdown-ninja-scons-daemon" to allow ninja to shutdown the daemon. Also added cleanup to test framework to kill ninja scons daemons and clean ip daemon logs. NOTE: Test for this requires python psutil module. It will be skipped if not present. - Ninja: Added command line variable NINJA_CMD_ARGS that allows to pass through ninja command line args. This can also be set in your Environment().
From Mats Wichmann: - Tweak the way default site_scons paths on Windows are expressed to conform to conventions (what they actually resolve to is unchanged), drop a Py2 workaround, and pick a better "system" path, old one remains supported (%AllUsersProfile%\scons\site_scons vs old %AllUsersProfile%\Application Data\scons\site_scons). - Fix testsuite to work on Windows systems where there is no usable association for running .py files directly. There are a few tests where we need to do this for internal reasons, those are skipped in that case. Bad association could mean some other tool took it over (Visual Studio Code is known to do this), or no association at all. - Updated debug code in MSVC and MSVS tools to conform to the suggested "lazy interpolation" use of the Python logging module. Calls now look like 'debug("template %s", text)' rather than 'debug("template %s" % text)' so the logging system does the interpolation only when/if needed (was a pylint warning). - Update Help (-H) output a bit. Drop "ignored for compat" entry. Pass window size to formatter so it formats for wider displays too. - runtest.py now accepts -j 0 to auto-detect number of usable processors for testing threads. - Fixed crash in C scanner's dictify_CPPDEFINES() function which happens if AppendUnique is called on CPPPATH. (Issue #4108). - The MSVC script_env_cache now contains a sanity check: if the retrieved tools path does not exist, the entry is invalidated so it will be recomputed, in an attempt to avoid scons failing when certain compiler version bumps have taken place. The dictionary key (uses the name of a batch file and any arguments which may have been passes), is now computed a bit differently: the dashes are left off if there are no arguments. The default cachefile is changed to have a .json suffix, for better recognition on Windows since the contents are json. - As "code modernization" all of SCons now uses the current super() zero-argument syntax instead of direct calls to a parent class method or the super() two-argument syntax. - Renamed ParseFlag's internal data structure to "mapping" instead of "dict" (avoid redefining builtin) - Fix an old use-before-set bug in tex tool (issue #2888) - Fix a test harness exception returning stderr if a wait_for timed out. - ParseConfig now correctly passes the unique flag to a user-supplied flag-merging function. - Restore the ability of the content-timestamp decider to see that a a source which is a symlink has changed if the file-system target of that link has been modified (issue #3880) - Modernize a few tests that use now-deprecated unittest.getTestCaseNames and unittest.makeSuite - Python itself suggests the replacements. - SCons.Tool.find_program_path now takes an optional add_path argument to add a path to the execution environment if it was discovered in default_paths. Previously, the routine, called by many tool modules, never altered the execution environment, leaving it to the tools. - A new construction variable FORTRANCOMMONFLAGS is added which is applied to all Fortran dialects, in case someone needs to set some flags globally. FORTRANFLAGS looked like it was intended for that, but was not applied to other dialects, and e2e tests explicitly checked that FORTRANFLAGS did not propagate outside the FORTRAN dialect, so the conclusion is that behavior is intentional (issue #2257) - SCons programmatic importing (tool modules and platform modules) no longer uses the deprecated (since Py 3.10) importlib.load_module routine, shifting to the preferred exec_module. Old Python 2 compatible import fallback (using the imp module) in tool module loading is dropped. Tool module loading no longer special-cases Jython, which is a dead project as far as SCons (no timeline in sight for Python 3 support). - Improvements to lex and yacc tools: better documentation of extra-file options, add test for extra-file behavior. - Two new construction variables are introduced for lex (LEX_HEADER_FILE and LEX_TABLES_FILE) as the preferred way of specifying these extra-file options. - Two new construction variables are introduced for yacc (YACC_HEADER_FILE and YACC_GRAPH_FILE) as the preferred way of specifying these extra-file options.
From Zhichang Yu: - Added MSVC_USE_SCRIPT_ARGS variable to pass arguments to MSVC_USE_SCRIPT. - Added Configure.CheckMember() checker to check if struct/class has the specified member.
From Ivan Kravets, PlatformIO: - Conditional C/C++ Preprocessor: Strip shell's backslashes from the computed include (-DFOO_H="foo.h")
The qt tool, which targets Qt version 3, is deprecated. Qt3 has been unsupported by upstream for many years. Qt4 and Qt5 tools are available from scon…
A new SCons release, 4.3.0, is now available on the SCons download page:
NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer supported
Here is a summary of the changes since 4.2.0:
Ninja - Added ninja API 'NINJA_FORCE_SCONS_BUILD' to force a node to callback to scons.
Add support for Visual Studio 2022.
The qt tool, which targets Qt version 3, is deprecated. Qt3 has been unsupported by upstream for many years. Qt4 and Qt5 tools are available from scons-contrib.
Ninja - Expanded ninja Mkdir to also support Mkdir actions.
Further PCH updates. It's now recommended that env['PCH'] should always be a File node. Either via return value from env.PCH() or by explicitly using File('StdAfx.pch').
Change SCons.Platform.win32.get_architecture() to return platform.platform() when run in an environment where neither: PROCESSOR_ARCHITEW6432 nor PROCESSOR_ARCHITECTURE is set. This should fix platform tests which started failing when HOST_OS/HOST_ARCH changes introduced by Aaron Franke (listed below) were merged.
The Java tool now accepts more versions (up to 17.0), and is better able to detect the many builds of OpenJDK available since it became designated the reference Java implementation.
Fix reproducible builds. Restore logic respecting SOURCE_DATE_EPOCH when set.
Small fix to ensure CLVar default value is an empty list. See MongoDB bug report: https://jira.mongodb.org/browse/SERVER-59656 Code contributed by MongoDB.
Ninja - Fix ninja tool to never use for_sig substitution because ninja does not use signatures. This issue affected CommandGeneratorAction function actions specifically.
Fix PCH not being evaluated by subst() where necessary.
Fix issue #4021. Change the way subst() is used in Textfile() to not evaluate '$$(' -> '$', but instead it should yield '$('.
Ninja - Fix command line escaping for ninja dollar sign escape. Without escaping ninja properly,
Fix MSVS tests (vs-N.N-exec.py) for MSVS 6.0, 7.0, and 7.1 (import missing module).
Fix command line escaping for ninja dollar sign escape. Without escaping ninja properly, the ninja file scons regenerate and callback invocations will lose the $ characters used in the scons command line which ninja uses itself for escaping. For Example:
scons BUILD=xyz OTHERVAR=$BUILD
Prior to this fix, it would cause ninja to fail to escape the dollar sign, leading to the single dollar sign being used as a ninja escape character in the ninja file.
Ninja - Fixed an issue where if you control-c and/or killed ninja while it was running scons to regenerate build.ninja you would end up with no build.ninja file and have to rerun scons from scratch. Code contributed by MongoDB.
Added --no-ignore-skips to runtest.py. Changed default to ignore skips when setting runtest.py's exit status. Previously would exit 2 if any tests were skipped. Now will only exit 2 if user specifies --no-ignore-skips and some tests were skipped.
git shortlog --no-merges -ns 4.2.0..HEAD
47 Mats Wichmann
46 William Deegan
14 Jacob Cassagnol
11 Daniel Moody
8 Ryan Egesdahl
5 Joseph Brill
4 Omar Polo
2 Brian Quistorff
1 Aaron Franke
From Jacob Cassagnol: - Default hash algorithm check updated for SCons FIPS compliance. Now checks for hash viability first and then walks the tree to use the first viable hash as the default one. This typically selects SHA1 on FIPS-enabled systems less than Python 3.9 as the new default instead of MD5, unless SHA1 has also been disabled by security policy, at which point SCons selects SHA256 as the default. For systems running Python 3.9 and later, the hashlib bug has been fixed, and SCons will once again default to MD5 as the preferred algorithm.
From Joseph Brill: - Fix MSVS tests (vs-N.N-exec.py) for MSVS 6.0, 7.0, and 7.1 (import missing module). - Add support for Visual Studio 2022.
From William Deegan: - Fix reproducible builds. Restore logic respecting SOURCE_DATE_EPOCH when set. - Fix version tests to work with updated scons --version output. (Date format changed) - Fix issue #4021. Change the way subst() is used in Textfile() to not evaluate '$$(' -> '$', but instead it should yield '$('. - Change SCons.Platform.win32.get_architecture() to return platform.platform() when run in an environment where neither: PROCESSOR_ARCHITEW6432 nor PROCESSOR_ARCHITECTURE is set. This should fix platform tests which started failing when HOST_OS/HOST_ARCH changes introduced by Aaron Franke (listed below) were merged. - Further PCH updates. It's now recommended that env['PCH'] should always be a File node. Either via return value from env.PCH() or by explicitly using File('StdAfx.pch'). - Added --no-ignore-skips to runtest.py. Changed default to ignore skips when setting runtest.py's exit status. Previously would exit 2 if any tests were skipped. Now will only exit 2 if user specifies --no-ignore-skips and some tests were skipped.
From Ryan Egesdahl: - Small fix to ensure CLVar default value is an empty list. See MongoDB bug report: https://jira.mongodb.org/browse/SERVER-59656 Code contributed by MongoDB. - Ninja - Fixed an issue where if you control-c and/or killed ninja while it was running scons to regenerate build.ninja you would end up with no build.ninja file and have to rerun scons from scratch. Code contributed by MongoDB.
From Aaron Franke: - Define HOST_OS and HOST_ARCH in the environment for all platforms. Before this change, these were only defined for Win32 and OS/2.
From Daniel Moody: - Fix ninja tool to never use for_sig substitution because ninja does not use signatures. This issue affected CommandGeneratorAction function actions specifically. - Expanded ninja Mkdir to also support Mkdir actions. - Added support for the PCH environment variable to support subst generators. - Fix command line escaping for ninja dollar sign escape. Without escaping ninja properly, the ninja file scons regenerate and callback invocations will lose the $ characters used in the scons command line which ninja uses itself for escaping. For Example: scons BUILD=xyz OTHERVAR=$BUILD Prior to this fix, it would cause ninja to fail to escape the dollar sign, leading to the single dollar sign being used as a ninja escape character in the ninja file.
From Daniel Moody: - Added ninja API 'NINJA_FORCE_SCONS_BUILD' to force a node to callback to scons.
From Mats Wichmann: - Two small Python 3.10 fixes: one more docstring turned into raw because it contained an escape; updated "helpful" syntax error message from 3.10 was not expected by SubstTests.py and test/Subst/Syntax.py - EmitterProxy rich comparison set is completed (checker warning). Added le, gt, ge. - Fix gcc/g++ tool failing if "gcc --version" returns text which fails to_String conversion (i.e., not UTF-8) - failure happens when tool initialization checks version. For gcc, the initial version string is not translated, for the rest, don't convert, just consume raw and discard. - Maintenance and doc: modernize some usage in Scanner package, calling super(), switching some imitialization to comprehensions, and code formatting. Docstring for scanner Base moved from init-method to class-level so it's picked up by Sphinx. Added new sconsign filenames to skip_entry_list in Scanner/Dir.py - Change SCons.Scanner.Base to ScannerBase. Old name kept as an alias but is now unused in SCons itself. - Call Variables option converter consistently - the converter should have access to the env if it needs to (issue #2064). - Fixed the variables Add() method to accept a tuple for the variable name the same way AddVariables() does (issue #3869). - The premade validator PathIsDirCreate for for PathVariable now catches the case where the directory could not be created due to permission problems, allowing a more helpful error to be emitted (issue #2828) - Maintenance: Python thread.setDaemon is deprecated in favor of directly updating daemon attribute - update SCons to do this. - Make sure when subst'ing a callable, the callable is called with the correct for_signature value, previously it would be true even if doing SUBST_RAW (issue #4037) - Update Util/NodeList implementation to get rid of a workaround for early Python 3 slicing issue that is no longer a problem. - Rework some Java tests to skip rather than fail on CI systems, where the working java is > v9, but a 1.8 or 9 was also found. - Java updates: on Windows, detect more default JDK install locations. On all platforms, more Java versions (up to 17.0 now). Add more information on version selection to docs. Update docs on JavaH tool in light of javah command dropped since 10.0. Try to be better about preserving user's passed-in JAVA* construction vars. - Start the deprecation of the qt tool, which refers to Qt3 (usupported since around 2006). There's a deprecation warning added, initially defaulting to disabled.
From Brian Quistorff: - Fix crash when scons is run from a python environement where a signal is set from outside Python.
NOTE: The 4.2.0 Release of SCons will deprecate Python 3.5 Support. Python 3.5 support will be dropped in the next major release.
A new SCons release, 4.2.0, is now available on the SCons download page:
Here is a summary of the changes since 4.1.0:
NOTE: The 4.2.0 Release of SCons will deprecate Python 3.5 Support. Python 3.5 support will be dropped in the next major release.
Add support for the (TARGET,SOURCE,TARGETS,SOURCES,CHANGED_TARGETS,CHANGED_SOURCES}.relpath property. This will provide a path relative to the top of the build tree (where the SConstruct is located) Fixes #396
Added --experimental flag, to enable various experimental features/tools. You can specify 'all', 'none', or any combination of available experimental features.
Added affect_signature flag to _concat function. If set to False, it will prepend and append $( and $). That way the various Environment variables can use that rather than "$( _concat(...) $)".
Deprecate Python 3.5 as a supported version.
SCons now supports the command-line parameter --hash-format to override the default hash format that SCons uses. It can also be set via SetOption('hash_format'). Supported values are: md5, sha1, and sha256. For all hash formats other than the default of md5, the SConsign database will include the name of the hash format. For example, --hash-format=sha256 will create a SConsign with name .sconsign_sha256.dblite..
Improve Subst()'s logic to check for proper callable function or class's argument list. It will now allow callables with expected args, and any extra args as long as they have default arguments. Additionally functions with no defaults for extra arguments as long as they are set using functools.partial to create a new callable which set them.
Internal has_key methods removed from SCons' dictionary-like objects SubstitutionEnvironment and OverrideEnvironment - in other words, an env - to match Python 3 which no longer has dict.has_key.
Removed long-deprecated construction variables PDFCOM, WIN32_INSERT_DEF, WIN32DEFPREFIX, WIN32DEFSUFFIX, WIN32EXPPREFIX, WIN32EXPSUFFIX. All have been replaced by other names since at least 1.0.
Added CACHEDIR_CLASS construction variable and expanded CacheDir method args to support SCons invoking CacheDir derived classes for CacheDir customization. Moved copy_from_cache attribute from the Environment class to CacheDir class. Code contributed by MongoDB.
Update BuildTask to pass all targets to the progress object fixing an issue where multi-target build nodes only got the first target passed to the progress object.
Change SConscript() missing SConscript behavior - if must_exist=False, the warning is suppressed.
The command-line parameter --md5-chunksize is now deprecated. Use --hash-chunksize instead.
Fix Issue #3906 - IMPLICIT_COMMAND_DEPENDENCIES was not properly disabled when set to any string value (For example ['none','false','no','off']) Also previously 'All' wouldn't have the desired affect.
DocbookXslt tool: The XSLT stylesheet file is now initialized to an env.File() Node, such that dependencies work correctly in hierarchical builds (eg when using DocbookXslt in SConscript('subdir/SConscript') context.
The Install builder will now set the writable mode on the file(s) it copies. This restores the (previously undocumented) SCons behavior that regressed as of 4.0.0.
Fix issue #3790: Generators in CPPDEFINES now have access to populated source and target lists
Fix a potential race condition in shared cache environments where the permissions are not writeable for a moment after the file has been renamed and other builds (users) will copy it out of the cacheSmall reorganization of logic to copy files from cachedir. Moved CacheDir writeable permission code for copy to cache behind the atomic rename operation.
Fixed intermediate and and multi target nodes generated from SConf tests not being marked as is_conftest().
git shortlog --no-merges -ns 4.1.0..HEAD
177 William Deegan
101 Daniel Moody
95 Mats Wichmann
25 Adam Gross
4 greenbender
4 Daniel
4 Henrik Maier
4 Mathew Robinson
3 Andrew Morrow
3 Ivan Kravets
3 Dillan Mills
1 WholesomeIsland
1 dependabot[bot]
1 djh
1 Joseph Brill
From Byron Platt: - Fix Install() issue when copytree recursion gives bad arguments that can lead to install side-effects including keeping dangling symlinks and silently failing to copy directories (and their subdirectories) when the directory already exists in the target.
From Joseph Brill: - Internal MSVS update: Remove unnecessary calls to find all installed versions of msvc when constructing the installed visual studios list.
From William Deegan: - Improve Subst()'s logic to check for proper callable function or class's argument list. It will now allow callables with expected args, and any extra args as long as they have default arguments. Additionally functions with no defaults for extra arguments as long as they are set using functools.partial to create a new callable which set them. - Fix Issue #3035 - mingw with SHLIBVERSION set fails with either not a dll error or "Multiple ways to build the same target were specified for:". Now mingw will disable creating the symlinks (and adding version string to ) dlls. It sets SHLIBNOVERSIONSYMLINKS, IMPLIBNOVERSIONSYMLINKS and LDMODULENOVERSIONSYMLINKS to True. - Added --experimental flag, to enable various experimental features/tools. You can specify 'all', 'none', or any combination of available experimental features. - Fix Issue #3933 - Remove unguarded print of debug information in SharedLibrary logic when SHLIBVERSION is specified. - Fix versioned shared library naming for MacOS platform. (Previously was libxyz.dylib.1.2.3, has been fixed to libxyz.1.2.3.dylib. Additionally the sonamed symlink had the same issue, that is now resolved as well) - Add experimental ninja builder. (Contributed by MongoDB, Daniel Moody and many others). - Fix #3955 - _LIBDIRFLAGS leaving $( and $) in *COMSTR output. Added affect_signature flag to _concat function. If set to False, it will prepend and append $( and $). That way the various Environment variables can use that rather than "$( _concat(...) $)". - Fix issue with exparimental ninja tool which would fail on windows or when ninja package wasn't installed but --experimental=ninja was specified. - As part of experimental ninja tool, allow SetOption() to set both disable_execute_ninja and disable_ninja.
From David H:
- Fix Issue #3906 - IMPLICIT_COMMAND_DEPENDENCIES was not properly disabled when
set to any string value (For example ['none','false','no','off'])
Also previously 'All' wouldn't have the desired affect.
From Ivan Kravets:
- Provide a custom argument escape function for TempFileMunge using a new
TEMPFILEARGESCFUNC variable. Useful if you need to apply extra operations on
a command argument before writing to a temporary file (fix Windows slashes,
normalize paths, etc.)
From Henrik Maier:
From Daniel Moody: - Update CacheDir to use uuid for tmpfile uniqueness instead of pid. This fixes cases for shared cache where two systems write to the same cache tmpfile at the same time because the happened to get the same pid. - Added support for passing custom CacheDir derived classes to SCons. Moved copy_from_cache attribute from the Environment class to CacheDir class. Code contributed by MongoDB. - Update BuildTask to pass all targets to the progress object fixing an issue where multi-target build nodes only got the first target passed to the progress object. - Fix a potential race condition in shared cache environments where the permissions are not writeable for a moment after the file has been renamed and other builds (users) will copy it out of the cache. Small reorganization of logic to copy files from cachedir. Moved CacheDir writeable permission code for copy to cache behind the atomic rename operation. - Added marking of intermediate and and multi target nodes generated from SConf tests so that is_conftest() is more accurate. - Added test for configure check failing to ensure it didn't break generating and running ninja.
From Mats Wichmann: - Initial support in tests for Python 3.10 - expected bytecode and one changed expected exception message. Change some more regexes to be specified as rawstrings in response to DeprecationWarnings. - Add an example of adding an emitter to User Guide (concept from Jeremy Elson) - Add timing information for sconsign database dump when --debug=time is selected. Also switch to generally using time.perf_counter, which is the Python recommended way for timing short durations. - Drop remaining definitions of dict-like has_key methods, since Python 3 doesn't have a dictionary has_key (maintenance) - Do not treat --site-dir=DIR and --no-site-dir as distinct options. Allows a later instance to override an earlier one. - Ignore empty cmdline arguments when computing targets (issue 2986) - Remove long-deprecated construction variables PDFCOM, WIN32_INSERT_DEF, WIN32DEFPREFIX, WIN32DEFSUFFIX, WIN32EXPPREFIX, WIN32EXPSUFFIX. All have been replaced by other names since at least 1.0. - Add a iadd method to the CLVar class so that inplace adds (+=) also work as expected (issue 2399) - Remove local copy of CLVar in EnvironmentTests unittest file - should be testing against the production version, and they didn't really differ. - Don't strip spaces in INSTALLSTR by using raw subst (issue 2018) - Deprecate Python 3.5 as a supported version. - CPPDEFINES now expands construction variable references (issue 2363) - Restore behavior that Install()'d files are writable (issue 3927) - Simplified Mkdir(), the internal mkdir_func no longer needs to handle existing directories, it can now pass exist_ok=True to os.makedirs(). - Avoid WhereIs exception if user set a tool name to empty (from issue 1742) - Maintenance: remove obsolete getslice definitions (Py3 never calls); add Node.fs.scandir to call new (Py3.5) os.scandir; Node.fs.makedirs now passes the exist_ok flag; Cachedir creation now uses this flag. - Maintenance: remove unneeded imports and reorganize some. Fix uses of warnings in some tools which instantiated the class but did nothing with them, need to instead call SCons.Warnings.warn with the warn class. - Drop overridden changed_since_last_build method in Value class. - Resync the SetOption implementation and the manpage, making sure new options are available and adding a notes column for misc information. SetOption equivalents to --hash-chunksize, --implicit-deps-unchanged and --implicit-deps-changed are enabled. - Add tests for SetOption failing on disallowed options and value types. - Maintenance: eliminate lots of checker complaints about Util.py. - Maintenance: fix checker-spotted issues in Environment (apply_tools) and EnvironmentTests (asserts comparing with self). For consistency, env.Tool() now returns a tool object the same way Tool() has done. - Change SConscript() missing SConscript behavior - if must_exist=False, the warning is suppressed. - Make sure TEMPFILEPREFIX can be set to an empty string (issue 3964)
From Dillan Mills: - Add support for the (TARGET,SOURCE,TARGETS,SOURCES,CHANGED_TARGETS,CHANGED_SOURCES}.relpath property. This will provide a path relative to the top of the build tree (where the SConstruct is located) Fixes #396
From Andrew Morrow: - Fix issue #3790: Generators in CPPDEFINES now have access to populated source and target lists
Nothing published for this version
Here is a summary of the changes since 4.0.1:
Here is a summary of the changes since 4.0.1:
Add COMPILATIONDB_PATH_FILTER env option for CompilationDatabase() builder which allows filtering of entries based on the output file paths using glob style file matching (issue #3742).
Add ZIP_OVERRIDE_TIMESTAMP env option to Zip builder which allows for overriding of the file modification times in the archive.
Raise an error if an option (not otherwise consumed) is used which looks like an abbreviation of one one added by AddOption. (#3653)
Completely rewrote versioned shared libraries logic. Added support for SOVERSION via dmoody's initial PR #3733
No longer automatically disable setting SONAME on shared libraries on OpenBSD.
Environment.SideEffect() no longer adds duplicate side effects. NOTE: The list of returned side effect Nodes will not include any duplicate side effect Nodes.
/snap/bin is added to the default search path for the 'posix' platform.
Completely rewrote versioned shared libraries logic.
Added support for SOVERSION
No longer automatically disable setting SONAME on shared libraries on OpenBSD.
Switch to use ctypes instead of pywin32 (requiring an extra pip install) - Fixes Github Issue #2291 - pywin32 no longer necessary for SCons install. (pip install SCons will no longer also require pywin32 on win32) - Remove pywin32 usage from SCons.Util where it was used for accessing the registry. Python native winreg library already includes this functionality. - Remove using pywin32 to retrieve peak memory usage on Win32 for --debug=memory
Tool module not found will now raise a UserError to more clearly indicate this is probably an SConscript problem, and to make the traceback more relevant.
Fix three issues with MergeFlags: - Signature/return did not match documentation or existing usage - the implementation now no longer returns the passed env - merging --param arguments did not work (issue #3107); - passing a dict to merge where the values are strings failed (issue #2961).
Only try to initialize the wix tool by default (or when tool default is explicitly installed) on Windows based systems.
Add /snap/bin to env['PATH'] on POSIX, although this is only really useful for a subset of POSIX systems that use snaps. Was needed for CI builds, which run on Ubuntu LTS images.
Fix yacc tool, not respecting YACC set at time of tool initialization.
Fix race condition bug when initializing a scons cache directory at the same time from multiple threads or processes. Problem described in PR #3114. This is a simpler fix which should avoid some problems identified with the initial PR. (Credit to Fredrik Medley for reporting the issue, the initial PR, and discussing and testing this solution)
Fix incorrect cache hits and/or misses when running in interactive mode by having SCons.Node.Node.clear() clear out all caching-related state.
Fix Zip builder not rebuilding when ZIPROOT env option was changed.
Fix python3 crash when Value node get_text_content when child content does not have decode() NOTE: If you depend on Value node's get_text_content returning concatenated contents of it's children. This may break your code. It now concatenates the csig() of all children.
Fix Zip tool to respect ZIPCOMSTR. Previously all zip builder calls would yield something like zip(["test.zip"], ["zip_scons.py"]) and ignore ZIPCOMSTR if ZIPCOM and ZIPCOMSTR weren't set after the Environment/Tool is initialized. (Explained in PR #3659)
Fix issue where java parsed a class incorrectly from lambdas used after a new.
Fix using TEMPFILE in multiple actions in an action list. Previously a builder, or command with an action list like the following could yield a single tempfile with the first TEMPFILE's contents, used by both steps in the action list.
``['${TEMPFILE("xxx.py -otempfile $SOURCE")}', '${TEMPFILE("yyy.py -o$TARGET tempfile")}']``
Cleanup in SCons.Util.AddMethod. If called with an environment instance as the object to modify, the method would not be correctly set up in any Clone of that instance. Now tries to detect this and calls MethodWrapper to set up the method the same way env.AddMethod does. MethodWrapper moved to Util to avoid a circular import. Fixes #3028.
Fix Issue #3014 - Empty file and missing file have same csig
Fix Issue #3759 - include scons.1, sconsign.1, scons-time.1 manpages in sdist and wheel packages.
Pick a better "Topic" Trove classifier for SCons: SW Dev / Build Tools
Include previously-excluded SideEffect section in User Guide.
Rework runtest.py to use argparse for arg handling (was a mix of hand-coded and optparse, with a stated intent to "gradually port").
Add options to runtest to generate/not generate a log of failed tests, and to rerun such tests. Useful when an error cascades through several tests, can quickly try if a change improves all the fails. Dropped runtest test for fallback from qmtest, not needed; added new tests.
git shortlog --no-merges -ns 4.0.1..HEAD
115 Mats Wichmann
83 William Deegan
14 Adam Gross
4 Joseph Brill
3 Joachim Kuebart
2 GIT
2 Daniel Moody
2 James Benton
1 Unknown
1 Daniel
1 anatoly techtonik
1 Dirk Baechle
1 dependabot[bot]
1 David H
1 Michał Górny
1 Simon Tegelid
From James Benton: - Add COMPILATIONDB_PATH_FILTER env option for CompilationDatabase() builder which allows filtering of entries based on the output file paths using glob style file matching (issue #3742).
From Joseph Brill: - Internal MSVC and test updates: Rework the msvc installed versions cache so that it is not exposed externally and update external references accordingly. - Modify the MSCommon internal-use only debug logging records to contain the correct relative file path when the debug function is called from outside the MSCommon module.
From William Deegan:
- Fix yacc tool, not respecting YACC set at time of tool initialization.
- Refactor SCons.Tool to move all common shared and loadable module linking logic to SCons.Tool.linkCommon
- Remove pywin32 imports from SCons.Script.Main. No longer needed.
- Switch to use ctypes instead of pywin32 (requiring an extra pip install) - Fixes Github Issue #2291
- pywin32 no longer necessary for SCons install. (pip install SCons will no longer also require pywin32 on win32)
- Remove pywin32 usage from SCons.Util where it was used for accessing the registry. Python native winreg
library already includes this functionality.
- Remove using pywin32 to retrieve peak memory usage on Win32 for --debug=memory
- Fix Issue #3759 - include scons.1, sconsign.1, scons-time.1 manpages in sdist and wheel packages.
- Change SCons's build so the generated SCons/__init__.py is no longer removed by scons -c
- Completely rewrote versioned shared libraries logic. Added support for SOVERSION via dmoody's initial PR #3733
- No longer automatically disable setting SONAME on shared libraries on OpenBSD.
- Fix race condition bug when initializing a scons cache directory at the
same time from multiple threads or processes. Problem described in PR #3114.
This is a simpler fix which should avoid some problems identified with the initial PR.
(Credit to Fredrik Medley for reporting the issue, the initial PR, and discussing and testing
this solution)
- Minor edits to User Guide and manpage's header with copyright, released date changed.
From Michał Górny: - Fix dvipdf test failure due to passing incorrect flag to dvipdf.
From Adam Gross:
- Fix minor bug affecting SCons.Node.FS.File.get_csig()'s usage of the MD5 chunksize.
User-facing behavior does not change with this fix (GH Issue #3726).
- Fix occasional test failures caused by not being able to find a file or directory fixture
when running multiple tests with multiple jobs.
- Added support for a new command-line parameter --hash-format to override the default
hash format that SCons uses. It can also be set via SetOption('hash_format'). Supported
values are: md5, sha1, and sha256. For all hash formats other than
the default of md5, the SConsign database will include the name of the hash format.
For example, --hash-format=sha256 will create a SConsign with name
.sconsign_sha256.dblite..
- Fix incorrect cache hits and/or misses when running in interactive mode by having
SCons.Node.Node.clear() clear out all caching-related state.
- Change Environment.SideEffect() to not add duplicate side effects.
NOTE: The list of returned side effect Nodes will not include any duplicate side effect Nodes.
- Add support to the Python scanner for finding dynamically generated dependencies.
Previously the scanner only found imports if they existed on disk at scanning time.
From David H: - Add ZIP_OVERRIDE_TIMESTAMP env option to Zip builder which allows for overriding of the file modification times in the archive. - Fix Zip builder not rebuilding when ZIPROOT env option was changed.
From Jason Kenny - Fix python3 crash when Value node get_text_content when child content does not have decode() NOTE: If you depend on Value node's get_text_content returning concatenated contents of it's children. This may break your code. It now concatenates the csig() of all children.
From Joachim Kuebart:
- Suppress missing SConscript deprecation warning if must_exist=False
is used.
From Rocco Matano: - Fix Zip tool to respect ZIPCOMSTR. Previously all zip builder calls would yield something like zip(["test.zip"], ["zip_scons.py"]) and ignore ZIPCOMSTR if ZIPCOM and ZIPCOMSTR weren't set after the Environment/Tool is initialized. (Explained in PR #3659)
From Daniel Moody: - Fix issue where java parsed a class incorrectly from lambdas used after a new.
From Simon Tegelid - Fix using TEMPFILE in multiple actions in an action list. Previously a builder, or command with an action list like this: ['${TEMPFILE("xxx.py -otempfile $SOURCE")}', '${TEMPFILE("yyy.py -o$TARGET tempfile")}'] Could yield a single tempfile with the first TEMPFILE's contents, used by both steps in the action list.
From Mats Wichmann:
- Complete tests for Dictionary, env.keys() and env.values() for
OverrideEnvironment. Enable env.setdefault() method, add tests.
- Raise an error if an option (not otherwise consumed) is used which
looks like an abbreviation of one one added by AddOption. (#3653)
- Tool module not found will now raise a UserError to more clearly indicate this is
probably an SConscript problem, and to make the traceback more relevant.
- Fix three issues with MergeFlags:
- Signature/return did not match documentation or existing usage - the implementation
now no longer returns the passed env
- merging --param arguments did not work (issue #3107);
- passing a dict to merge where the values are strings failed (issue #2961).
- Include previously-excluded SideEffect section in User Guide.
- Clean up unneeded imports (autoflake tool).
- Make sure cProfile is used if profiling - SCons was expecting
the Util module to monkeypatch in cProfile as profile if available,
but this is no longer being done.
- Cleanup in SCons.Util.AddMethod. If called with an environment instance
as the object to modify, the method would not be correctly set up in
any Clone of that instance. Now tries to detect this and calls
MethodWrapper to set up the method the same way env.AddMethod does.
MethodWrapper moved to Util to avoid a circular import. Fixes #3028.
- Some Python 2 compatibility code dropped
- Rework runtest.py to use argparse for arg handling (was a mix
of hand-coded and optparse, with a stated intent to "gradually port").
- Add options to runtest to generate/not generate a log of failed tests,
and to rerun such tests. Useful when an error cascades through several
tests, can quickly try if a change improves all the fails. Dropped
runtest test for fallback from qmtest, not needed; added new tests.
- Eliminate tex tool usage of "for foo in range(len(iterable))"
- Restore internal Trace function to functional state.
- Only try to initialize the wix tool by default (or when tool default is explicitly installed)
on Windows based systems.
- Pick a better "Topic" Trove classifier for SCons: SW Dev / Build Tools
- Use os.replace instead of os.rename in dblite so don't need to
special-case Windows here. dblite is the default storage engine for the SConsign file(s).
- Fix cut-n-paste error in msvc debug printout and make some debug output
in msvs and msvsTests.py be off until needed (uncomment to use)
- Fix Issue #3014 - Empty file and missing file have same csig
- Refactor env.Append/Prepend to remove Py 1.5 era need to nest
try blocks, can now "continue" at the appropriate places.
- Add /snap/bin to env['PATH'] on POSIX, although this is only
really useful for a subset of POSIX systems that use snaps.
Was needed for CI builds, which run on Ubuntu LTS images.
- Eliminate Py2-ism nonzero (now bool). Work around issue #3860
where a check for BuilderBase raising exc. on bool was optimized out.
This issue was found due to a bug in Python 3.10.0a4. See issue #3860 for details.
Fix fortran tools to set SHFORTRAN variables to $FORTRAN, similarly SHF77, SHF90, SHF95, SHF03 and SHF08 will default to the variables $F77, $F90, $F9
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)
Convert remaining uses of insecure/deprecated mktemp method.
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.
Turn previously deprecated debug options into failures: --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer.
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.
Remove obsoleted references to DeciderNeedsNode which could cause crash when using --debug=explain
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
Code to supply correct version-specifier argument to vswhere for VS version selection.
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)
Fix Issue #3283 - Handle using --config=force in combination with Decider('MD5-timestamp'). 3.0.2 in fix for issue #2980 added that deciders can throw
From William Deegan:
- Fix Issue #3283 - Handle using --config=force in combination with Decider('MD5-timestamp').
3.0.2 in fix for issue #2980 added that deciders can throw DeciderNeedsNode exception.
The Configure logic directly calls the decider when using --config=force but wasn't handling
that exception. This would yield minimally configure tests using TryLink() not running and
leaving TypeError Nonetype exception in config.log
- Fix Issue #3303 - Handle --config=force overwriting the Environment passed into Configure()'s
Decider and not clearing it when the configure context is completed.
- Add default paths for yacc tool on windows to include cygwin, mingw, and chocolatey
- Fix issue #2799 - Fix mingw tool to respect SHCCCOMSTR, SHLINKCOMSTR and LDMODULECOMSTR
- Fix Issue #3329 - Add support for MS SDK V10.0A (which is commonly installed with VS2017)
- Fix Issue #3333 - Add support for finding vswhere under 32 bit windows installs.
From Maciej Kumorek: - Update the MSVC tool to include the nologo flag by default in RCFLAGS
From Daniel Moody: - Change the default for AppendENVPath to delete_existing=0, so path order will not be changed, unless explicitly set (Issue #3276) - Fixed bug which threw error when running SCons on windows system with no MSVC installed. - Update link tool to convert target to node before accessing node member - Update mingw tool to remove MSVC like nologo CCFLAG - Add default paths for lex tool on windows to include cygwin, mingw, and chocolatey - Add lex construction variable LEXUNISTD for turning off unix headers on windows - Update lex tool to use win_flex on windows if available
From Mats Wichmann: - Quiet open file ResourceWarnings on Python >= 3.6 caused by not using a context manager around Popen.stdout - Add the textfile tool to the default tool list - Fix syntax on is/is not clauses: should not use with a literal - Properly retrieve exit code when catching SystemExit - scons-time now uses context managers around file opens - Fix regex patterns that were not specified as raw strings
From Bernhard M. Wiedemann: - Do not store build host+user name if reproducible builds are wanted
Improve finding of Microsoft compiler: add a 'products' wildcard in case 2017 Build Tools only is installed as it is considered a separate product fro
From Mats Wichmann: - Improve finding of Microsoft compiler: add a 'products' wildcard in case 2017 Build Tools only is installed as it is considered a separate product from the default Visual Studio - Add TEMPFILESUFFIX to allow a customizable filename extension, as described in the patch attached to issue #2431. - scons.py and sconsign.py stopped working if script called as a symlink to location in scons-local location. - Fix issue running scons using a symlink to scons.py in an scons-local dir - Doc updates around Default(), and the various *TARGETS variables.
From Daniel Moody: - Improved support for VC14.1 and Visual Studio 2017, as well as arm and arm64 targets. Issues #3268 & Issue #3222 - Initial support for ARM targets with Visual Studio 2017 - Issue #3182 (You must set TARGET_ARCH for this to work) - Update TempFileMunge class to use PRINT_CMD_LINE_FUNC
From Tobias Herzog - Enhance cpp scanner regex logic to detect if/elif expressions without whitespaces but parenthesis like "#if(defined FOO)" or "#elif!(BAR)" correctly.
NOTE: 3.0.2 release was dropped because there was a packaging bug. Please consider all 3.0.2 content.
NOTE: 3.0.2 release was dropped because there was a packaging bug. Please consider all 3.0.2 content.
From William Deegan: - Fixes to packaging logic. Ensuring the SCons.Tool.clangCommon module is added to the release packages. - Modify scons.bat script to check for scons python script without .py extension if no file scons.py exists. This enables an all platform wheel to work.
From Mats Wichmann: - Update doc examples to work with Python 3.5+: map() now returns an iterable instead of a list.
Remove long deprecated SCons.Options code and tests. This removes BoolOption,EnumOption, ListOption,PackageOption, and PathOption which have been repl…
From Bernard Blackham: - Fixed handling of side-effects in task master (fixes #3013).
From William Deegan: - Remove long deprecated SCons.Options code and tests. This removes BoolOption,EnumOption, ListOption,PackageOption, and PathOption which have been replaced by *Variable() many years ago. - Re-Enable parallel SCons (-j) when running via Pypy - Move SCons test framework files to testing/framework and remove all references to QMtest. QMTest has not been used by SCons for some time now. - Updated logic for mingw and clang on win32 to search default tool install paths if not found in normal SCons PATH. If the user specifies PATH or tool specific paths they will be used and the default paths below will be ignored. - Default path for clang/clangxx : C:\Program Files\LLVM\bin - Default path for mingw : C:\MinGW\bin and/or C:\mingw-w64*\mingw64\bin - Key program to locate mingw : mingw32-make (as the gcc with mingw prefix has no fixed name) - Fixed issue causing stack trace when python Action function contains a unicode string when being run with Python 2.7 - Add alternate path to QT install for Centos in qt tool: /usr/lib64/qt-3.3/bin - Fix Java tools to search reasonable default paths for Win32, Linux, macOS. Add required paths for swig and java native interface to JAVAINCLUDES. You should add these to your CPPPATH if you need to compile with them. This handles spaces in paths in default Java paths on windows. - Added more java paths to match install for Centos 7 of openjdk - Fix new logic which populates JAVAINCLUDES to handle the case where javac is not found. - Fix GH Issue #2580 - # in FRAMEWORKPATH doesn't get properly expanded. The # is left in the command line. - Fix issue #2980 with credit to Piotr Bartosik (and William Blevins). This is an issue where using TimeStamp-MD5 Decider and CacheDir can yield incorrect md5's being written into the .sconsign. The difference between Piotr Bartosik's patch and the current code is that the more complicated creation of file to csig map is only done when the count of children for the current node doesn't match the previous count which is loaded from the sconsign. - Fix issue # 3106 MSVC if using MSVC_BATCH and target dir had a space would fail due to quirk in MSVC's handling of escaped targetdirs when batch compiling. - Fix GH Issue #3141 unicode string in a TryAction() with python 2.7 crashes. - Fix GH Issue #3212 - Use of Py3 and CacheDir + Configure's TryCompile (or likely and Python Value Nodes) yielded trying to combine strings and bytes which threw exception. - Fix GH Issue #3225 SCons.Util.Flatten() doesn't handle MappingView's produced by dictionary as return values from dict().{items(), keys(), values()}. - Fix GH Issue #3241 - Properly support versioned shared libraries for MacOS. We've also introduced two new env variables APPLELINK_CURRENT_VERSION and APPLELINK_COMPATIBILITY_VERSION which will specify what is passed to the linkers -current_version and -compatibility_version flags. If not specified they will be derived from SHLIBVERSION as such: - APPLELINK_CURRENT_VERSION = SHLIBVERSION - APPLELINK_COMPATIBILITY_VERSION = all but the last digit in SHLIBVERSION with .0 appended. Note that the values of the above will be validated. Valid format for either APPLELINK variable is X[.Y[.Z]] where 0 <= X <= 65535, 0 <= Y <= 255, 0 <= Z <= 255. The new variables have been added to the documents and should show up in user guide and manpage. - Fix GH Issue #3136 no longer wrap io.{BufferedReader,BufferedWriter,BufferedRWPair,BufferedRandom,TextIOWrapper with logic to set HANDLE_FLAG_INHERIT flag on the file handle. Python 3.4+ automatically sets this according to Python docs: https://docs.python.org/3/library/os.html#fd-inheritance
From Ray Donnelly: - Fix the PATH created by scons.bat (and other .bat files) to provide a normalized PATH. Some pythons in the 3.6 series are no longer able to handle paths which have ".." in them and end up crashing. This is done by cd'ing into the directory we want to add to the path and then using %CD% to give us the normalized directory See bug filed under Python 3.6: https://bugs.python.org/issue32457. Note: On Win32 PATH's which have not been normalized may cause undefined behavior by other executables being run by SCons (or any subprocesses of executables being run by SCons). Resolving this issue should eliminate that possibility going forward.
From Andrew Featherstone - Removed unused --warn options from the man page and source code.
From Arda Fu - Fix cpp scanner regex logic to treat ifndef for py3.5+. Previously it was not properly differentiating between if, ifdef, and ifndef.
From Philipp Maierhöfer - Added a hash method to the class SCons.Subst.Literal. Required when substituting Literal objects when SCons runs with Python 3. - Added missing FORTRANMODDIRPREFIX to the gfortran tool.
From Matthew Marinets: - Fixed an issue that caused the Java emitter to incorrectly parse arguments to constructors that implemented a class.
From Fredrik Medley: - Fix exception when printing of EnviromentError messages. Specifically, this fixes error reporting of the race condition when initializing the cache which error previously was hidden.
From Daniel Moody: - Updated Jar builder to handle nodes and directories better - Updated Jar builder to flatten source list which could contain embedded lists - Removed some magic numbers from jar.py on behalf of Mats Wichmann (mats@linux.com) - Set the pickling protocal back to highest which was causing issues with variant dir tests. This will cause issues if reading sconsigns pickled with the previous lower protocol. - Updated swig to setup default paths for windows - Updated gettext tools to setup default paths for windows with Cygwin/MinGW setups - Add common location for default paths for cygwin and mingw in Platform modules - Updated YACC tool to work on windows with Cygwin/MinGW setups - Set the pickling protocal back to highest which was causing issues with variant dir tests. This will cause issues if reading sconsigns pickled with the previous lower protocol. - Updated FS.py to handle removal of splitunc function from python 3.7 - Updated the vc.py to ignore MSVS versions where no compiler could be found
From Gary Oberbrunner: - Fix bug when Installing multiple subdirs outside the source tree - fix to_str to handle None without raising exception - Fix -jN for python 3.7
From Jonathon Reinhart:
- Replace all instances of int main() in C code with int main(void).
Specifically, this fixes the test cases use by Configure.CheckCC() which
would fail when using -Wstrict-prototypes.
From Zachary Tessler: - Fix calculation of signatures for FunctionActions that contain list (or set,...) comprehensions whose expressions involve constant literals. Those constants had been ignored in signatures, so changing them did not cause targets to be rebuilt.
From Paweł Tomulik: - In the testing framework, module TestCommon, fixed must_contain(), must_not_contain(), and related methods of TestCommon class to work with substrings located at zero offset. - Added virtualenv support. A new function Virtualenv() determines whether SCons runs in a virtualenv. The search PATH may also be extended to prefer executables from the current virtualenv over the ones provided by base environment. New option --enable-virtualenv provided to import some virtualenv-related variables to SCons and extend every env['ENV']['PATH'] automatically. New option --ignore-virtualenv disables this. Two environment variables, SCONS_ENABLE_VIRTUALENV and SCONS_IGNORE_VIRTUALENV are supported for the same purpose.
From Richard West: - Add SConstruct.py, Sconstruct.py, sconstruct.py to the search path for the root SConstruct file. Allows easier debugging within Visual Studio - Change setup.py to change the install directory (via pip, or setup.py install) from scons-#.#.# to scons (Yielding <pythondir>/lib/scons/SCons/ instead of <pythondir>/lib/scons/SCons-#.#.#/). This changes SCons to better comply with normal Python installation practices.
From Mats Wichmann: - Recognize new java 9, 10, 11 (as 9.0 and 10.0, 11.0) - Updated manpage scons.xml to fix a nested list problem - Updated doc terminiology: use prepend instead of append as appropriate - XML validity fixes from SConstruct.py change - Update wiki links to new github location - Update bug links to new github location - Make it easier for SConscript() call to fail on missing script. It was possible to call SCons.Warnings.warningAsException (not documented as a user API) to make all warnings fail. Now SConscript can take an optional must_exist flag which if true fails if the script does not exist. Not failing on missing script is now considered deprecated, and the first instance will print a deprecation message. It is now also possible to flip the scons behavior (which still defaults to warn, not fail) by calling SCons.Script.set_missing_sconscript_error, which is also not a documented interface at the moment. - Convert TestCmd.read to use with statement on open (quiets 17 py3 warnings) - Quiet py3 warning in UtilTests.py - Fix tests specifying octal constants for py3 - Fix must_contain tests for py3 - RPM package generation: - Fix supplying a build architecture - Disable auto debug package generation on certain rpmbuild versions - Adjust some tests to only supply build-id file on certain rpmbuild versions - Tests now use a file fixture for the repeated (trivial) main.c program. - Document and comment cleanup. - Added new Environment Value X_RPM_EXTRADEFS to supply custom settings to the specfile without adding specific logic for each one to scons. - The test for Python.h needed by swig tests is moved to get_python_platform so it does not have to be repeated in every test; picks up one failure which did not make the (previously needed) check. Windows version of get_python_platform needed some rework in case running in virtualenv. - If test opens os.devnull, register with atexit so file opens do not leak. - Fix bugs in Win32 process spawn logic to handle OSError exception correctly. - Use time.perf_counter instead of time.clock if it exists. time.clock deprecated since py3.3, due to remove in 3.8. deprecation warnings from py3.7 were failing a bunch of tests on Windows since they mess up expected stderr. - Prefer Py3's inspect.getfullargspec over deprecated inspect.getargspec. Switched to "new" (standard in Py2.7) usage of receiving a namedtuple - we were unpacking to a four-tuple, two of the items of which were unused; getfullargspec returns a named tuple with seven elements so it is a cleaner drop-in replacement using the namedtuple. - Updated the test-framework.rst documentation. - Remove obsoleted internal implementaiton of OrderedDict. - Test for tar packaging fixups - Stop using deprecated unittest asserts - messages in strip-install-dir test now os-neutral - Add xz compression format to packaging choices. - Syntax cleanups - trailing blanks, use "is" to compare with None, etc. Three uses of variables not defined are changed. - Some script changes in trying to find scons engine - Update (pep8) configure-cache script, add a --show option. - Fix for a couple of "what if tool not found" exceptions in framework. - Add Textfile/Substfile to default environment. (issue #3147) - sconsign: a couple of python3 fixes; be more tolerant of implicit entries which have no signatures; minor PEP8 changes. - Fix a couple of type mistakes (list-> string, filter type -> list) - Fix a couple of type mistakes in packaging tools: list-> string in msi, filter type -> list in ipk
From Bernhard M. Wiedemann: - Update SCons' internal scons build logic to allow overriding build date with SOURCE_DATE_EPOCH for SCons itself. - Change the datestamps in SCons' docs and embedded in code use ISO 8601 format and UTC
From Hao Wu - Typo in customized decider example in user guide - Replace usage of unittest.TestSuite with unittest.main() (fix #3113)
Jar can take multiple targets, and will make a duplicate jar from the sources for each target
From Daniel Moody: - Jar can take multiple targets, and will make a duplicate jar from the sources for each target - Added some warnings in case the Jar builder makes an implicit target - Added Jar method and changed jar build to be more specific. Jar method will take in directories or classes as source. Added more tests to JAR to ensure the jar was packaged with the correct compiled class files. - Added a No result test case to handle bug which seems unrelated to java in the swig-dependencies.py test, more info here: http://scons.tigris.org/issues/show_bug.cgi?id=2907 - Added a travis script to test on ubuntu trusty now that the project is on github so that Continuus Integration tests can be run automatically. It tests most case and considers no result a pass as well. Improving this script can install more dependincies allowing for more tests to be run.
From Daniel Moody: - Updated the Jar Builder tool in Tool/init.py so that is doesn't force class files as sources, allowing directories to be passed, which was causing test/Java/JAR.py to fail.
From William Deegan: - Fix issue where code in utility routine to_String_for_subst() had code whose result was never properly returned. (Found by: James Rinkevich https://pairlist4.pair.net/pipermail/scons-users/2017-October/006358.html ) - Fixed Variables.GenerateHelpText() to now use the sort parameter. Due to incorrect 2to3 fixer changes 8 years ago it was being used as a boolean parameter. Now you can specify sort to be a callable, or boolean value. (True = normal sort). Manpage also updated. - Fixed Tool loading logic from exploding sys.path with many site_scons/site_tools prepended on py3. - Added additional output with time to process each SConscript file when using --debug=time.
From Thomas Berg: - Fixed a regression in scons-3.0.0 where "from future import print_function" was imposed on the scope where SConstruct is executed, breaking existing builds using PY 2.7.
From William Deegan: - Fix broken subst logic where a string with "$$(abc)" was being treated as "$(abc) and the logic for removing the signature escapes was then failing because there was no closing "$)". This was introduced by a pull request to allow recursive variable evaluations to yield a string such as "$( $( some stuff $) $)".
From Zachary Tessler: - Fix incorrect warning for repeated identical builder calls that use overrides
Removed deprecated tools CVS, Perforce, BitKeeper, RCS, SCCS, Subversion.
NOTE: This is a major release. You should expect that some targets may rebuild when upgrading. Significant changes in some python action signatures. Also switching between PY 2.7 and PY 3.5, 3.6 will cause rebuilds.
From William Blevins: - Updated D language scanner support to latest: 2.071.1. (PR #1924) https://dlang.org/spec/module.html accessed 11 August 2016 - Enhancements: - Added support for selective imports: "import A : B, C;" -> A - Added support for renamed imports. "import B = A;" -> A - Supports valid combinations: "import A, B, CCC = C, DDD = D : EEE = FFF;" -> A, B, C, D - Notes: - May find new (previously missed) Dlang dependencies. - May cause rebuild after upgrade due to dependency changes. - Updated Fortran-related tests to pass under GCC 5/6. - Fixed SCons.Tool.Packaging.rpm.package source nondeterminism across builds.
From William Deegan: - Removed deprecated tools CVS, Perforce, BitKeeper, RCS, SCCS, Subversion. - Removed deprecated module SCons.Sig - Added prioritized list of xsltproc tools to docbook. The order will now be as follows: xsltproc, saxon, saxon-xslt, xalan (with first being highest priority, first tool found is used) - Fixed MSVSProject example code (http://scons.tigris.org/issues/show_bug.cgi?id=2979) - Defined MS SDK 10.0 and Changed VS 2015 to use SDK 10.0 - Changes to Action Function and Action Class signiture creation. NOTE: This will cause rebuilds for many builds when upgrading to SCons 3.0 - Fixed Bug #3027 - "Cross Compiling issue: cannot override ranlib" - Fixed Bug #3020 - "Download link in user guide wrong. python setup.py install --version-lib broken" - Fixed Bug #2486 - Added SetOption('silent',True) - Previously this value was not allowed to be set. - Fixed Bug #3040 - Non-unicode character in CHANGES.txt - Fixed Bug #2622 - AlwaysBuild + MSVC regression. - Fixed Bug #3025 - (Credit to Florian : User flow86 on tigris) - Fix typo JAVACLASSSUFIX should have been JAVACLASSSUFFIX
From Ibrahim Esmat: - Added the capability to build Windows Store Compatible libraries that can be used with Universal Windows Platform (UWP) Apps and published to the store
From Daniel Holth:
- Add basic support for PyPy (by deleting slots from Node with a
metaclass on PyPy); wrap most-used open() calls in 'with' statements to
avoid too many open files.
- Add main.py for python -m SCons in case it is on PYTHONPATH.
- Always use highest available pickle protocol for efficiency.
- Remove unused command line fallback for the zip tool.
From Gaurav Juvekar: - Fix issue #2832: Expand construction variables in 'chdir' argument of builders. (PR #463) - Fix issue #2910: Make --tree=all handle Unicode. (PR #427) - Fix issue #2788: Fix typo in documentation example for sconf. (PR #388)
From Alexey Klimkin: - Use memoization to optimize PATH evaluation across all dependencies per node. (PR #345) - Use set() where it is applicable (PR #344)
From M. Limber: - Fixed msvs.py for Visual Studio Express editions that would report "Error : ValueError: invalid literal for float(): 10.0Exp".
From Rick Lupton: - Update LaTeX scanner to understand \import and related commands
From Steve Robinson: - Add support for Visual Studio 2017. This support requires vswhere.exe a helper tool installed with newer installs of 2017. SCons expects it to be located at "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" It can be downloaded separately at https://github.com/Microsoft/vswhere
From Tom Tanner: - Allow nested $( ... $) sections
From Paweł Tomulik: - Fixed the issue with LDMODULEVERSIONFLAGS reported by Tim Jenness (https://pairlist4.pair.net/pipermail/scons-users/2016-May/004893.html). An error was causing "-Wl,Bsymbolic" being added to linker's command-line even when there was no specified value in LDMODULEVERSION and thus no need for the flags to be specified. - Added LoadableModule to the list of global functions (DefaultEnvironment builders).
From Manish Vachharajani: - Update debian rules, compat, and control to not use features deprecated or obsolete in later versions of debhelpers - Update python version to 2.7 in debian/control
From Richard Viney: - Fixed PCHPDBFLAGS causing a deprecation warning on MSVC v8 and later when using PCHs and PDBs together.
From Richard West: - Added nested / namespace tool support - Added a small fix to the python3 tool loader when loading a tool as a package - Added additional documentation to the user manual on using toolpaths with the environment This includes the use of sys.path to search for tools installed via pip or package managers - Added support for a PyPackageDir function for use with the toolpath
From Russel Winder: - Reordered the default D tools from "dmd, gdc, ldc" to "dmd, ldc, gdc". - Add a ProgramAllAtOnce builder to the dmd, ldc, and gdc tools. (PR #448) - Remove a file name exception for very old Fedora LDC installation. - gdc can now handle building shared objects (tested for version 6.3.0). - Remove establishing the SharedLibrary builder in the dmd, ldc, and gdc tools, must now include the ar tool to get this builder as is required for other compiler tools. - Add clang and clang++ tools based on Paweł Tomulik's work.
Add scons-configure-cache.py to packaging. It was omitted
From William Deegan: - Add scons-configure-cache.py to packaging. It was omitted
From Alexey Klimkin: - Use memoization to optimize PATH evaluation across all dependencies per node. (PR #345)
Removed a lot of compatibility methods and workarounds for Python versions < 2.7, in order to prepare the work towards a combined 2.7/3.x version. (PR
From Dirk Baechle: - Removed a lot of compatibility methods and workarounds for Python versions < 2.7, in order to prepare the work towards a combined 2.7/3.x version. (PR #284) Also fixed the default arguments for the print_tree and render_tree methods. (PR #284, too)
From William Blevins: - Added support for cross-language dependency scanning; SCons now respects scanner keys for implicit dependencies. - Notes for SCons users with heterogeneous systems. - May find new (previously missed) dependencies. - May cause rebuild after upgrade due to dependency changes. - May find new dependency errors (EG. cycles). - Discovered in some of the SCons QT tests. - Resolved missing cross-language dependencies for SWIG bindings (fixes #2264). - Corrected typo in User Guide for Scanner keyword. (PR #2959) - Install builder interacts with scanner found in SCANNERS differently. - Previous: Install builder recursively scanned implicit dependencies for scanners from SCANNER, but not for built-in (default) scanners. - Current: Install builder will not scan for implicit dependencies via either scanner source. This optimizes some Install builder behavior and brings orthogonality to Install builder scanning behavior.
From William Deegan: - Add better messaging when two environments have different actions for the same target (Bug #2024) - Fix issue only with MSVC and Always build where targets marked AlwaysBuild wouldn't make it into CHANGED_SOURCES and thus yield an empty compile command line. (Bug #2622) - Fix posix platform escaping logic to properly handle paths with parens in them "()". (Bug #2225)
From Jakub Pola: - Intel Compiler 2016 (Linux/Mac) update for tool directories.
From Adarsh Sanjeev: - Fix for issue #2494: Added string support for Chmod function.
From Tom Tanner: - change cache to use 2 character subdirectories, rather than one character, so as not to give huge directories for large caches, a situation which causes issues for NFS. For existing caches, you will need to run the scons-configure-cache.py script to update them to the new format. You will get a warning every time you build until you co this. - Fix a bunch of unit tests on windows
From Arfrever Frehtes Taifersar Arahesis:
From Arfrever Frehtes Taifersar Arahesis: - Fix for Bug # 2791 - Setup.py fails unnecessarily under Jython.
From Dirk Baechle: - Fixed license of SVG titlepage files in the context of Debian packaging, such that they allow for commercial use too (#2985).
From William Blevins: - InstallVersionedLib now available in the DefaultEnvironment context. - Improves orthogonality of use cases between different Install functions.
From Carnë Draug: - Added new configure check, CheckProg, to check for existence of a program.
From Andrew Featherstone: - Fix for issue #2840 - Fix for two environments specifying same target with different actions not throwing hard error. Instead SCons was incorrectly issuing a warning and continuing.
From Hiroaki Itoh : - Add support `Microsoft Visual C++ Compiler for Python 2.7' Compiler can be obtained at: https://www.microsoft.com/en-us/download/details.aspx?id=44266
From Florian Miedniak: - Fixed tigris issue #3011: Glob() excludes didn't work when used with VariantDir(duplicate=0)
From William Roberts: - Fix bug 2831 and allow Help() text to be appended to AddOption() help.
From Paweł Tomulik: - Reimplemented versioning for shared libraries, with the following effects - Fixed tigris issues #3001, #3006. - Fixed several other issues not reported to tigris, including: issues with versioned libraries in subdirectories with tricky names, issues with versioned libraries and variant directories, issue with soname not being injected to library when using D linkers, - Switched to direct symlinks instead of daisy-chained ones -- soname and development symlinks point directly to the versioned shared library now), for rationale see: https://www.debian.org/doc/debian-policy/ch-sharedlibs.html https://fedoraproject.org/wiki/Packaging:Guidelines#Devel_Packages https://bitbucket.org/scons/scons/pull-requests/247/new-versioned-libraries-gnulink-cyglink/diff#comment-10063929 - New construction variables to allow override default behavior: SONAME, SHLIBVERSIONFLAGS, _SHLIBVERSIONFLAGS, SHLIBNOVERSIONSYMLINKS, LDMODULEVERSION, LDMODULEVERSIONFLAGS, _LDMODULEVERSIONFLAGS, LDMODULENOVERSIONSYMLINKS. - Changed logic used to configure the versioning machinery from platform-centric to linker-oriented. - The SHLIBVERSION/LDMODULEVERSION variables are no longer validated by SCons (more freedom to users). - InstallVersionedLib() doesn't use SHLIBVERSION anymore. - Enchanced docs for the library versioning stuff. - New tests for versioned libraries. - Library versioning is currently implemented for the following linker tools: 'cyglink', 'gnulink', 'sunlink'. - Fix to swig tool - pick-up 'swig', 'swig3.0' and 'swig2.0' (in order). - Fix to swig tool - respect env['SWIG'] provided by user.
Added support for Visual Studio 2015
From Rob Smith: - Added support for Visual Studio 2015
Hide deprecated --debug={dtree,stree,tree} from --help output
From Anatoly Techtonik:
- Added ability to run scripts/scons.py directly from source checkout
- Hide deprecated --debug={dtree,stree,tree} from --help output
- Error messages from option parser now include hints about valid choices
- Cleaned up some Python 1.5 and pre-2.3 code, so don't expect SCons
to run on anything less than Python 2.4 anymore
- Several fixes for runtest.py:
* exit with an error if no tests were found
* removed --noqmtest option - this behavior is by default
* replaced -o FILE --xml combination with --xml FILE
* changed -o, --output FILE option to capture stdout/stderr output
from runtest.py
- Remove os_spawnv_fix.diff patch required to enable parallel builds
support prior to Python 2.2
From Juan Lang: - Fix WiX Tool to use .wixobj rather than .wxiobj for compiler output - Support building with WiX releases after 2.0
From Alexey Klimkin: - Fix nested LIBPATH expansion by flattening sequences in subst_path.
From eyan on Bitbucket: - Print target name with command execution time with --debug=time
From Thomas Berg and Evgeny Podjachev: - Fix subprocess spawning on Windows. Work around a Windows bug that can crash python occasionally when using -jN. (#2449)
From Dirk Baechle: - Updated test framework to support dir and file fixtures and added ability to test external (out-of-tree) tools (#2862). See doc in QMTest/test-framework.rst. - Fixed several errors in the test suite (Java paths, MSVS version detection, Tool import), additionally * provided MinGW command-line support for the CXX, AS and Fortran tests, * refactored the detection of the gcc version and the according Fortran startup library, * provided a new module rpmutils.py, wrapping the RPM naming rules for target files and further hardware-dependent info (compatibility, compiler flags, ...), * added new test methods must_exist_one_of() and must_not_exist_any_of() and * removed Aegis support from runtest.py. (#2872)
From Gary Oberbrunner: - Add -jN support to runtest.py to run tests in parallel - Add MSVC10 and MSVC11 support to get_output low-level bat script runner. - Fix MSVS solution generation for VS11, and fixed tests.
From Rob Managan: - Updated the TeX builder to support the \newglossary command in LaTeX's glossaries package and the files it creates. - Improve support for new versions of biblatex in the TeX builder so biber is called automatically if biblatex requires it. - Add SHLIBVERSION as an option that tells SharedLibrary to build a versioned shared library and create the required symlinks. Add builder InstallVersionedLib to create the required symlinks installing a versioned shared library.
From Charles Crain and Gary Oberbrunner:
From Charles Crain and Gary Oberbrunner:
From Steven Knight
Refactor the DictCmdGenerator class to be a Selector subclass.
Allow the DefaultEnvironment() function to take arguments and pass them to instantiation of the default construction environment.
Update the Debian package so it uses Python 2.2 and more closely resembles the currently official Debian packaging info.
From Gerard Patel
Correct the spelling of the "validater" option to "validator." Add a DeprecatedWarning when the old spelling is used.
From Chad Austin:
Support specifying a list of tools when calling Environment.Copy().
Give a Value Nodes a timestamp of the system time when they're created, so they'll work when using timestamp-based signatures.
Add a DefaultEnvironment() function that only creates a default environment on-demand (for fetching source files, e.g.).
Portability fix for test/M4.py.
From Steven Knight:
Tighten up the scons -H help output.
When the input yacc file ends in .yy and the -d flag is specified, recognize that a .hpp file (not a .h file) will be created.
Make builder prefixes work correctly when deducing a target from a source file name in another directory.
Documentation fixes: typo in the man page; explain up-front about not propagating the external environment.
Use "cvs co -d" instead of "cvs co -p >" when checking out something from CVS with a specified module name. This avoids zero-length files when there is a checkout error.
Add an "sconsign" script to print the contents of .sconsign files.
Speed up maintaining the various lists of Node children by using dictionaries to avoid "x in list" searches.
Cache the computed list of Node children minus those being Ignored so it's only calculated once.
Fix use of the --cache-show option when building a Program() (or using any other arbitrary action) by making sure all Action instances have strfunction() methods.
Allow the source of Command() to be a directory.
Better error handling of things like raw TypeErrors in SConscripts.
When installing using "setup.py install --prefix=", suppress the distutils warning message about adding the (incorrect) library directory to your search path.
Correct the spelling of the "validater" option to "validator." Add a DeprecatedWarning when the old spelling is used.
Allow a Builder's emitter to be a dictionary that maps source file suffixes to emitter functions, using the suffix of the first file in the source list to pick the right one.
Refactor the creation of the Program, *Object and *Library Builders so that they're moved out of SCons.Defaults and created on demand.
Don't split SConscript file names on white space.
Document the SConscript function's "dirs" and "name" keywords.
Remove the internal (and superfluous) SCons.Util.argmunge() function.
Add /TP to the default CXXFLAGS for msvc, so it can compile all of the suffixes we use as C++ files.
Allow the "prefix" and "suffix" attributes of a Builder to be callable objects that return generated strings, or dictionaries that map a source file suffix to the right prefix/suffix.
Support a MAXLINELINELENGTH construction variable on Win32 systems to control when a temporary file is used for long command lines.
Make how we build .rpm packages not depend on the installation locations from the distutils being used.
When deducing a target Node, create it directly from the first source Node, not by trying to create the right string to pass to arg2nodes().
Add support for SWIG.
From Bram Moolenaar:
From Gary Oberbrunner:
Report the target being built in error messages when building multiple sources from different extensions, or when the target file extension can't be deduced, or when we don't have an action for a file suffix.
Provide helpful error messages when the arguments to env.Install() are incorrect.
Fix the value returned by the Node.prevsiginfo() method to conform to a previous change when checking whether a node is current.
Supply a stack trace if the Taskmaster catches an exception.
When using a temporary file for a long link line on Win32 systems, (also) print the command line that is being executed through the temporary file.
Initialize the LIB environment variable when using the Intel compiler (icl).
Documentation fixes: better explain the AlwaysBuild() function.
From Laurent Pelecq:
From Ben Scott:
From Christoph Wiedemann:
Have the g++ Tool actually use g++ in preference to c++.
Have the gcc Tool actually use gcc in preference to cc.
Add a gnutools.py test of the GNU tool chain.
Be smarter about linking: use $CC by default and $CXX only if we're linking with any C++ objects.
Avoid SCons hanging when a piped command has a lot of output to read.
Add QT support for preprocessing .ui files into .c files.
Fix the _concat() documentation, and add a test for it.
From Chad Austin:
Fix the _concat() documentation, and add a test for it.
Portability fixes for non-GNU versions of lex and yacc.
From Matt Balvin:
From Timothee Bessett:
From Charles Crain:
Use '.lnk' as the suffix on the temporary file for linking long command lines (necessary for the Phar Lap linkloc linker).
Save non-string Options values as their actual type.
Save Options string values that contain a single quote correctly.
Save any Options values that are changed from the default Environment values, not just ones changed on the command line or in an Options file.
Make closing the Options file descriptor exception-safe.
From Steven Knight:
SCons now enforces (with an error) that construction variables must have the same form as valid Python identifiers.
Fix man page bugs: remove duplicate AddPostAction() description; document no_import_lib; mention that CPPFLAGS does not contain $_CPPINCFLAGS; mention that F77FLAGS does not contain $_F77INCFLAGS; mention that LINKFLAGS and SHLINKFLAGS contains neither $_LIBFLAGS nor $_LIBDIRFLAGS.
Eliminate a dependency on the distutils.fancy_getopt module by copying and pasting its wrap_text() function directly.
Make the Script.Options() subclass match the underlying base class implementation.
When reporting a target is up to date, quote the target like make (backquote-quote) instead of with double quotes.
Fix handling of ../* targets when using -U, -D or -u.
From Steve Leblanc:
From Gary Oberbrunner:
From Anthony Roach
From David Snopek
Fix use of SConf in paths with white space in them.
Add CheckFunc and CheckType functionality to SConf.
Fix use of SConf with Builders that return a list of nodes.
From David Snopek and Christoph Wiedemann
From Greg Spencer
Check for the existence of MS Visual Studio on disk before using it, to avoid getting fooled by leftover junk in the registry.
Add support for MSVC++ .NET.
Add support for MS Visual Studio project files (DSP, DSW, SLN and VCPROJ files).
From Christoph Wiedemann
Fix a bug when BuildDir(duplicate=0) is used and SConscript files are called from within other SConscript files.
From Charles Crain:
Fix a bug when BuildDir(duplicate=0) is used and SConscript files are called from within other SConscript files.
Support (older) versions of Perforce which don't set the Windows registry.
Remove deprecated features: the "name" argument to Builder objects, and the Environment.Update() method.
From Charles Crain:
Added support for the Perforce source code management system.
Fix str(Node.FS) so that it returns a path relative to the calling SConscript file's directory, not the top-level directory.
Added support for a separate src_dir argument to SConscript() that allows explicit specification of where the source files for an SConscript file can be found.
Support more easily re-usable flavors of command generators by calling callable variables when strings are expanded.
From Steven Knight:
Added an INSTALL construction variable that can be set to a function to control how the Install() and InstallAs() Builders install files. The default INSTALL function now copies, not links, files.
Remove deprecated features: the "name" argument to Builder objects, and the Environment.Update() method.
Add an Environment.SourceCode() method to support fetching files from source code systems. Add factory methods that create Builders to support BitKeeper, CVS, RCS, and SCCS. Add support for fetching files from RCS or SCCS transparently (like GNU Make).
Make the internal to_String() function more efficient.
Make the error message the same as other build errors when there's a problem unlinking a target file in preparation for it being built.
Make TARGET, TARGETS, SOURCE and SOURCES reserved variable names and warn if the user tries to set them in a construction environment.
Add support for Tar and Zip files.
Better documentation of the different ways to export variables to a subsidiary SConscript file. Fix documentation bugs in a tools example, places that still assumed SCons split strings on white space, and typos.
Support fetching arbitrary files from the TARGETS or SOURCES lists (e.g. ${SOURCES[2]}) when calculating the build signature of a command.
Don't silently swallow exceptions thrown by Scanners (or other exceptions while finding a node's dependent children).
Push files to CacheDir() before calling the superclass built() method (which may clear the build signature as part of clearing cached implicit dependencies, if the file has a source scanner). (Bug reported by Jeff Petkau.)
Raise an internal error if we attempt to push a file to CacheDir() with a build signature of None.
Add an explicit Exit() function for terminating early.
Change the documentation to correctly describe that the -f option doesn't change to the directory in which the specified file lives.
Support changing directories locally with SConscript directory path names relative to any SConstruct file specified with -f. This allows you to build in another directory by simply changing there and pointing at the SConstruct file in another directory.
Change the default SConscriptChdir() behavior to change to the SConscript directory while it's being read.
Fix an exception thrown when the -U option was used with no Default() target specified.
Fix -u so that it builds things in corresponding build directories when used in a source directory.
From Lachlan O'Dea:
Add SharedObject() support to the masm tool.
Fix WhereIs() to return normalized paths.
From Jeff Petkau:
Don't copy a built file to a CacheDir() if it's already there.
Avoid partial copies of built files in a CacheDir() by copying to a temporary file and renaming.
From Anthony Roach:
Doc changes: Eliminate description of deprecated "name" keyword argument from Builder definition (reported by Gary Ruben).
From Chad Austin:
Add support for IRIX and the SGI MIPSPro tool chain.
Support using the MSVC tool chain when running Cygwin Python.
From Michael Cook:
From Charles Crain:
Added new AddPreAction() and AddPostAction() functions that support taking additional actions before or after building specific targets.
Add support for the PharLap ETS tool chain.
From Steven Knight:
Allow Python function Actions to specify a list of construction variables that should be included in the Action's signature.
Allow libraries in the LIBS variable to explicitly include the prefix and suffix, even when using the GNU linker. (Bug reported by Neal Becker.)
Use DOS-standard CR-LF line endings in the scons.bat file. (Bug reported by Gary Ruben.)
Doc changes: Eliminate description of deprecated "name" keyword argument from Builder definition (reported by Gary Ruben).
Support using env.Append() on BUILDERS (and other dictionaries). (Bug reported by Bj=F6rn Bylander.)
Setting the BUILDERS construction variable now properly clears the previous Builder attributes from the construction Environment. (Bug reported by Bj=F6rn Bylander.)
Fix adding a prefix to a file when the target isn't specified. (Bug reported by Esa Ilari Vuokko.)
Clean up error messages from problems duplicating into read-only BuildDir directories or into read-only files.
Add a CommandAction.strfunction() method, and add an "env" argument to the FunctionAction.strfunction() method, so that all Action objects have strfunction() methods, and the functions for building and returning a string both take the same arguments.
Add support for new CacheDir() functionality to share derived files between builds, with related options --cache-disable, --cache-force, and --cache-show.
Change the default behavior when no targets are specified to build everything in the current directory and below (like Make). This can be disabled by specifying Default(None) in an SConscript.
Revamp SCons installation to fix a case-sensitive installation on Win32 systems, and to add SCons-specific --standard-lib, --standalone-lib, and --version-lib options for easier user control of where the libraries get installed.
Fix the ability to directly import and use Platform and Tool modules that have been implicitly imported into an Environment().
Add support for allowing an embedding interface to annotate a node when it's created.
Extend the SConscript() function to accept build_dir and duplicate keyword arguments that function like a BuildDir() call.
From Steve Leblanc:
From Anthony Roach:
Use a different shared object suffix (.os) when using gcc so shared and static objects can exist side-by-side in the same directory.
Allow the same object files on Win32 to be linked into either shared or static libraries.
Cache implicit cache values when using --implicit-cache.
Your coding agent can read these notes before it upgrades. Set up the MCP server →