SCons 4.5.0 Released
Bill Deegan <bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org> Sun, 5 Mar 2023 17:26:26 -0500
| Newsgroups | gmane.comp.programming.tools.scons.devel |
|---|---|
| Message-ID | <CAEyG4CFnfxawK+eKx-8XETOOomkGHjnwG34ZiZOHk+y8PCJA2Q__42810.5490443826$1678055218$gmane$org@mail.gmail.com> |
--===============1829809414340350407==
Content-Type: multipart/alternative; boundary="000000000000f4ad5305f62eabb7"
--000000000000f4ad5305f62eabb7
Content-Type: text/plain; charset="UTF-8"
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.
NEW FUNCTIONALITY
-----------------
- 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
- Added --experimental=tm_v2, which enables Andrew Morrow's NewParallel Job
implementation.
This should scale much better for highly parallel builds. You can also
enable this via SetOption().
- 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.
DEPRECATED FUNCTIONALITY
------------------------
- The qt tool has been renamed qt3.
CHANGED/ENHANCED EXISTING FUNCTIONALITY
---------------------------------------
- Added -fsanitize support to ParseFlags(). This will propagate to CCFLAGS
and LINKFLAGS.
- Calling EnsureSConsVersion() and EnsurePythonVersion() won't initialize
DefaultEnvironment anymore.
- The console message from the Chmod() action function now displays
octal modes using the modern Python syntax (0o755 rather than 0755).
- Migrated logging logic for --taskmastertrace to use Python's logging
module. Added logging
to NewParallel Job class (Andrew Morrow's new parallel job implementation)
- Preliminary support for Python 3.12.
- Run LaTeX after biber/bibtex only if necessary
- Configure context methods CheckLib and CheckLibWithHeader now expose
two additional keyword arguments: 'append', which controls whether to
append
(the default) or prepend discovered libraries to $LIBS, and 'unique',
which controls whether to add the library if it is already in the $LIBS
list. This brings the library-adding functionality in Configure in line
with the regular Append, AppendUnique, Prepend and PrependUnique methods.
- CPPDEFINES values added via a dictionary type are longer sorted by
key. This used to be required to maintain a consistent order of
commandline arguments between SCons runs, but meant macros were not
always emitted in the order entered. Sorting is no longer required
after Python interpreter improvements. There might be a one-time
rebuild of targets that involved such sorted keys in their actions.
- 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.
FIXES
-----
- Added missing newline to generated compilation database
(compile_commands.json)
- A list argument as the source to the Copy() action function is now
handled.
Both the implementation and the strfunction which prints the progress
message were adjusted.
- The Java Scanner processing of JAVACLASSPATH for dependencies (behavior
that was introduced in SCons 4.4.0) is adjusted to split on the system's
search path separator instead of on a space. The previous behavior meant
that a path containing spaces (e.g. r"C:\somepath\My Classes") would
lead to unexpected errors. If the split-on-space behavior is desired,
pre-split the value: instead of: env["JAVACLASSPATH"] = "foo bar baz"
use: env["JAVACLASSPATH"] = env.Split("foo bar baz")
There is no change in how JAVACLASSPATH gets turned into the -classpath
argument passed to the JDK tools.
- 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
- Fixed command line argument --diskcheck: previously a value of 'none' was
ignored.
SetOption('diskcheck','none') is unaffected, as it did not have the
problem.
- 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.
- A refactor in the caching logic for version 4.4.0 left Java inner classes
failing with an exception when a CacheDir was enabled. This is now
corrected.
- When using the gfortran tool (the default on most platforms as long as a
GNU
toolchain is installed), the user setting of the "dialect" compilers
(F77, F90, F03 and F09, as well as the shared-library equivalents SHF77,
SHF90, SHF03, SHF09) is now honored; previously the tool overwrote the
settings to 'gfortran', which made it difficult reference a cross-compile
version for dialects.
- 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.
- Inconsistent behavior of adding values to the CPPDEFINES construction
variable has been cleaned up (described in issue #4254). Now a tuple,
whether provided by itself or as a member of a list, is consistently
interpreted as a macro with replacement value. When adding a list,
individual members are added in sequence without interpretation.
A string value containing spaces is split if it is the initial value or
added, but not if it is given as a member of an added list. Detection
of duplicate macros now works for both valued and unvalued forms.
- Handling of CPPDEFINES macros via Prepend and PrependUnique now works
(previously this was special-cased only for Append and AppendUnique).
IMPROVEMENTS
------------
- Changed the Taskmaster trace logic to use python's logging module.
- Add cache-debug messages for push failures.
- 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 were no
errors or warnings.
PACKAGING
---------
- SCons now has three requirements files: requirements.txt describes
requirements to run scons; requirements-dev.txt requirements to
develop it - mainly things needed to run the testsuite;
requirements_pkg.txt are the requirements to do a full build
(including docs build) with an intent to create the packages.
- 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.
- A zipapp of scons-local is now also built.
DOCUMENTATION
-------------
- Updated the --hash-format manpage entry.
- EnsureSConsVersion, EnsurePythonVersion, Exit, GetLaunchDir and
SConscriptChdir are now listed as Global functions only.
- Updated the docs for Glob.
- Updated SHELL_ENV_GENERATORS description and added versionadded indicator.
- JAVABOOTCLASSPATH, JAVACLASSPATH and JAVASOURCEPATH better document the
acceptable syntax for values, and how they will be interpreted,
including that JAVACLASSPATH will be scanned for dependencies.
Added note on the possibly surprising feature that SCons always passes
-sourcepath when calling javac, which affects how the class path is
used when finding sources.
- Updated the User Guide chapter on installation: modernized the notes
on Python installs, SCons installs, and having multiple SCons versions
present on a single system.
- Updated the User Guide chapter on variant directories with more
explanation, and the introduction of terms like "out of tree" that
may help in forming a mental model.
- Additional explanations for MSVSProject and MSVSSolution builders.
- Updated MSVC documentation - adds "version added" annotations on recently
added construction variables and provides a version-mapping table.
- Added further details in the documentation of Append and related methods
on the special handling of CPPDEFINES.
DEVELOPMENT
-----------
- 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
- Refactored SCons.Util, which had grown quite large, to be a package,
not a single-file module. Change should be transparent: the same import
of SCons.Util and public symbols from it will continue to work, however
code which reaches directly in to grab private symbols (starting with
underscore) which moved to a submodule, that code will have to be
adjusted,
as those are not imported to the package level (new SCons.Util.hashes has
some of these, which are used by existing unit tests).
- 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
Thanks to the following contributors listed below for their contributions
to this release.
==========================================================================================
.. 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
--000000000000f4ad5305f62eabb7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">A new SCons release, 4.5.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><br>Here is a s=
ummary of the changes since 4.4.0:<br><br>NOTE: If you build with Python 3.=
10.0 and then rebuild with 3.10.1 (or higher), you may<br>=C2=A0 =C2=A0 =C2=
=A0 see unexpected rebuilds. This is due to Python internals changing which=
changed<br>=C2=A0 =C2=A0 =C2=A0 the signature of a Python Action Function.=
<br><br>NOTE: If you use a dictionary to specify your CPPDEFINES, you may s=
ee an unexpected rebuild.<br>=C2=A0 =C2=A0 =C2=A0 The insertion order of di=
ctionary keys is now preserved when generating the command line.<br>=C2=A0 =
=C2=A0 =C2=A0 Previously these were sorted alphabecially.=C2=A0 This change=
to the command line,<br>=C2=A0 =C2=A0 =C2=A0 while generating identical se=
t of CPPDEFINES can change order and cause a rebuild.<br><br><br>NEW FUNCTI=
ONALITY<br>-----------------<br><br>- Added ValidateOptions() which will ch=
eck that all command line options are in either<br>=C2=A0 those specified b=
y SCons itself, or by AddOption() in SConstruct/SConscript.=C2=A0 It should=
<br>=C2=A0 not be called until all AddOption() calls are completed. Resolve=
s Issue #4187<br>- Added --experimental=3Dtm_v2, which enables Andrew Morro=
w's NewParallel Job implementation.<br>=C2=A0 This should scale much be=
tter for highly parallel builds.=C2=A0 You can also enable this via SetOpti=
on().<br>- Added FILE_ENCODING, to allow explicitly setting the text encodi=
ng for files<br>=C2=A0 written by the Textfile() and Substfile() builders. =
If not specified, Textfile() and Substfile() builders<br>=C2=A0 will write =
files as UTF-8.<br><br><br>DEPRECATED FUNCTIONALITY<br>--------------------=
----<br><br>- The qt tool has been renamed qt3.<br><br>CHANGED/ENHANCED EXI=
STING FUNCTIONALITY<br>---------------------------------------<br><br>- Add=
ed -fsanitize support to ParseFlags().=C2=A0 This will propagate to CCFLAGS=
and LINKFLAGS.<br>- Calling EnsureSConsVersion() and EnsurePythonVersion()=
won't initialize<br>=C2=A0 DefaultEnvironment anymore.<br>- The consol=
e message from the Chmod() action function now displays<br>=C2=A0 octal mod=
es using the modern Python syntax (0o755 rather than 0755).<br>- Migrated l=
ogging logic for --taskmastertrace to use Python's logging module. Adde=
d logging<br>=C2=A0 to NewParallel Job class (Andrew Morrow's new paral=
lel job implementation)<br>- Preliminary support for Python 3.12.<br>- Run =
LaTeX after biber/bibtex only if necessary<br>- Configure context methods C=
heckLib and CheckLibWithHeader now expose<br>=C2=A0 two additional keyword =
arguments: 'append', which controls whether to append<br>=C2=A0 (th=
e default) or prepend discovered libraries to $LIBS, and 'unique',<=
br>=C2=A0 which controls whether to add the library if it is already in the=
$LIBS<br>=C2=A0 list. This brings the library-adding functionality in Conf=
igure in line<br>=C2=A0 with the regular Append, AppendUnique, Prepend and =
PrependUnique methods.<br>- CPPDEFINES values added via a dictionary type a=
re longer sorted by<br>=C2=A0 key. This used to be required to maintain a c=
onsistent order of<br>=C2=A0 commandline arguments between SCons runs, but =
meant macros were not<br>=C2=A0 always emitted in the order entered. Sortin=
g is no longer required<br>=C2=A0 after Python interpreter improvements.=C2=
=A0 There might be a one-time <br>=C2=A0 rebuild of targets that involved s=
uch sorted keys in their actions.<br>- Renamed the 'qt' tools to &#=
39;qt3' since the logic in that tool is only for QT version 3. =C2=A0<b=
r>=C2=A0 Renamed all env vars which affect qt3 from QT_ to QT3_.=C2=A0 If y=
ou are still using SCons<br>=C2=A0 to build QT 3 code, you'll need to u=
pdate your SConscripts.=C2=A0 Note that using 'qt' tool <br>=C2=A0 =
has been deprecated for some time.<br><br><br>FIXES<br>-----<br><br>- Added=
missing newline to generated compilation database (compile_commands.json)<=
br>- A list argument as the source to the Copy() action function is now han=
dled.<br>=C2=A0 Both the implementation and the strfunction which prints th=
e progress<br>=C2=A0 message were adjusted.<br>- The Java Scanner processin=
g of JAVACLASSPATH for dependencies (behavior<br>=C2=A0 that was introduced=
in SCons 4.4.0) is adjusted to split on the system's<br>=C2=A0 search =
path separator instead of on a space. The previous behavior meant<br>=C2=A0=
that a path containing spaces (e.g. r"C:\somepath\My Classes") w=
ould<br>=C2=A0 lead to unexpected errors. If the split-on-space behavior is=
desired,<br>=C2=A0 pre-split the value: instead of: env["JAVACLASSPAT=
H"] =3D "foo bar baz"<br>=C2=A0 use: env["JAVACLASSPATH=
"] =3D env.Split("foo bar baz")<br>=C2=A0 There is no change=
in how JAVACLASSPATH gets turned into the -classpath<br>=C2=A0 argument pa=
ssed to the JDK tools.<br>- Ninja: Fix execution environment sanitation for=
launching ninja. Previously if you set an<br>=C2=A0 execution environment =
variable set to a python list it would crash. Now it<br>=C2=A0 will create =
a string joining the list with os.pathsep<br>- Fixed command line argument =
--diskcheck: previously a value of 'none' was ignored.<br>=C2=A0 Se=
tOption('diskcheck','none') is unaffected, as it did not ha=
ve the problem.<br>- Fixed Issue #4275 - when outputting compilation db and=
TEMPFILE was in use, the compilation db would have<br>=C2=A0 command lines=
using the generated tempfile for long command lines, instead of the full c=
ommand line for<br>=C2=A0 the compilation step for the source/target pair.<=
br>- A refactor in the caching logic for version 4.4.0 left Java inner clas=
ses<br>=C2=A0 failing with an exception when a CacheDir was enabled. This i=
s now corrected.<br>- When using the gfortran tool (the default on most pla=
tforms as long as a GNU<br>=C2=A0 toolchain is installed), the user setting=
of the "dialect" compilers<br>=C2=A0 (F77, F90, F03 and F09, as =
well as the shared-library equivalents SHF77,<br>=C2=A0 SHF90, SHF03, SHF09=
) is now honored; previously the tool overwrote the<br>=C2=A0 settings to &=
#39;gfortran', which made it difficult reference a cross-compile<br>=C2=
=A0 version for dialects.<br>- Fix issue #2757, where Configure checks that=
perform a check which reads a modified source<br>=C2=A0 (including program=
, source or header file(s)) would incorrectly mark that file "up to da=
te" so the<br>=C2=A0 actual build would not see the file as modified. =
Leading to incorrect incremental builds.<br>=C2=A0 Now configure checks now=
clear node info for non conftest nodes, so they will be re-evaluated for<b=
r>=C2=A0 the real taskmaster run when the build commences.<br>- Inconsisten=
t behavior of adding values to the CPPDEFINES construction<br>=C2=A0 variab=
le has been cleaned up (described in issue #4254). Now a tuple,<br>=C2=A0 w=
hether provided by itself or as a member of a list, is consistently<br>=C2=
=A0 interpreted as a macro with replacement value. When adding a list,<br>=
=C2=A0 individual members are added in sequence without interpretation.<br>=
=C2=A0 A string value containing spaces is split if it is the initial value=
or<br>=C2=A0 added, but not if it is given as a member of an added list.=
=C2=A0 Detection<br>=C2=A0 of duplicate macros now works for both valued an=
d unvalued forms.<br>- Handling of CPPDEFINES macros via Prepend and Prepen=
dUnique now works<br>=C2=A0 (previously this was special-cased only for App=
end and AppendUnique).<br><br>IMPROVEMENTS<br>------------<br><br>- Changed=
the Taskmaster trace logic to use python's logging module.<br>- Add ca=
che-debug messages for push failures.<br>- Added error message to handle th=
e case when SCons attempts to retrieve all the targets<br>=C2=A0 for a spec=
ified builder from the CacheDir, fails to do so, and then runs into an erro=
r<br>=C2=A0 when deleting the files which were retrieved. Previously if thi=
s happened there were no<br>=C2=A0 errors or warnings.<br><br>PACKAGING<br>=
---------<br><br>- SCons now has three requirements files: requirements.txt=
describes<br>=C2=A0 requirements to run scons; requirements-dev.txt requir=
ements to<br>=C2=A0 develop it - mainly things needed to run the testsuite;=
<br>=C2=A0 requirements_pkg.txt are the requirements to do a full build<br>=
=C2=A0 (including docs build) with an intent to create the packages.<br>- M=
oved rpm and debian directories under packaging<br>- Added logic to help pa=
ckagers enable reproducible builds into packaging/etc/.<br>=C2=A0 Please re=
ad packaging/etc/README.txt if you are interested.<br>- A zipapp of scons-l=
ocal is now also built.<br><br><br>DOCUMENTATION<br>-------------<br><br>- =
Updated the --hash-format manpage entry.<br>- EnsureSConsVersion, EnsurePyt=
honVersion, Exit, GetLaunchDir and<br>=C2=A0 SConscriptChdir are now listed=
as Global functions only.<br>- Updated the docs for Glob.<br>- Updated SHE=
LL_ENV_GENERATORS description and added versionadded indicator.<br>- JAVABO=
OTCLASSPATH, JAVACLASSPATH and JAVASOURCEPATH better document the<br>=C2=A0=
acceptable syntax for values, and how they will be interpreted,<br>=C2=A0 =
including that JAVACLASSPATH will be scanned for dependencies.<br>=C2=A0 Ad=
ded note on the possibly surprising feature that SCons always passes<br>=C2=
=A0 -sourcepath when calling javac, which affects how the class path is<br>=
=C2=A0 used when finding sources.<br>- Updated the User Guide chapter on in=
stallation: modernized the notes<br>=C2=A0 on Python installs, SCons instal=
ls, and having multiple SCons versions<br>=C2=A0 present on a single system=
.<br>- Updated the User Guide chapter on variant directories with more<br>=
=C2=A0 explanation, and the introduction of terms like "out of tree&qu=
ot; that<br>=C2=A0 may help in forming a mental model.<br>- Additional expl=
anations for MSVSProject and MSVSSolution builders.<br>- Updated MSVC docum=
entation - adds "version added" annotations on recently<br>=C2=A0=
added construction variables and provides a version-mapping table.<br>- Ad=
ded further details in the documentation of Append and related methods<br>=
=C2=A0 on the special handling of CPPDEFINES.<br><br>DEVELOPMENT<br>-------=
----<br><br>- Refactored SCons/Taskmaster into a package. Moved SCons/Jobs.=
py into that package.<br>=C2=A0 NOTE: If you hook into SCons.Jobs, you'=
ll have to change that to use <a href=3D"http://SCons.Taskmaster.Jobs">SCon=
s.Taskmaster.Jobs</a><br>- Refactored SCons.Util, which had grown quite lar=
ge, to be a package,<br>=C2=A0 not a single-file module. Change should be t=
ransparent: the same import<br>=C2=A0 of SCons.Util and public symbols from=
it will continue to work, however<br>=C2=A0 code which reaches directly in=
to grab private symbols (starting with<br>=C2=A0 underscore) which moved t=
o a submodule, that code will have to be adjusted,<br>=C2=A0 as those are n=
ot imported to the package level (new SCons.Util.hashes has<br>=C2=A0 some =
of these, which are used by existing unit tests).<br>- Added overrides argu=
ment to SCons.Subst.scons_subst(), subst_list(), subst(), and Action's =
process(),<br>=C2=A0 strfunction(). This allows passing a dictionary of env=
vars to override when evaluating subst()'d strings/lists<br><br><br>Tha=
nks to the following contributors listed below for their contributions to t=
his 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.4.0..HEAD<=
br>=C2=A0 =C2=A0 93 =C2=A0Mats Wichmann<br>=C2=A0 =C2=A0 85 =C2=A0William D=
eegan<br>=C2=A0 =C2=A0 =C2=A09 =C2=A0Anatoli Babenia<br>=C2=A0 =C2=A0 =C2=
=A08 =C2=A0Daniel Moody<br>=C2=A0 =C2=A0 =C2=A04 =C2=A0Andrew Morrow<br>=C2=
=A0 =C2=A0 =C2=A03 =C2=A0Ryan Saunders<br>=C2=A0 =C2=A0 =C2=A02 =C2=A0Flavi=
u Tamas<br>=C2=A0 =C2=A0 =C2=A01 =C2=A0Dan Mezhiborsky<br>=C2=A0 =C2=A0 =C2=
=A01 =C2=A0Lukas Schrangl<br>=C2=A0 =C2=A0 =C2=A01 =C2=A0Nickolai Korshunov=
<br>=C2=A0 =C2=A0 =C2=A01 =C2=A0TZe<br>=C2=A0 =C2=A0 =C2=A01 =C2=A0Thad Gui=
dry<br>=C2=A0 =C2=A0 =C2=A01 =C2=A0djh<br><br></div>
--000000000000f4ad5305f62eabb7--
--===============1829809414340350407==
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
--===============1829809414340350407==--