Skip to content

Commit 756c327

Browse files
committed
Merge branch 'master' into jbrill-msvc-detect
Manually resolved: * CHANGES.txt * RELEASE.txt
2 parents 3b95dd6 + 2f57d9d commit 756c327

39 files changed

+922
-669
lines changed

.appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ environment:
3636
matrix:
3737
# Test oldest and newest supported Pythons, and a subset in between.
3838
# Skipping 3.7 and 3.9 at this time
39-
- WINPYTHON: "Python311"
39+
- WINPYTHON: "Python312"
4040

4141
- WINPYTHON: "Python310"
4242

@@ -50,15 +50,15 @@ matrix:
5050
exclude:
5151
# test python 3.6 on Visual Studio 2017 image
5252
- image: Visual Studio 2017
53-
WINPYTHON: "Python311"
53+
WINPYTHON: "Python312"
5454
- image: Visual Studio 2017
5555
WINPYTHON: "Python310"
5656
- image: Visual Studio 2017
5757
WINPYTHON: "Python38"
5858

5959
# test python 3.8 on Visual Studio 2019 image
6060
- image: Visual Studio 2019
61-
WINPYTHON: "Python311"
61+
WINPYTHON: "Python312"
6262
- image: Visual Studio 2019
6363
WINPYTHON: "Python310"
6464
- image: Visual Studio 2019

CHANGES.txt

Lines changed: 62 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,7 @@ NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer suppo
99

1010
RELEASE VERSION/DATE TO BE FILLED IN LATER
1111

12-
From Ataf Fazledin Ahamed:
13-
- Use of NotImplemented instead of NotImplementedError for special methods
14-
of _ListVariable class
15-
1612
From Joseph Brill:
17-
- Fix issue #2755: the msvs tool no longer writes the OS environment SCONS_HOME
18-
value into the SCons environment when the SCONS_HOME variable already exists
19-
in the SCons environment. Prior to this change, a valid user-defined SCons
20-
environment value for SCONS_HOME would be overwritten with the OS environment
21-
value of SCONS_HOME which could be None (i.e., undefined).
22-
- Update the windows registry keys for detection of Visual Studio 2015 Express
23-
('14.0Exp'): the VS2015 registry key ('WDExpress') appears to be different
24-
than the registry key ('VCExpress') for earlier Visual Studio express
25-
versions. The registry key value is relative to the installation root rather
26-
than the VC folder and requires additional path components during evaluation.
27-
- Fix the vs-6.0-exec.py test script: the msvs generated project is 'foo.dsp'
28-
and the command-line invocation of the Visual Studio development environment
29-
program was attempting to build 'test.dsp'. The command-line invocation was
30-
changed to build 'foo.dsp'.
31-
- Update the msvs project generation test scripts: the msvs project execution
32-
tests could produce a "false positive" test result when the test executable is
33-
correctly built via the SConstruct env.Program() call and the command-line
34-
invocation of the Visual Studio development environment program fails. The
35-
test passes due to the existence of the test executable from the initial
36-
build. The tests were modified to delete the test executable, object file,
37-
and sconsign file prior to the command-line invocation of the VS development
38-
binary.
39-
- Method unlink_files was added to the TestCmd class that unlinks a list of
40-
files from a specified directory. An attempt to unlink a file is made only
41-
when the file exists; otherwise, the file is ignored.
42-
- Fix issue #4320: add an optional argument list string to configure's CheckFunc
43-
method so that the generated function argument list matches the function's
44-
prototype when including a header file.
4513
- For msvc version specifications without an 'Exp' suffix, an express installation
4614
is used when no other edition is detected for the msvc version. Similarly, an
4715
express installation of the IDE binary is used when no other IDE edition is
@@ -96,15 +64,62 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
9664
and then later an environment is constructed with a user specified vswhere
9765
executable that detects new msvc installations.
9866

