From abb2473901736da826767436702f6f081c058d36 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 27 Jun 2023 09:04:24 -0600 Subject: Adjust help message about -H As noted in issue #2356 (which this change does not complete/close), the final line of help if the help message has been modified is 'Use scons -H for help about command-line options.'. This fails to mention that -H prints only those options that are defined in SCons itself, not options added via AddOption. Adjust the message to better indicate this. Signed-off-by: Mats Wichmann --- CHANGES.txt | 1 + RELEASE.txt | 5 +++-- SCons/Script/Main.py | 2 +- test/Help.py | 8 ++++---- test/SCONSFLAGS.py | 2 +- test/Variables/Variables.py | 4 ++-- test/Variables/help.py | 4 ++-- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ee08ab7..e24f70c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -96,6 +96,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER than source). Docs updated. Fixes #4326 and #4327. - Cleaned up dblite module (checker warnings, etc.). - Some cleanup in the FortranCommon tool. + - Changed the message about scons -H to clarify it shows built-in options. RELEASE 4.5.2 - Sun, 21 Mar 2023 14:08:29 -0700 diff --git a/RELEASE.txt b/RELEASE.txt index 0846dd6..024f049 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -16,10 +16,10 @@ Here is a summary of the changes since 4.5.2: NEW FUNCTIONALITY ----------------- -- D compilers : added support for generation of .di interface 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. - + DEPRECATED FUNCTIONALITY ------------------------ @@ -77,6 +77,7 @@ DOCUMENTATION if the previous *targets* parameter had been used as a keyword argument, the results would be incorrect (does not apply to positional argument usage, which had no problem). +- Changed the message about scons -H to clarify it shows built-in options only. DEVELOPMENT ----------- diff --git a/SCons/Script/Main.py b/SCons/Script/Main.py index c9cd486..361b4b2 100644 --- a/SCons/Script/Main.py +++ b/SCons/Script/Main.py @@ -1131,7 +1131,7 @@ def _main(parser): raise SConsPrintHelpException else: print(help_text) - print("Use scons -H for help about command-line options.") + print("Use scons -H for help about SCons built-in command-line options.") exit_status = 0 return diff --git a/test/Help.py b/test/Help.py index 693fd28..95f57ad 100644 --- a/test/Help.py +++ b/test/Help.py @@ -39,7 +39,7 @@ scons: done reading SConscript files. Help text goes here. -Use scons -H for help about command-line options. +Use scons -H for help about SCons built-in command-line options. """ test.run(arguments = '-h', stdout = expect) @@ -55,7 +55,7 @@ scons: done reading SConscript files. Even more help text! -Use scons -H for help about command-line options. +Use scons -H for help about SCons built-in command-line options. """ test.run(arguments = '-h', stdout = expect) @@ -77,7 +77,7 @@ Multiline help text! -Use scons -H for help about command-line options. +Use scons -H for help about SCons built-in command-line options. """ test.run(arguments = '-h', stdout = expect) @@ -138,7 +138,7 @@ buildmod: List of modules to build default: none actual: None -Use scons -H for help about command-line options. +Use scons -H for help about SCons built-in command-line options. """ test.run(arguments = '-h', stdout = expect) diff --git a/test/SCONSFLAGS.py b/test/SCONSFLAGS.py index 6b2ea8b..4a44f30 100644 --- a/test/SCONSFLAGS.py +++ b/test/SCONSFLAGS.py @@ -40,7 +40,7 @@ expect = """scons: Reading SConscript files ... scons: done reading SConscript files. Help text. -Use scons -H for help about command-line options. +Use scons -H for help about SCons built-in command-line options. """ os.environ['SCONSFLAGS'] = '' diff --git a/test/Variables/Variables.py b/test/Variables/Variables.py index f6832c0..09d5783 100644 --- a/test/Variables/Variables.py +++ b/test/Variables/Variables.py @@ -197,7 +197,7 @@ UNSPECIFIED: An option with no value default: None actual: None -Use scons -H for help about command-line options. +Use scons -H for help about SCons built-in command-line options. """%(cc, ccflags and ccflags + ' -O' or '-O', cc)) # Test saving of variables and multi loading @@ -355,7 +355,7 @@ UNSPECIFIED: An option with no value default: None actual: None -Use scons -H for help about command-line options. +Use scons -H for help about SCons built-in command-line options. """%cc) test.write('SConstruct', """ diff --git a/test/Variables/help.py b/test/Variables/help.py index cab7a67..2c82514 100644 --- a/test/Variables/help.py +++ b/test/Variables/help.py @@ -43,7 +43,7 @@ libdirvar = os.path.join('$qtdir', 'lib') test.subdir(qtpath) test.subdir(libpath) - + test.write('SConstruct', """ from SCons.Variables import ( BoolVariable, @@ -148,7 +148,7 @@ qt_libraries: where the Qt library is installed ( /path/to/qt_libraries ) default: %(libdirvar)s actual: %(libpath)s -Use scons -H for help about command-line options. +Use scons -H for help about SCons built-in command-line options. """ % locals()) -- cgit v0.12 From 11434025e7fb5cb60c2e9c91e87634061b994dde Mon Sep 17 00:00:00 2001 From: Jonathon Reinhart Date: Sun, 9 Jul 2023 15:49:43 -0400 Subject: Replace `int main()` with `int main(void)` in CheckLib() Fixes #4373 --- SCons/Conftest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SCons/Conftest.py b/SCons/Conftest.py index 3541bce..6af5e78 100644 --- a/SCons/Conftest.py +++ b/SCons/Conftest.py @@ -676,8 +676,7 @@ char %s(); # if no function to test, leave main() blank text = text + """ -int -main() { +int main(void) { %s return 0; } -- cgit v0.12 From ecdadaeb7f4b9ab07b5df1a3c982c6f68745000e Mon Sep 17 00:00:00 2001 From: Jonathon Reinhart Date: Sun, 9 Jul 2023 15:56:49 -0400 Subject: Update CHANGES.txt --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index ee08ab7..7cd71dd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -97,6 +97,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Cleaned up dblite module (checker warnings, etc.). - Some cleanup in the FortranCommon tool. + From Jonathon Reinhart: + - Fix another instance of `int main()` in CheckLib() causing failures + when using -Wstrict-prototypes. + RELEASE 4.5.2 - Sun, 21 Mar 2023 14:08:29 -0700 -- cgit v0.12 From db5d26f970cf920b929706f39e7ed88bce1a0687 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 10 Jul 2023 08:22:27 -0600 Subject: Update project READMEs [skip ci] Syncs all the readmes to indicate Python 3.6 is the lowest supported version. Change commentary around scons-dev mailing list. Signed-off-by: Mats Wichmann --- README-SF.rst | 26 ++++++++++++++------------ README-local | 27 ++++++++++++++++----------- README-package.rst | 13 ++++++++----- 3 files changed, 38 insertions(+), 28 deletions(-) diff --git a/README-SF.rst b/README-SF.rst index c59c795..3e59402 100755 --- a/README-SF.rst +++ b/README-SF.rst @@ -47,11 +47,9 @@ version at the SCons download page: Execution Requirements ====================== -Running SCons requires Python 3.5 or higher. There should be no other -dependencies or requirements to run scons. - -As of SCons 4.2.0 support for Python 3.5 is deprecated and will be removed -with the next major release. +Running SCons requires Python 3.6 or higher. There should be no other +dependencies or requirements to run standard SCons. +The last release to support Python 3.5 was 4.2.0. The default SCons configuration assumes use of the Microsoft Visual C++ compiler suite on Win32 systems, and assumes a C compiler named 'cc', a C++ @@ -399,12 +397,13 @@ following packages will be built:: scons-doc-4.7.0ayyyymmdd.tar.gz scons-local-4.7.0ayyyymmdd.tar.gz scons-local-4.7.0ayyyymmdd.zip + scons-local-4.7.0ayyyymmdd.pyz The SConstruct file is supposed to be smart enough to avoid trying to build packages for which you don't have the proper utilities installed. -If you receive a build error, please report it to the scons-devel mailing list -and open a bug report on the SCons bug tracker. +If you receive a build error, please report it to the scons-users mailing list +and open a bug report on the SCons issue tracker on GitHub. Note that in addition to creating the above packages, the default build will also unpack one or more of the packages for testing. @@ -546,8 +545,9 @@ for the problem you've run into on GitHub Issues: Mailing Lists ============= -An active mailing list for developers of SCons is available. You may -send questions or comments to the list at: +In addition to the scons-users list which is appropriate for almost any +question, there is a mailing list specifically for developers of SCons +You may send questions or comments to the list at: scons-dev@scons.org @@ -559,9 +559,11 @@ Subscription to the developer's mailing list is by approval. In practice, no one is refused list membership, but we reserve the right to limit membership in the future and/or weed out lurkers. -There are other mailing lists available for SCons users, for notification of -SCons code changes, and for notification of updated bug reports and project -documents. Please see our mailing lists page for details. +Note that while this list still exists, the number of different places you +can talk about SCons means it is no longer very active. GitHub has +support for discussions as well as for issues, and there is usually more +immediacy on the Discord chat, so these are probably now considered the +preferred places for "development" topics. Donations diff --git a/README-local b/README-local index e32b71e..002af2d 100644 --- a/README-local +++ b/README-local @@ -43,11 +43,9 @@ scons-local package, or any SCons package, at the SCons download page: EXECUTION REQUIREMENTS ====================== -Running SCons requires Python 3.5 or higher. -There should be no other dependencies or requirements to run SCons. - -As of SCons 4.2.0 support for Python 3.5 is deprecated and will be removed -with the next major release. +Running SCons requires Python 3.6 or higher. There should be no other +dependencies or requirements to run standard SCons. +The last release to support Python 3.5 was 4.2.0. The default SCons configuration assumes use of the Microsoft Visual C++ compiler suite on WIN32 systems (either through the Visual Studio @@ -84,6 +82,11 @@ Or (if, for example, you installed this package in a subdirectory named That should be all you have to do. (If it isn't that simple, please let us know!) +Since 4.5, there is also an alternate form of scons-local avaialble: +a zipapp. This is a single file with a .pyz suffix, which can be +downloaded and executed directly (e.g.: python scons-local-4.5.2.pyz) +without unpacking. This may be more convenient in a few cases. + CONTENTS OF THIS PACKAGE ======================== @@ -191,8 +194,9 @@ You may subscribe to the scons-users mailing list at: http://two.pairlist.net/mailman/listinfo/scons-users -An active mailing list for developers of SCons is available. You may -send questions or comments to the list at: +In addition to the scons-users list which is appropriate for almost any +question, there is a mailing list specifically for developers of SCons +You may send questions or comments to the list at: scons-dev@scons.org @@ -204,10 +208,11 @@ Subscription to the developer's mailing list is by approval. In practice, no one is refused list membership, but we reserve the right to limit membership in the future and/or weed out lurkers. -There are other mailing lists available for SCons users, for notification of -SCons code changes, and for notification of updated bug reports and project -documents. Please see our mailing lists page for details. - +Note that while this list still exists, the number of different places you +can talk about SCons means it is no longer very active. GitHub has +support for discussions as well as for issues, and there is usually more +immediacy on the Discord chat, so these are probably now considered the +preferred places for "development" topics. FOR MORE INFORMATION diff --git a/README-package.rst b/README-package.rst index 61efa1e..8c2a3fb 100755 --- a/README-package.rst +++ b/README-package.rst @@ -159,8 +159,9 @@ for the problem you've run into, on the Mailing Lists ============= -An active mailing list for developers of SCons is available. You may -send questions or comments to the list at scons-dev@scons.org. +In addition to the scons-users list which is appropriate for almost any +question, there is a mailing list specifically for developers of SCons +You may send questions or comments to the list at: You may subscribe to the developer's mailing list using the form at https://two.pairlist.net/mailman/listinfo/scons-dev. @@ -169,9 +170,11 @@ Subscription to the developer's mailing list is by approval. In practice, no one is refused list membership, but we reserve the right to limit membership in the future and/or weed out lurkers. -There are other mailing lists available for SCons users, for notification of -SCons code changes, and for notification of updated bug reports and project -documents. Please see our mailing lists page for details. +Note that while this list still exists, the number of different places you +can talk about SCons means it is no longer very active. GitHub has +support for discussions as well as for issues, and there is usually more +immediacy on the Discord chat, so these are probably now considered the +preferred places for "development" topics. Donations -- cgit v0.12 From 9e1eba67f5f1fe4536f6872a385fb765dcdb7278 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 13 Jul 2023 08:06:28 -0600 Subject: trivial update to textfile markup [skip appveyor] Turn two refs into a live link Signed-off-by: Mats Wichmann --- SCons/Tool/textfile.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCons/Tool/textfile.xml b/SCons/Tool/textfile.xml index b019c68..557be5b 100644 --- a/SCons/Tool/textfile.xml +++ b/SCons/Tool/textfile.xml @@ -26,7 +26,7 @@ See its __doc__ string for a discussion of the format. -Set &consvars; for the &b-Textfile; and &b-Substfile; builders. +Set &consvars; for the &b-link-Textfile; and &b-link-Substfile; builders. -- cgit v0.12 From 567c32add14cc14d146f3732c7cab4b5dcdc8f9f Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 14 Jul 2023 17:19:26 -0700 Subject: Updates to PR 4374 from mwichmann to correct config file hash changes --- test/Configure/ConfigureDryRunError.py | 36 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/test/Configure/ConfigureDryRunError.py b/test/Configure/ConfigureDryRunError.py index 224154b..ae3b2ff 100644 --- a/test/Configure/ConfigureDryRunError.py +++ b/test/Configure/ConfigureDryRunError.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -# __COPYRIGHT__ +# MIT License +# +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,12 +23,11 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ Verify the ConfigureDryRunError. """ -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - import os import TestSCons @@ -47,37 +48,44 @@ CF = test.CF # cached build failure SConstruct_path = test.workpath('SConstruct') test.write(SConstruct_path, """ -env = Environment() + import os +DefaultEnvironment(tools=[]) + +env = Environment() env.AppendENVPath('PATH', os.environ['PATH']) conf = Configure(env) -r1 = conf.CheckLib('%s') # will pass -r2 = conf.CheckLib('hopefullynolib') # will fail +r1 = conf.CheckLib('%s') # will pass +r2 = conf.CheckLib('hopefullynolib') # will fail env = conf.Finish() if not (r1 and not r2): - Exit(1) + Exit(1) """ % lib) expect = """ scons: *** Cannot create configure directory ".sconf_temp" within a dry-run. -""" + test.python_file_line(SConstruct_path, 5) +""" + test.python_file_line(SConstruct_path, 8) test.run(arguments='-n', status=2, stderr=expect) test.must_not_exist('config.log') test.subdir('.sconf_temp') -# depending on which default hash function we're using, we'd expect one of the following filenames. -# The filenames are generated by the conftest changes in #3543 : https://github.com/SCons/scons/pull/3543/files +# depending on which default hash function we're using, we'd expect one +# of the following filenames. The filenames are generated by the conftest +# changes in #3543 : https://github.com/SCons/scons/pull/3543 +# Note if the code generated for CheckLib(Configure_lib) changes, we need +# to recompute the hashes of the generated file - even though it won't +# even be built for this test. possible_filenames = { - 'md5': "conftest_df286a1d2f67e69d030b4eff75ca7e12_0.c", - 'sha1': "conftest_6e784ac3248d146c68396335df2f9428d78c1d24_0.c", - 'sha256': "conftest_be4b3c1d600e20dfc3e8d98748cd8193c850331643466d800ef8a4229a5be410_0.c" + 'md5': 'conftest_e492448966d6e04631c094ba6d6e8a32_0.c', + 'sha1': 'conftest_f0a9e7fe48f48687797dbafb5d07071d35f86dd2_0.c', + 'sha256': 'conftest_e856bf0bdb229b16823f193eee68254b885340d0b2f0277ff2eaca78aa0ba7aa_0.c', } test_filename = possible_filenames[get_current_hash_algorithm_used()] conftest_0_c = os.path.join(".sconf_temp", test_filename) -SConstruct_file_line = test.python_file_line(SConstruct_path, 6)[:-1] +SConstruct_file_line = test.python_file_line(SConstruct_path, 9)[:-1] expect = """ scons: *** Cannot update configure test "%(conftest_0_c)s" within a dry-run. -- cgit v0.12