summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-08-24 00:00:35 +0000
committerWilliam Deegan <bill@baddogconsulting.com>2017-08-24 00:00:35 +0000
commit6cfdf207f27c20c15df7cc7c5a23eaaa65be15a1 (patch)
tree3b5f303099832dbb03e6c0e32c605519e7d270dd
parent282f2e6ece255c7932e7914c3bace33ae43c2915 (diff)
parent7724d48f05f7a739d7b500c770be6752353a6919 (diff)
downloadscons-6cfdf207f27c20c15df7cc7c5a23eaaa65be15a1.tar.gz
Merged in grbd/scons (pull request #502)
Fix for building under python3.5 via bootstrap
-rw-r--r--doc/generated/functions.gen8
-rw-r--r--doc/generated/variables.gen4
-rw-r--r--doc/user/build-install.xml2
-rw-r--r--src/CHANGES.txt9
-rw-r--r--src/engine/SCons/Environment.py2
-rw-r--r--src/engine/SCons/ExecutorTests.py25
-rw-r--r--src/engine/SCons/Script/Main.xml8
-rw-r--r--src/engine/SCons/Script/SConsOptions.py1
-rw-r--r--src/engine/SCons/Tool/__init__.py3
-rw-r--r--test/option-s.py14
10 files changed, 71 insertions, 5 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
</listitem>
</varlistentry>
<varlistentry>
+<term><literal>silent</literal></term>
+<listitem>
+<para>
+which corresponds to --silent.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
<term><literal>stack_size</literal></term>
<listitem>
<para>
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.
<para xmlns="http://www.scons.org/dbxsd/v1.0">
The string displayed when the Java archive tool
is called
-If this is not set, then <envar xmlns="http://www.scons.org/dbxsd/v1.0">$JARCOM</envar> (the command line) is displayed.
+If this is not set, then <link xmlns="http://www.scons.org/dbxsd/v1.0" linkend="cv-JARCOM"><envar>$JARCOM</envar></link> (the command line) is displayed.
</para>
<example_commands xmlns="http://www.scons.org/dbxsd/v1.0">
@@ -3056,7 +3056,7 @@ env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET")
<para xmlns="http://www.scons.org/dbxsd/v1.0">
The string displayed when the Java archive tool
is called
-If this is not set, then <link xmlns="http://www.scons.org/dbxsd/v1.0" linkend="cv-JARCOM"><envar>$JARCOM</envar></link> (the command line) is displayed.
+If this is not set, then <envar xmlns="http://www.scons.org/dbxsd/v1.0">$JARCOM</envar> (the command line) is displayed.
</para>
<example_commands xmlns="http://www.scons.org/dbxsd/v1.0">
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 <filename>scons-&buildversion;.win32.exe</filename>
file from the &SCons; download page at
- <ulink url="http://www.scons.org/download.php">http://www.scons.org/download.php</ulink>.
+ <ulink url="http://scons.org/pages/download.html">http://scons.org/pages/download.html</ulink>.
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 dd92ce14..c2c8ca87 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,14 @@ 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"
+ - 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.
+ - 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/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
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__":
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
</listitem>
</varlistentry>
<varlistentry>
+<term><literal>silent</literal></term>
+<listitem>
+<para>
+which corresponds to --silent.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
<term><literal>stack_size</literal></term>
<listitem>
<para>
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/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py
index 6408f8bf..6ddb9fc7 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.
@@ -913,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
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()