67+
From Mats Wichmann:
68+
69+
- Updated Value Node docs and tests.
70+
- Python 3.13 compat: re.sub deprecated count, flags as positional args,
71+
caused update-release-info test to fail.
72+
- Dump() with json format selected now recognizes additional compound types
73+
(UserDict and UserList), which improves the detail of the display.
74+
json output is also sorted, to match the default display.
75+
76+
77+
RELEASE 4.7.0 - Sun, 17 Mar 2024 17:22:20 -0700
78+
79+
From Ataf Fazledin Ahamed:
80+
- Use of NotImplemented instead of NotImplementedError for special methods
81+
of _ListVariable class
82+
83+
From Joseph Brill:
84+
- Fix issue #2755: the msvs tool no longer writes the OS environment SCONS_HOME
85+
value into the SCons environment when the SCONS_HOME variable already exists
86+
in the SCons environment. Prior to this change, a valid user-defined SCons
87+
environment value for SCONS_HOME would be overwritten with the OS environment
88+
value of SCONS_HOME which could be None (i.e., undefined).
89+
- Update the windows registry keys for detection of Visual Studio 2015 Express
90+
('14.0Exp'): the VS2015 registry key ('WDExpress') appears to be different
91+
than the registry key ('VCExpress') for earlier Visual Studio express
92+
versions. The registry key value is relative to the installation root rather
93+
than the VC folder and requires additional path components during evaluation.
94+
- Fix the vs-6.0-exec.py test script: the msvs generated project is 'foo.dsp'
95+
and the command-line invocation of the Visual Studio development environment
96+
program was attempting to build 'test.dsp'. The command-line invocation was
97+
changed to build 'foo.dsp'.
98+
- Update the msvs project generation test scripts: the msvs project execution
99+
tests could produce a "false positive" test result when the test executable is
100+
correctly built via the SConstruct env.Program() call and the command-line
101+
invocation of the Visual Studio development environment program fails. The
102+
test passes due to the existence of the test executable from the initial
103+
build. The tests were modified to delete the test executable, object file,
104+
and sconsign file prior to the command-line invocation of the VS development
105+
binary.
106+
- Method unlink_files was added to the TestCmd class that unlinks a list of
107+
files from a specified directory. An attempt to unlink a file is made only
108+
when the file exists; otherwise, the file is ignored.
109+
- Fix issue #4320: add an optional argument list string to configure's CheckFunc
110+
method so that the generated function argument list matches the function's
111+
prototype when including a header file.
112+
99113
From Thaddeus Crews:
114+
- Explicitly wrap non-serializable values in json dump
100115
- Implemented SCons.Util.sctyping as a safe means of hinting complex types. Currently
101116
only implemented for `Executor` as a proof-of-concept.
102117

103118
From William Deegan:
104119
- Fix sphinx config to handle SCons versions with post such as: 4.6.0.post1
105120

106121
From Michał Górny:
107-
- Remove unecessary dependencies on pypi packages from setup.cfg
122+
- Remove unnecessary dependencies on pypi packages from setup.cfg
108123

109124
From Sten Grüner:
110125
- Fix of the --debug=sconscript option to return exist statements when using return
@@ -144,6 +159,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
144159
harder to decode non-UTF-8 text. SCons.Util.to_Text now exists
145160
to convert a byte stream, such as "raw" file data. Fixes #3569, #4462.
146161
The Pseudo manpage entry was updated to provide more clarity.
162+
- Clarify how SCons finds the project top directory, and what that is used for.
147163
- The internal routine which implements the PyPackageDir function
148164
would fail with an exception if called with a module which is
149165
not found. It will now return None. Updated manpage entry and
@@ -152,6 +168,19 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
152168
describe the Microsoft C++ compiler. Update the version table slightly.
153169
Amplified the usage of MSVC_VERSION.
154170
- Improve SharedLibrary docs a bit.
171+
- More consistent use of &Python; in the manpage. A few links added.
172+
A warning about overwriting env['ENV'] and one about Configure
173+
checks possibly not running in in no-exec mode also added.
174+
- Update warnings module: adds docstrings, drop three unused warnings
175+
(DeprecatedSourceCodeWarning, TaskmasterNeedsExecuteWarning,
176+
DeprecatedMissingSConscriptWarning) add two warnings to manpage
177+
(cache-cleanup-error, future-reserved-variable), improve unittest, tweak
178+
Sphinx build.
179+
- Add locking around creation of CacheDir config file. Fixes #4489.
180+
- Clarify MergeFlags usage of a dict argument.
181+
- SCons documentation build can now be controlled through SKIP_DOC
182+
variable - rather than just true/false can now specify
183+
skip none, skip all, skip pdf docs, skip api docs.
155184

156185

157186
RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700

README-SF.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ By default, the above commands will do the following:
134134
- Install scripts named "scons" and "sconsign" scripts in the default system
135135
script directory (/usr/bin or C:\\Python\*\\Scripts, for example).
136136

137-
- Install "scons-4.5.1.exe" and "scons.exe" executables in the Python
137+
- Install "scons-4.7.0.exe" and "scons.exe" executables in the Python
138138
prefix directory on Windows (C:\\Python\*, for example).
139139

140140
- Install the SCons build engine (a Python module) in the standard Python library directory
@@ -391,7 +391,7 @@ about `Executing SCons Without Installing`_)::
391391
Depending on the utilities installed on your system, any or all of the
392392
following packages will be built::
393393

394-
SCons-4.5.1-py3-none-any.whl
394+
SCons-4.7.0-py3-none-any.whl
395395
SCons-4.7.0ayyyymmdd.tar.gz
396396
SCons-4.7.0ayyyymmdd.zip
397397
scons-doc-4.7.0ayyyymmdd.tar.gz

