From eda2eec58336ee8dad1a39c3b4783b3c72f04471 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 19 Aug 2017 13:22:07 -0700 Subject: Update CHANGES to cover bug fixed as part of another fix --- src/CHANGES.txt | 2 ++ src/engine/SCons/Environment.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index dd92ce14..e681f5d9 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -11,6 +11,7 @@ NOTE: This is a major release. You should expect that some targets may rebuild Significant changes in some python action signatures. Also switching between PY 2 and PY 3.5, 3.6 may cause rebuilds. In no case should rebuilds not happen. + 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 @@ -34,6 +35,7 @@ may cause rebuilds. In no case should rebuilds not happen. - 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" From Ibrahim Esmat: - Added the capability to build Windows Store Compatible libraries that can be used diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 4f8e41bc..6a127db5 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -342,7 +342,7 @@ def is_valid_construction_var(varstr): class SubstitutionEnvironment(object): """Base class for different flavors of construction environments. - This class contains a minimal set of methods that handle contruction + This class contains a minimal set of methods that handle construction variable expansion and conversion of strings to Nodes, which may or may not be actually useful as a stand-alone class. Which methods ended up in this class is pretty arbitrary right now. They're -- cgit v1.2.1 From 9d301dd9b6b6baa6dac0585b27ed9103384a5c0e Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 19 Aug 2017 13:29:51 -0700 Subject: PEP8 --- src/engine/SCons/Tool/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 6408f8bf..96443876 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -319,6 +319,7 @@ def createProgBuilder(env): return program + def createStaticLibBuilder(env): """This is a utility function that creates the StaticLibrary Builder in an Environment if it is not there already. -- cgit v1.2.1 From 6dfa17c497c1d23054ee57f169943de65467ee6b Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 19 Aug 2017 14:02:24 -0700 Subject: Fix Bug #3020 - Download link in user guide broken. python setup.py install --version-lib broken. Now fixed --- doc/user/build-install.xml | 2 +- src/CHANGES.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/user/build-install.xml b/doc/user/build-install.xml index 3e661720..b3814e74 100644 --- a/doc/user/build-install.xml +++ b/doc/user/build-install.xml @@ -289,7 +289,7 @@ Python 2.5.1 that makes installation extremely easy. Download the scons-&buildversion;.win32.exe file from the &SCons; download page at - http://www.scons.org/download.php. + http://scons.org/pages/download.html. Then all you need to do is execute the file (usually by clicking on its icon in Windows Explorer). These will take you through a small diff --git a/src/CHANGES.txt b/src/CHANGES.txt index e681f5d9..1c99acf0 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -36,6 +36,7 @@ may cause rebuilds. In no case should rebuilds not happen. - 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" From Ibrahim Esmat: - Added the capability to build Windows Store Compatible libraries that can be used -- cgit v1.2.1 From 88d205705546d6147083440aa6e368387fa21fb5 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 19 Aug 2017 21:44:47 -0700 Subject: Fix Bug #2486 - Allow SetOption('silent',True) - Previously this option could not be passed to SetOption --- src/CHANGES.txt | 1 + src/engine/SCons/Script/SConsOptions.py | 1 + test/option-s.py | 14 ++++++++++++++ 3 files changed, 16 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 1c99acf0..47f74313 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -37,6 +37,7 @@ may cause rebuilds. In no case should rebuilds not happen. 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. From Ibrahim Esmat: - Added the capability to build Windows Store Compatible libraries that can be used diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index 288a7a5a..60d456e3 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -139,6 +139,7 @@ class SConsValues(optparse.Values): 'random', 'stack_size', 'warn', + 'silent' ] def set_option(self, name, value): diff --git a/test/option-s.py b/test/option-s.py index bbde2d14..df7cd506 100644 --- a/test/option-s.py +++ b/test/option-s.py @@ -41,6 +41,11 @@ file.close() test.write('SConstruct', """ MyBuild = Builder(action = r'%(_python_)s build.py $TARGET') + +silent = ARGUMENTS.get('QUIET',0) +if silent: + SetOption('silent',True) + env = Environment(BUILDERS = { 'MyBuild' : MyBuild }) env.MyBuild(target = 'f1.out', source = 'f1.in') env.MyBuild(target = 'f2.out', source = 'f2.in') @@ -72,6 +77,15 @@ test.subdir( 'sub' ) test.write(['sub','SConstruct'],"") test.run(arguments = '-s -C sub', stdout = "" ) +test.unlink('f1.out') +test.unlink('f2.out') + +test.run(arguments = 'QUIET=1 f1.out f2.out', stdout = "scons: Reading SConscript files ...\nscons: done reading SConscript files.\n") +test.fail_test(not os.path.exists(test.workpath('f1.out'))) +test.fail_test(not os.path.exists(test.workpath('f2.out'))) + + + test.pass_test() -- cgit v1.2.1 From cde8b8346894ef1e6ef6c254bc79a3f5f3a2e580 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 19 Aug 2017 21:50:43 -0700 Subject: Fix Bug #2486 - Allow SetOption('silent',True) - Previously this option could not be passed to SetOption --- doc/generated/functions.gen | 8 ++++++++ doc/generated/variables.gen | 4 ++-- src/engine/SCons/Script/Main.xml | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index e72740a2..79a83c62 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -3998,6 +3998,14 @@ which corresponds to --random; and +silent + + +which corresponds to --silent. + + + + stack_size diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index 0ad4c96d..5bf39b84 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -3046,7 +3046,7 @@ The command line used to call the Java archive tool. The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -3056,7 +3056,7 @@ env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. diff --git a/src/engine/SCons/Script/Main.xml b/src/engine/SCons/Script/Main.xml index 98db5bf3..e95afbca 100644 --- a/src/engine/SCons/Script/Main.xml +++ b/src/engine/SCons/Script/Main.xml @@ -781,6 +781,14 @@ which corresponds to --random; and +silent + + +which corresponds to --silent. + + + + stack_size -- cgit v1.2.1 From c96277d63f6e917daa5798a41954a88e98352e81 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 20 Aug 2017 15:37:46 -0700 Subject: Fix Bug #2622 - AlwaysBuild()+MSVC regression. Due to AlwaysBuild'd target not being added to changed_sources. This has been fixed for a while via some changes for other issue/development. I added a unit test to cover this to src/engine/SCons/ExecutorTests.py --- src/CHANGES.txt | 2 ++ src/engine/SCons/ExecutorTests.py | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 47f74313..fa427265 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -38,6 +38,8 @@ may cause rebuilds. In no case should rebuilds not happen. - 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. From Ibrahim Esmat: - Added the capability to build Windows Store Compatible libraries that can be used diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py index dbfb7d16..eeab3ada 100644 --- a/src/engine/SCons/ExecutorTests.py +++ b/src/engine/SCons/ExecutorTests.py @@ -74,8 +74,12 @@ class MyNode(object): self.pre_actions = pre self.post_actions = post self.missing_val = None + self.always_build = False + self.up_to_date = False + def __str__(self): return self.name + def build(self): executor = SCons.Executor.Executor(MyAction(self.pre_actions + [self.builder.action] + @@ -100,6 +104,9 @@ class MyNode(object): def disambiguate(self): return self + def is_up_to_date(self): + return self.up_to_date + class MyScanner(object): def __init__(self, prefix): self.prefix = prefix @@ -455,6 +462,24 @@ class ExecutorTestCase(unittest.TestCase): r = x.get_unignored_sources(None, [s1, s3]) assert r == [s2], list(map(str, r)) + def test_changed_sources_for_alwaysBuild(self): + """ + Ensure if a target is marked always build that the sources are always marked changed sources + :return: + """ + env = MyEnvironment() + s1 = MyNode('s1') + s2 = MyNode('s2') + t1 = MyNode('t1') + t1.up_to_date = True + t1.always_build = True + + x = SCons.Executor.Executor('b', env, [{}], [t1], [s1, s2]) + + changed_sources = x._get_changed_sources() + assert changed_sources == [s1, s2], "If target marked AlwaysBuild sources should always be marked changed" + + if __name__ == "__main__": -- cgit v1.2.1 From 7724d48f05f7a739d7b500c770be6752353a6919 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 20 Aug 2017 18:25:22 -0700 Subject: Fix Bug #3025 - (Credit to Florian : User flow86 on tigris) - Fix typo JAVACLASSSUFIX should have been JAVACLASSSUFFIX --- src/CHANGES.txt | 3 +++ src/engine/SCons/Tool/__init__.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index fa427265..c2c8ca87 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -40,6 +40,9 @@ may cause rebuilds. In no case should rebuilds not happen. - 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 diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 96443876..6ddb9fc7 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -914,7 +914,7 @@ def CreateJarBuilder(env): jar_com = SCons.Action.Action('$JARCOM', '$JARCOMSTR') java_jar = SCons.Builder.Builder(action = jar_com, suffix = '$JARSUFFIX', - src_suffix = '$JAVACLASSSUFIX', + src_suffix = '$JAVACLASSSUFFIX', src_builder = 'JavaClassFile', source_factory = fs.Entry) env['BUILDERS']['Jar'] = java_jar -- cgit v1.2.1