SCons 4.9.0 Released
Bill Deegan <bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org> Sun, 2 Mar 2025 14:14:03 -0800
| Newsgroups | gmane.comp.programming.tools.scons.devel |
|---|---|
| Message-ID | <CAEyG4CFe=UTpz2=au5curptDiiMHfs73cv2BCnBJKhZk88=49g@mail.gmail.com> |
--===============4611480180846483605==
Content-Type: multipart/alternative; boundary="000000000000227d65062f635cbc"
--000000000000227d65062f635cbc
Content-Type: text/plain; charset="UTF-8"
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.
CHANGED/ENHANCED EXISTING FUNCTIONALITY
---------------------------------------
- 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:
- 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, 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:
- Update the optional integer suffixes to include the z|Z and wb|WB
suffixes.
- 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 method for attempted conversion of a define expansion value
to an integer from a literal to a constant expression evaluation.
- 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.
FIXES
-----
- 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.
IMPROVEMENTS
------------
- 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.
DOCUMENTATION
-------------
- 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.
DEVELOPMENT
-----------
- 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.
Thanks to the following contributors listed below for their contributions
to this release.
==========================================================================================
.. 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)
--000000000000227d65062f635cbc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">A new SCons release, 4.9.0, is now available on the SCons =
download page:<br><br>=C2=A0 =C2=A0 <a href=3D"https://scons.org/pages/down=
load.html">https://scons.org/pages/download.html</a><br><br>Here is a summa=
ry of the changes since 4.8.1:<br><br>NOTE: Since SCons 4.9.0, Python 3.7.0=
or above is required.<br><br><br>CHANGED/ENHANCED EXISTING FUNCTIONALITY<b=
r>---------------------------------------<br>- Expose the `extra_libs` keyw=
ord argument in `CheckLibWithHeader` and 'CheckLib'<br><br>- Remove=
d Python 3.6 support.<br><br>- Override environments, created when giving c=
onstruction environment<br>=C2=A0 keyword arguments to Builder calls (or ma=
nually, through the<br>=C2=A0 undocumented Override method), were modified =
not to "leak" on item deletion.<br>=C2=A0 The item will now not b=
e deleted from the base environment.<br><br>- Added support for tracking be=
amer themes in the LaTeX scanner.<br><br>- MSVS: msvs project files are alw=
ays generated before the corresponding<br>=C2=A0 msvs solution files. This =
changes the behavior of clean for a project<br>=C2=A0 generated with auto_b=
uild_solution disabled and explicit solution<br>=C2=A0 generation: when the=
solution files are cleaned, the project files are<br>=C2=A0 also cleaned.=
=C2=A0 The tests for vs 6.0-7.1 were updated accordingly.<br><br>- MSVS: Ad=
d an optional keyword argument, auto_filter_projects, to<br>=C2=A0 MSVSSolu=
tion. Accepted values for auto_filter_projects are:<br><br>=C2=A0 - None [d=
efault]: raise an exception when solution file names or nodes<br>=C2=A0 =C2=
=A0 are detected in the projects argument list.<br>=C2=A0 - True or evaluat=
es True: automatically remove solution file names and<br>=C2=A0 =C2=A0 node=
s from the project argument list.<br>=C2=A0 - False or evaluates False: lea=
ve solution file names and nodes in the<br>=C2=A0 =C2=A0 project argument l=
ist.=C2=A0 An exception is not raised.<br><br>=C2=A0 Solution file names an=
d/or nodes in the project argument list cause<br>=C2=A0 erroneous Project r=
ecords to be produced in the generated solution file.<br>=C2=A0 As a conven=
ience, a user may elect to ignore solution file names and nodes<br>=C2=A0 i=
n the projects argument list rather than manually removing solution file<br=
>=C2=A0 names and nodes from the MSVSProject return values.<br><br>- SCons =
C preprocessor:<br><br>=C2=A0 - Update the optional integer suffixes to inc=
lude the z|Z and wb|WB<br>=C2=A0 =C2=A0 suffixes.<br>=C2=A0 - Add support f=
or binary integer constants.<br>=C2=A0 - Add support for octal integer cons=
tants.=C2=A0 Previously, octal integers<br>=C2=A0 =C2=A0 were evaluated as =
decimal integers.=C2=A0 A literal zero (0) is treated as an<br>=C2=A0 =C2=
=A0 octal number.<br>=C2=A0 - Change the method for attempted conversion of=
a define expansion value<br>=C2=A0 =C2=A0 to an integer from a literal to =
a constant expression evaluation.<br><br>- Add a tag to each CacheDir to le=
t systems ignore backing it up<br>=C2=A0 (per <a href=3D"https://bford.info=
/cachedir/">https://bford.info/cachedir/</a>). Update the way a CacheDir<br=
>=C2=A0 is created, since it now has to create two files.<br><br>- The Dict=
ionary method now has an as_dict flag. If true, Dictionary<br>=C2=A0 always=
returns =C2=A0a dict. The default remains to return different<br>=C2=A0 ty=
pes depending on whether zero, one, or multiple construction<br><br>- A Var=
iables object now makes available a "defaulted" attribute,<br>=C2=
=A0 a list of variable names that were set in the environment with<br>=C2=
=A0 their values taken from the default in the variable description<br>=C2=
=A0 (if a variable was set to the same value as the default in one<br>=C2=
=A0 of the input sources, it is not included in this list).<br><br>- If a b=
uild Variable is created with no aliases, the name of the<br>=C2=A0 Variabl=
e is no longer listed in its aliases. Internally, the name<br>=C2=A0 and al=
iases are considered together anyway so this should not have<br>=C2=A0 any =
effect except for being visible to custom help text formatters.<br><br>FIXE=
S<br>-----<br><br>- PackageVariable now does what the documentation always =
said it does<br>=C2=A0 if the variable is used on the command line with one=
of the enabling<br>=C2=A0 string as the value: the variable's default =
value is produced (previously<br>=C2=A0 it always produced True in this cas=
e).<br><br>- Temporary files created by TempFileMunge() are now cleaned up =
on<br>=C2=A0 scons exit, instead of at the time they're used.=C2=A0 Fix=
es #4595.<br><br>- AddOption now correctly adds short (single-character) op=
tions.<br>=C2=A0 Previously an added short option would always report as un=
known,<br>=C2=A0 while long option names for the same option worked. Short =
options<br>=C2=A0 that take a value require the user to specify the value i=
mmediately<br>=C2=A0 following the option, with no spaces (e.g. -j5 and not=
-j 5).<br><br>- Fix a problem with compilation_db component initialization=
- the<br>=C2=A0 entries for assembler files were not being set up correctl=
y.<br><br>- On Darwin, PermissionErrors are now handled while trying to acc=
ess<br>=C2=A0 /etc/paths.d. This may occur if SCons is invoked in a sandbox=
ed environment<br>=C2=A0 (such as Nix).<br><br>- Added error handling when =
creating MSVC detection debug log file specified<br>=C2=A0 by SCONS_MSCOMMO=
N_DEBUG.<br><br>- MSVS: Modify select msvs test scripts to run on platforms=
not supported by<br>=C2=A0 the msvs/msvc tool implementation via a default=
host architecture for<br>=C2=A0 unsupported platforms.<br><br>- MSVS: Fixe=
d early loop exit in select msvs test scripts.=C2=A0 Select msvs test<br>=
=C2=A0 scripts were being invoked for msvc version 8.0 only.=C2=A0 Addition=
al msvs<br>=C2=A0 tool and test changes due to the msvs test scripts being =
run for all msvc<br>=C2=A0 versions (i.e., minor test and tool issues went =
undetected).<br><br>- MSVS: for variant build configurations, msvs solution=
files are<br>=C2=A0 generated in the source directory and a placeholder fi=
le is generated in<br>=C2=A0 the variant build directory.=C2=A0 This mirror=
s the behavior of generated<br>=C2=A0 msvs project files.<br><br>- MSVS: ms=
vs project files are generated before the corresponding msvs<br>=C2=A0 solu=
tion file.=C2=A0 User-specified project GUIDs should now be correctly<br>=
=C2=A0 written to the solution file.<br><br>- SCons C preprocessor: Preserv=
e literals that contain valid integer<br>=C2=A0 substring specifications.=
=C2=A0 Previously, the integer suffix could be<br>=C2=A0 stripped from a sy=
mbol that contained an integer and suffix substring.<br><br>- SCons C prepr=
ocessor: Update the optional integer suffixes to include<br>=C2=A0 support =
for the alternate orderings of unsigned with long or long long as<br>=C2=A0=
defined in the c/cpp grammar.<br><br>- SCons C preprocessor: Update the op=
tional integer suffixes for case<br>=C2=A0 insensitive specifications as de=
fined in the c/cpp grammar.<br><br>- Fix nasm test for missing include file=
, cleanup.<br><br>- Skip running a few validation tests if the user is root=
and the test is<br>=C2=A0 not designed to work for the root user.<br><br>-=
Make sure unknown variables from a Variables file are recognized<br>=C2=A0=
as such. Previously only unknowns from the command line were<br>=C2=A0 rec=
ognized (issue #4645).<br><br>- Update ninja tool to use ninja.BIN_DIR to f=
ind pypi packaged ninja binary.<br>=C2=A0 python ninja package version 1.11=
.1.2 changed the location and previous<br>=C2=A0 logic no longer worked.<br=
><br>- The (optional) C Conditional Scanner now does limited macro<br>=C2=
=A0 replacement on the contents of CPPDEFINES, to improve finding deps<br>=
=C2=A0 that are conditionally included.=C2=A0 Previously replacement was on=
ly<br>=C2=A0 done on macro definitions found in the file being scanned.<br>=
=C2=A0 Only object-like macros are replaced (not function-like), and<br>=C2=
=A0 only on a whole-word basis; recursion is limited to five levels<br>=C2=
=A0 and does not error out if that limit is reached (issue #4523).<br><br>-=
Minor modernization: make use of stat object's st_mode, st_mtime<br>=
=C2=A0 and other attributes rather than indexing into stat return.<br><br>-=
Ninja's TEMPLATE rule pool changed from `local_pool` to `install_pool`=
<br>=C2=A0 hoping it will fix a race condition that can occurs when Ninja d=
efers<br>=C2=A0 to SCons to build.<br><br>- Renamed env.Help() & Help()=
's argument `keep_local` to `local_only`, previously the documentation<=
br>=C2=A0 specified `local_only`, but the code and tests were using `keep_l=
ocal`. The functionality<br>=C2=A0 more closely matches local only.=C2=A0 N=
OTE: It doesn't seem like any code in the wild was using<br>=C2=A0 loca=
l_only as we'd not received any reports of such until PR #4606 from hed=
ger.<br><br>- Fix Issue #2281, AddPreAction() & AddPostAction() were be=
ing ignored if no action<br>=C2=A0 was specified when the Alias was initial=
ly created.<br><br>- Handle case of "memoizer" as one member of a=
comma-separated<br>=C2=A0 --debug string - this was previously missed.<br>=
<br>IMPROVEMENTS<br>------------<br><br>- For consistency with the optparse=
"add_option" method, AddOption accepts<br>=C2=A0 an SConsOption =
object as a single argument (this failed previously).<br>=C2=A0 Calling Add=
Option with the full set of arguments (option names and<br>=C2=A0 attribute=
s) to set up the option is still the recommended approach.<br><br>- Add cla=
ng and clang++ to the default tool search orders for POSIX<br>=C2=A0 and Wi=
ndows platforms. These will be searched for after gcc and g++,<br>=C2=A0 re=
spectively. Does not affect explicitly requested tool lists.=C2=A0 Note:<br=
>=C2=A0 on Windows, SCons currently only has builtin support for clang, not=
<br>=C2=A0 for clang-cl, the version of the frontend that uses cl.exe-compa=
tible<br>=C2=A0 command line switches.<br><br><br>DOCUMENTATION<br>--------=
-----<br><br>- Some manpage cleanup for the gettext and pdf/ps builders.<br=
><br>- Some clarifications in the User Guide "Environments" chapt=
er.<br><br>- Clarify documentation of Repository() in manpage and user guid=
e.<br><br>- Many grammatical and spelling fixes in the documentation.<br><b=
r>- Update Clean and NoClean documentation.<br><br>- Improved Variables doc=
umentation.<br><br>- Update the User Guide Command() example which now show=
s a target name<br>=C2=A0 being created from '${SOURCE.base}.out' t=
o use a valid special<br>=C2=A0 attribute and to explain what's being d=
one in the example.<br><br>DEVELOPMENT<br>-----------<br><br>- Ruff/Mypy: E=
xcluded items now synced.<br><br>- Ruff: Linter includes new rules - `FA`, =
`UP006`, `UP007`, and `UP037` - to<br>=C2=A0 detect and upgrade legacy type=
-hint syntax.<br><br>- Removed "<a href=3D"http://SCons.Util.sctyping.=
py">SCons.Util.sctyping.py</a>", as the functionality can now be subst=
ituted<br>=C2=A0 via top-level `from __future__ import annotations`.<br><br=
>- Implemented type hints for Nodes.<br><br>- Added TestSCons.NINJA_BINARY =
to TestSCons to centralize logic to find ninja binary<br><br>- Refactored S=
Cons.Tool.ninja -> SCons.Tool.ninja_tool, and added alias so env.Tool(&#=
39;ninja')<br>=C2=A0 will still work. This avoids conflicting with the =
pypi module ninja.<br><br>Thanks to the following contributors listed below=
for their contributions to this release.<br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D<br>.. code-block:: text<br><br>=C2=A0 =C2=A0 git shortlog -=
-no-merges -ns 4.8.1..HEAD<br>=C2=A0 =C2=A0 50 =C2=A0Mats Wichmann<br>=C2=
=A0 =C2=A0 46 =C2=A0William Deegan<br>=C2=A0 =C2=A0 19 =C2=A0Joseph Brill<b=
r>=C2=A0 =C2=A0 10 =C2=A0Alex Thiessen<br>=C2=A0 =C2=A0 =C2=A04 =C2=A0Thadd=
eus Crews<br>=C2=A0 =C2=A0 =C2=A03 =C2=A0Ruben Di Battista<br>=C2=A0 =C2=A0=
=C2=A02 =C2=A0Adam Scott<br>=C2=A0 =C2=A0 =C2=A02 =C2=A0Keith F. Prussing<=
br>=C2=A0 =C2=A0 =C2=A02 =C2=A0Prabhu Singh Khalsa<br>=C2=A0 =C2=A0 =C2=A01=
=C2=A0Adam Simpkins<br>=C2=A0 =C2=A0 =C2=A01 =C2=A0Alex James<br>=C2=A0 =
=C2=A0 =C2=A01 =C2=A0Yevhen Babiichuk (DustDFG)<br><br><br></div>
--000000000000227d65062f635cbc--
--===============4611480180846483605==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev
--===============4611480180846483605==--