README-package.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,5 +192,5 @@ For More Information
192192
Check the SCons web site at https://www.scons.org/
193193

194194

195-
Copyright (c) 2001 - 2021 The SCons Foundation
195+
Copyright (c) 2001 - 2024 The SCons Foundation
196196

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,4 +299,4 @@ many contributors, including but not at all limited to:
299299

300300
\... and many others.
301301

302-
Copyright (c) 2001 - 2021 The SCons Foundation
302+
Copyright (c) 2001 - 2024 The SCons Foundation

RELEASE.txt

Lines changed: 13 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,17 @@ Past official release announcements appear at:
66

77
==================================================================
88

9-
A new SCons release, 4.6.1, is now available on the SCons download page:
9+
A new SCons release, 4.7.1, is now available on the SCons download page:
1010

1111
https://scons.org/pages/download.html
1212

1313

14-
Here is a summary of the changes since 4.6.0:
14+
Here is a summary of the changes since 4.7.0:
1515

1616
NEW FUNCTIONALITY
1717
-----------------
1818

19-
- Method unlink_files was added to the TestCmd class that unlinks a list of files
20-
from a specified directory. An attempt to unlink a file is made only when the
21-
file exists; otherwise, the file is ignored.
22-
19+
- List new features (presumably why a checkpoint is being released)
2320

2421
DEPRECATED FUNCTIONALITY
2522
------------------------
@@ -29,11 +26,9 @@ DEPRECATED FUNCTIONALITY
2926
CHANGED/ENHANCED EXISTING FUNCTIONALITY
3027
---------------------------------------
3128

32-
- Add an optional argument list string to configure's CheckFunc method so
33-
that the generated function argument list matches the function's
34-
prototype when including a header file. Fixes GH Issue #4320
35-
- Now supports pre-release Python 3.13
36-
- Support for Python versions without support for the `threading` package has been removed
29+
- Dump() with json format selected now recognizes additional compound types
30+
(UserDict and UserList), which improves the detail of the display.
31+
json output is also sorted, to match the default display.
3732
- MSVC: For msvc version specifications without an 'Exp' suffix, an express
3833
installation is used when no other edition is detected for the msvc version.
3934
This was the behavior for Visual Studio 2008 (9.0) through Visual Studio 2015
@@ -44,18 +39,6 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY
4439
FIXES
4540
-----
4641

47-
- Fix of the --debug=sconscript option to return exist statements when using return
48-
statement with stop flag enabled
49-
- MSVS: prevent overwriting the SCons environment variable SCONS_HOME with the OS
50-
environment value of SCONS_HOME in the msvs tool.
51-
- MSVC: Fix the detection of Visual Studio 2015 Express ('14.0Exp') by adding a
52-
registry key definition and updating the installation root-relative registry value
53-
at runtime for the location of the VC folder.
54-
- MSVS: Fix the msvs project generation test for MSVS 6.0 to use the correct name of
55-
the generated project file.
56-
- MSVS: Fix the msvs project generation test scripts so that "false positive" tests
57-
results are not possible when the initial build is successful and the command-line
58-
build of the project file fails.
5942
- MSVC: Visual Studio 2010 (10.0) could be inadvertently detected due to an
6043
sdk-only install of Windows SDK 7.1. An sdk-only install of Visual Studio
6144
2010 is ignored as the msvc batch files will fail. The installed files are
@@ -85,30 +68,10 @@ FIXES
8568
For example, when no vswhere executable is found for the initial detection
8669
and then later an environment is constructed with a user specified vswhere
8770
executable that detects new msvc installations.
88-
- On Windows platform, when collecting command output (Configure checks),
89-
make sure decoding of bytes doesn't fail.
90-
- Documentation indicated that both Pseudo() and env.Pseudo() were usable,
91-
but Pseudo() did not work; is now enabled.
92-
- Improve handling of file data that SCons itself processes - as in
93-
scanners - try harder to decode non-UTF-8 text.
94-
- PyPackageDir no longer fails if passed a module name which cannot be found,
95-
now returns None.
9671

9772
IMPROVEMENTS
9873
------------
9974

