summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-03-28 12:44:07 -0700
committerGitHub <noreply@github.com>2021-03-28 12:44:07 -0700
commita256652f5b436d692ac0237d7f12a81a591fcb2a (patch)
tree7cceb3e058a3acfe49881e8beb9889ca4c6acd8f
parent9abb88adfb0da0cbcea4e1786887b1bd4e2f4158 (diff)
parent485749728ff769dbe9148bd3a946ad03e3e4ee64 (diff)
downloadscons-git-a256652f5b436d692ac0237d7f12a81a591fcb2a.tar.gz
Merge branch 'master' into issue2399
-rwxr-xr-xCHANGES.txt5
-rwxr-xr-xRELEASE.txt1
-rwxr-xr-xReleaseConfig2
-rw-r--r--SCons/EnvironmentTests.py14
-rw-r--r--SCons/Script/Main.py2
-rw-r--r--SCons/Tool/install.py9
-rw-r--r--doc/man/scons.xml6
-rw-r--r--test/Install/INSTALLSTR.py6
-rw-r--r--testing/framework/TestSCons.py2
9 files changed, 28 insertions, 19 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 6c7a850cf..41ffe4e99 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -47,6 +47,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
All have been replaced by other names since at least 1.0.
- Add a __iadd__ method to the CLVar class so that inplace adds
(+=) also work as expected (issue 2399)
+ - Remove local copy of CLVar in EnvironmentTests unittest file -
+ should be testing against the production version, and they
+ didn't really differ.
+ - Don't strip spaces in INSTALLSTR by using raw subst (issue 2018)
+ - Deprecate Python 3.5 as a supported version.
From Dillan Mills:
- Add support for the (TARGET,SOURCE,TARGETS,SOURCES,CHANGED_TARGETS,CHANGED_SOURCES}.relpath property.
diff --git a/RELEASE.txt b/RELEASE.txt
index 22961b104..f468e1b57 100755
--- a/RELEASE.txt
+++ b/RELEASE.txt
@@ -15,6 +15,7 @@ NEW FUNCTIONALITY
DEPRECATED FUNCTIONALITY
------------------------
+ - Deprecate Python 3.5 as a supported version.
- List anything that's been deprecated since the last release
diff --git a/ReleaseConfig b/ReleaseConfig
index fa4a24b05..4195f3fbe 100755
--- a/ReleaseConfig
+++ b/ReleaseConfig
@@ -38,7 +38,7 @@ version_tuple = (4, 1, 1, 'a', 0)
# cause a warning to be issued (assuming it's not disabled). These values are
# mandatory and must be present in the configuration file.
unsupported_python_version = (3, 4, 0)
-deprecated_python_version = (3, 4, 0)
+deprecated_python_version = (3, 5, 0)
# If release_date is (yyyy, mm, dd, hh, mm, ss), that is used as the release
# date and time. If release_date is (yyyy, mm, dd), it is used for the
diff --git a/SCons/EnvironmentTests.py b/SCons/EnvironmentTests.py
index c2d50878f..88577ba4e 100644
--- a/SCons/EnvironmentTests.py
+++ b/SCons/EnvironmentTests.py
@@ -32,6 +32,7 @@ from collections import UserDict as UD, UserList as UL
import TestCmd
+import SCons.Warnings
from SCons.Environment import (
Environment,
NoSubstitutionProxy,
@@ -39,7 +40,7 @@ from SCons.Environment import (
SubstitutionEnvironment,
is_valid_construction_var,
)
-import SCons.Warnings
+from SCons.Util import CLVar
def diff_env(env1, env2):
@@ -131,17 +132,6 @@ class Scanner:
return self.name
-
-class CLVar(UL):
- def __init__(self, seq):
- if isinstance(seq, str):
- seq = seq.split()
- UL.__init__(self, seq)
- def __add__(self, other):
- return UL.__add__(self, CLVar(other))
- def __radd__(self, other):
- return UL.__radd__(self, CLVar(other))
-
class DummyNode:
def __init__(self, name):
self.name = name
diff --git a/SCons/Script/Main.py b/SCons/Script/Main.py
index 59ffbb7eb..29906ad20 100644
--- a/SCons/Script/Main.py
+++ b/SCons/Script/Main.py
@@ -33,7 +33,7 @@ it goes here.
# these define the range of versions SCons supports
unsupported_python_version = (3, 4, 0)
-deprecated_python_version = (3, 4, 0)
+deprecated_python_version = (3, 5, 0)
import SCons.compat
diff --git a/SCons/Tool/install.py b/SCons/Tool/install.py
index e79203e66..d73d6787e 100644
--- a/SCons/Tool/install.py
+++ b/SCons/Tool/install.py
@@ -35,8 +35,13 @@ from shutil import copy2, copymode, copystat
import SCons.Action
import SCons.Tool
-from SCons.Tool.linkCommon import StringizeLibSymlinks, CreateLibSymlinks, EmitLibSymlinks
import SCons.Util
+from SCons.Subst import SUBST_RAW
+from SCons.Tool.linkCommon import (
+ StringizeLibSymlinks,
+ CreateLibSymlinks,
+ EmitLibSymlinks,
+)
#
# We keep track of *all* installed files.
@@ -257,7 +262,7 @@ def installFuncVersionedLib(target, source, env):
def stringFunc(target, source, env):
installstr = env.get('INSTALLSTR')
if installstr:
- return env.subst_target_source(installstr, 0, target, source)
+ return env.subst_target_source(installstr, SUBST_RAW, target, source)
target = str(target[0])
source = str(source[0])
if os.path.isdir(source):
diff --git a/doc/man/scons.xml b/doc/man/scons.xml
index 1b02e35ab..5bd50d3df 100644
--- a/doc/man/scons.xml
+++ b/doc/man/scons.xml
@@ -536,6 +536,12 @@ by appropriate setting of &consvars;.</para>
requires Python 3.5 or higher.
There should be no other dependencies or requirements to run &scons;.
</para>
+<para><emphasis>
+Support for Python 3.5 is deprecated since
+&SCons; 4.2 and will be dropped in a future release.
+The CPython project has retired 3.5:
+<ulink url="https://www.python.org/dev/peps/pep-0478"/>.
+</emphasis></para>
</refsect1>
diff --git a/test/Install/INSTALLSTR.py b/test/Install/INSTALLSTR.py
index 145b81dbb..ace04f4af 100644
--- a/test/Install/INSTALLSTR.py
+++ b/test/Install/INSTALLSTR.py
@@ -36,16 +36,18 @@ test = TestSCons.TestSCons()
test.subdir('install')
+# Check that spaces aren't stripped in INSTALLSTR by using
+# extra whitespace in the string (issue 2018)
test.write('SConstruct', """\
DefaultEnvironment(tools=[])
-env = Environment(tools=[], INSTALLSTR = 'INSTALL $SOURCE => $TARGET!')
+env = Environment(tools=[], INSTALLSTR='INSTALL $SOURCE => $TARGET!')
env.Install('install', 'file')
""")
test.write('file', "file\n")
test.run(stdout=test.wrap_stdout("""\
-INSTALL file => %s!
+INSTALL file => %s!
""") % os.path.join('install', 'file'))
test.must_match(['install', 'file'], "file\n")
diff --git a/testing/framework/TestSCons.py b/testing/framework/TestSCons.py
index c02be7a5e..5937baddf 100644
--- a/testing/framework/TestSCons.py
+++ b/testing/framework/TestSCons.py
@@ -58,7 +58,7 @@ from TestCmd import PIPE
default_version = '4.1.1ayyyymmdd'
python_version_unsupported = (3, 4, 0)
-python_version_deprecated = (3, 4, 0)
+python_version_deprecated = (3, 5, 0)
# In the checked-in source, the value of SConsVersion in the following
# line must remain "__ VERSION __" (without the spaces) so the built