summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2019-07-14 14:53:04 -0400
committerWilliam Deegan <bill@baddogconsulting.com>2019-07-14 14:53:04 -0400
commita2bb59f78fb41ca5b81e220032245d4c732ba566 (patch)
treef0dfd5c4b9c89e617d5949bc59890b324fadede4
parent9f4c9d817efe1817e3315f6299186e9e42502dfb (diff)
parent08a74b7e14c29e3d954f3e7b30b34eb3b3628eb4 (diff)
downloadscons-git-a2bb59f78fb41ca5b81e220032245d4c732ba566.tar.gz
Merge branch 'fix_slow_md5_decider' of github.com:bdbaddog/scons into fix_slow_md5_decider
-rw-r--r--SConstruct8
-rwxr-xr-xbin/upload-release-files.sh11
-rwxr-xr-xsrc/CHANGES.txt10
-rwxr-xr-xsrc/RELEASE.txt8
-rw-r--r--src/engine/SCons/Environment.py15
-rw-r--r--src/engine/SCons/EnvironmentTests.py11
-rw-r--r--src/engine/SCons/Scanner/LaTeX.py8
-rw-r--r--src/engine/SCons/Scanner/LaTeXTests.py16
8 files changed, 67 insertions, 20 deletions
diff --git a/SConstruct b/SConstruct
index c54961cab..d4b3e0071 100644
--- a/SConstruct
+++ b/SConstruct
@@ -208,7 +208,6 @@ packaging_flavors = [
"(including tests and documentation)."),
('src-zip', "A .zip file containing all the source " +
"(including tests and documentation)."),
-
]
test_tar_gz_dir = os.path.join(build_dir, "test-tar-gz")
@@ -856,9 +855,12 @@ SConscript('doc/SConscript')
#
-
sfiles = [l.split()[-1] for l in git_status_lines]
-if not git_status_lines:
+if git_status_lines:
+ # slines = [l for l in git_status_lines if 'modified:' in l]
+ # sfiles = [l.split()[-1] for l in slines]
+ pass
+else:
print("Not building in a Git tree; skipping building src package.")
if sfiles:
diff --git a/bin/upload-release-files.sh b/bin/upload-release-files.sh
index 72a949a49..577203e02 100755
--- a/bin/upload-release-files.sh
+++ b/bin/upload-release-files.sh
@@ -35,12 +35,12 @@ $RSYNC $RSYNCOPTS \
Announce.txt CHANGES.txt RELEASE.txt \
$SF_USER@$SF_MACHINE:$SF_TOPDIR/scons-local/$VERSION/
- Source packages:
+# Source packages:
$RSYNC $RSYNCOPTS \
- scons-src-$VERSION.tar.gz \
- scons-src-$VERSION.zip \
- Announce.txt CHANGES.txt RELEASE.txt \
- $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons-src/$VERSION/
+ scons-src-$VERSION.tar.gz \
+ scons-src-$VERSION.zip \
+ Announce.txt CHANGES.txt RELEASE.txt \
+ $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons-src/$VERSION/
# Readme
$RSYNC $RSYNCOPTS \
@@ -48,7 +48,6 @@ $RSYNC $RSYNCOPTS \
$SF_USER@$SF_MACHINE:$SF_TOPDIR/
-
#
# scons.org stuff:
#
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 9729ac423..a07165ad0 100755
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -50,9 +50,15 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- From Michael Hartmann:
+ From Michael Hartmann:
- Fix handling of Visual Studio Compilers to properly reject any unknown HOST_PLATFORM or TARGET_PLATFORM
+ From Mathew Robinson:
+ - Update cache debug output to include cache hit rate.
+ - No longer unintentionally hide exceptions in Action.py
+
+ From Lukas Schrangl:
+ - Enable LaTeX scanner to find more than one include per line
From Mats Wichmann:
- scons-time takes more care closing files and uses safer mkdtemp to avoid
@@ -80,11 +86,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
ParseFlags: -iquote and -idirafter.
- Fix more re patterns that contain \ but not specified as raw strings
(affects scanners for D, LaTeX, swig)
-
From Mathew Robinson:
- Update cache debug output to include cache hit rate.
- No longer unintentionally hide exceptions in Action.py
+ - Allow builders and pseudo-builders to inherit from OverrideEnvironments
RELEASE 3.0.5 - Mon, 26 Mar 2019 15:04:42 -0700
diff --git a/src/RELEASE.txt b/src/RELEASE.txt
index 2857cbf28..9e4e314b7 100755
--- a/src/RELEASE.txt
+++ b/src/RELEASE.txt
@@ -62,6 +62,14 @@
->Implicit
Old:/usr/bin/python New:/usr/bin/python
+
+ - Changed: Pseudo-builders now inherit OverrideEnvironments. For
+ example when calling a pseudo-builder from another
+ pseudo-builder the override variables passed to the first
+ pseudo-builder call had to be explicitly passed on to the
+ internal pseudo-builder call. Now the second pseudo-builder call
+ will automatically inherit these override values.
+
FIXES
- List fixes of outright bugs
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index 70b816697..8d06af789 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -2308,7 +2308,20 @@ class OverrideEnvironment(Base):
# Methods that make this class act like a proxy.
def __getattr__(self, name):
- return getattr(self.__dict__['__subject'], name)
+ attr = getattr(self.__dict__['__subject'], name)
+ # Here we check if attr is one of the Wrapper classes. For
+ # example when a pseudo-builder is being called from an
+ # OverrideEnvironment.
+ #
+ # These wrappers when they're constructed capture the
+ # Environment they are being constructed with and so will not
+ # have access to overrided values. So we rebuild them with the
+ # OverrideEnvironment so they have access to overrided values.
+ if isinstance(attr, (MethodWrapper, BuilderWrapper)):
+ return attr.clone(self)
+ else:
+ return attr
+
def __setattr__(self, name, value):
setattr(self.__dict__['__subject'], name, value)
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 1a75a90fa..834cfd17e 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -3587,6 +3587,10 @@ class OverrideEnvironmentTestCase(unittest.TestCase,TestEnvironmentFixture):
def setUp(self):
env = Environment()
env._dict = {'XXX' : 'x', 'YYY' : 'y'}
+ def verify_value(env, key, value, *args, **kwargs):
+ """Verifies that key is value on the env this is called with."""
+ assert env[key] == value
+ env.AddMethod(verify_value)
env2 = OverrideEnvironment(env, {'XXX' : 'x2'})
env3 = OverrideEnvironment(env2, {'XXX' : 'x3', 'YYY' : 'y3', 'ZZZ' : 'z3'})
self.envs = [ env, env2, env3 ]
@@ -3777,6 +3781,13 @@ class OverrideEnvironmentTestCase(unittest.TestCase,TestEnvironmentFixture):
# """Test the OverrideEnvironment WhereIs() method"""
# pass
+ def test_PseudoBuilderInherits(self):
+ """Test that pseudo-builders inherit the overrided values."""
+ env, env2, env3 = self.envs
+ env.verify_value('XXX', 'x')
+ env2.verify_value('XXX', 'x2')
+ env3.verify_value('XXX', 'x3')
+
def test_Dir(self):
"""Test the OverrideEnvironment Dir() method"""
env, env2, env3 = self.envs
diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py
index f48c84d55..d1cf04ded 100644
--- a/src/engine/SCons/Scanner/LaTeX.py
+++ b/src/engine/SCons/Scanner/LaTeX.py
@@ -179,15 +179,7 @@ class LaTeX(SCons.Scanner.Base):
'inputfrom', 'subinputfrom']
def __init__(self, name, suffixes, graphics_extensions, *args, **kw):
-
- # We have to include \n with the % we exclude from the first part
- # part of the regex because the expression is compiled with re.M.
- # Without the \n, the ^ could match the beginning of a *previous*
- # line followed by one or more newline characters (i.e. blank
- # lines), interfering with a match on the next line.
- # add option for whitespace before the '[options]' or the '{filename}'
regex = r'''
- ^[^%\n]*
\\(
include
| includegraphics(?:\s*\[[^\]]+\])?
diff --git a/src/engine/SCons/Scanner/LaTeXTests.py b/src/engine/SCons/Scanner/LaTeXTests.py
index 6dd7dac70..409699c80 100644
--- a/src/engine/SCons/Scanner/LaTeXTests.py
+++ b/src/engine/SCons/Scanner/LaTeXTests.py
@@ -61,6 +61,12 @@ test.write('test3.latex',r"""
\includegraphics[width=60mm]{inc5.xyz}
""")
+test.write('test4.latex',r"""
+\include{inc1}\include{inc2}
+\only<1>{\includegraphics{inc5.xyz}}%
+\only<2>{\includegraphics{inc7.png}}
+""")
+
test.subdir('subdir')
test.write('inc1.tex',"\n")
@@ -73,6 +79,7 @@ test.write(['subdir', 'inc3c.tex'], "\n")
test.write(['subdir', 'inc4.eps'], "\n")
test.write('inc5.xyz', "\n")
test.write('inc6.tex', "\n")
+test.write('inc7.png', "\n")
test.write('incNO.tex', "\n")
# define some helpers:
@@ -155,6 +162,15 @@ class LaTeXScannerTestCase3(unittest.TestCase):
files = ['inc5.xyz', 'subdir/inc4.eps']
deps_match(self, deps, files)
+class LaTeXScannerTestCase4(unittest.TestCase):
+ def runTest(self):
+ env = DummyEnvironment(TEXINPUTS=[test.workpath("subdir")],LATEXSUFFIXES = [".tex", ".ltx", ".latex"])
+ s = SCons.Scanner.LaTeX.LaTeXScanner()
+ path = s.path(env)
+ deps = s(env.File('test4.latex'), env, path)
+ files = ['inc1.tex', 'inc2.tex', 'inc5.xyz', 'inc7.png']
+ deps_match(self, deps, files)
+
if __name__ == "__main__":
unittest.main()