100-
- Use of NotImplemented instead of NotImplementedError for special methods
101-
of _ListVariable class
102-
- The NewParallel scheduler is now the default, the `tm_v2` flag is removed,
103-
and the old scheduler is opt-in under `--experimental=legacy_sched`. Additionally,
104-
the new scheduler is now used for -j1 builds as well.
105-
NOTE: This should significantly improve SCons performance for larger parallel builds
106-
(Larger -j values)
107-
- CacheDir writes no longer happen within the taskmaster critical section, and therefore
108-
can run in parallel with both other CacheDir writes and the taskmaster DAG walk.
109-
- The NewParallel scheduler now only adds threads as new work requiring execution
110-
is discovered, up to the limit set by -j. This should reduce resource utilization
111-
when the achievable parallelism in the DAG is less than the -j limit.
11275
- MSVC: Visual Studio 2015 Express (14.0Exp) does not support the sdk version
11376
argument. Visual Studio 2015 Express does not support the store argument for
11477
target architectures other than x86. Script argument validation now takes into
@@ -120,26 +83,23 @@ IMPROVEMENTS
12083
PACKAGING
12184
---------
12285

123-
- Remove unecessary dependencies on pypi packages from setup.cfg
86+
- List changes in the way SCons is packaged and/or released
87+
12488

12589
DOCUMENTATION
12690
-------------
12791

128-
- Fixed the Scanner examples in the User Guide to be runnable and added
129-
some more explantion. Clarified discussion of the scanner function in
130-
the Scanner Objects section of the manpage.
131-
- The manpage entry for Pseudo was clarified.
132-
- The manpage entry for SharedLibrary was clarified.
92+
- Updated Value Node docs.
93+
94+
13395

13496
DEVELOPMENT
13597
-----------
13698

137-
- Fix sphinx config to handle SCons versions with post such as: 4.6.0.post1
138-
- Created SCons.Util.sctyping to contain complex type information, allowing
139-
for repo-wide type hinting without causing cyclical dependencies.
99+
- List visible changes in the way SCons is developed
140100

141101
Thanks to the following contributors listed below for their contributions to this release.
142102
==========================================================================================
143103
.. code-block:: text
144104

145-
git shortlog --no-merges -ns 4.6.0..HEAD
105+
git shortlog --no-merges -ns 4.0.1..HEAD

ReleaseConfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# If the release type is not 'final', the patchlevel is set to the
3232
# release date. This value is mandatory and must be present in this file.
3333
#version_tuple = (2, 2, 0, 'final', 0)
34-
version_tuple = (4, 6, 1, 'a', 0)
34+
version_tuple = (4, 6, 2, 'a', 0)
3535

3636
# Python versions prior to unsupported_python_version cause a fatal error
3737
# when that version is used. Python versions prior to deprecate_python_version

SCons/CacheDir.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import SCons.Action
3535
import SCons.Errors
3636
import SCons.Warnings
37-
import SCons
37+
import SCons.Util
3838

3939
cache_enabled = True
4040
cache_debug = False
@@ -169,15 +169,16 @@ def _readconfig(self, path):
169169
"""
170170
config_file = os.path.join(path, 'config')
171171
try:
172+
# still use a try block even with exist_ok, might have other fails
172173
os.makedirs(path, exist_ok=True)
173-
except FileExistsError:
174-
pass
175174
except OSError:
176175
msg = "Failed to create cache directory " + path
177176
raise SCons.Errors.SConsEnvironmentError(msg)
178177

179178
try:
180-
with open(config_file, 'x') as config:
179+
with SCons.Util.FileLock(config_file, timeout=5, writer=True), open(
180+
config_file, "x"
181+
) as config:
181182
self.config['prefix_len'] = 2
182183
try:
183184
json.dump(self.config, config)
@@ -186,9 +187,11 @@ def _readconfig(self, path):
186187
raise SCons.Errors.SConsEnvironmentError(msg)
187188
except FileExistsError:
188189
try:
189-
with open(config_file) as config:
190+
with SCons.Util.FileLock(config_file, timeout=5, writer=False), open(
191+
config_file
192+
) as config:
190193
self.config = json.load(config)
191-
except ValueError:
194+
except (ValueError, json.decoder.JSONDecodeError):
192195
msg = "Failed to read cache configuration for " + path
193196
raise SCons.Errors.SConsEnvironmentError(msg)
194197

SCons/Defaults.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ containing the
5757
<filename>SConstruct</filename>
5858
file.
5959
</para>
60+
<para>
61+
If variant directories are in use,
62+
and the configure check results should not be
63+
shared between variants,
64+
you can set &cv-CONFIGUREDIR;
65+
and &cv-link-CONFIGURELOG; so they are
66+
unique per variant directory.
67+
</para>
6068
</summary>
6169
</cvar>
6270

@@ -71,6 +79,14 @@ containing the
7179
<filename>SConstruct</filename>
7280
file.
7381
</para>
82+
<para>
83+
If variant directories are in use,
84+
and the configure check results should not be
85+
shared between variants,
86+
you can set &cv-link-CONFIGUREDIR;
87+
and &cv-CONFIGURELOG; so they are
88+
unique per variant directory.
89+
</para>
7490
</summary>
7591
</cvar>
7692

0 commit comments

Comments
 (0)