diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-11-18 17:47:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-18 17:47:39 (GMT) |
commit | 9eb50b009c78cf903d2f7e10989c831fdc6c0185 (patch) | |
tree | cb0144e67716f50b0a5ddcc2e3c72e2ccd82500c | |
parent | 30f8d95881195eb977825f4210d48fc571f9d37c (diff) | |
parent | 09b22b9445340afefa1ff44126479f21e69302ee (diff) | |
download | SCons-9eb50b009c78cf903d2f7e10989c831fdc6c0185.zip SCons-9eb50b009c78cf903d2f7e10989c831fdc6c0185.tar.gz SCons-9eb50b009c78cf903d2f7e10989c831fdc6c0185.tar.bz2 |
Merge branch 'master' into patch-1
-rw-r--r-- | .gitattributes | 6 | ||||
-rw-r--r-- | .github/FUNDING.yml | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | bin/scons_dev_master.py | 2 | ||||
-rw-r--r-- | doc/man/scons.xml | 3 | ||||
-rwxr-xr-x | src/CHANGES.txt | 9 | ||||
-rw-r--r-- | src/engine/SCons/Builder.py | 15 | ||||
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/tex.py | 4 | ||||
-rw-r--r-- | test/GetBuildFailures/option-k.py | 4 | ||||
-rw-r--r-- | test/GetBuildFailures/parallel.py | 4 | ||||
-rw-r--r-- | test/GetBuildFailures/serial.py | 4 | ||||
-rw-r--r-- | test/Rpcgen/RPCGEN.py | 8 | ||||
-rw-r--r-- | test/Rpcgen/RPCGENCLIENTFLAGS.py | 8 | ||||
-rw-r--r-- | test/Rpcgen/RPCGENFLAGS.py | 8 | ||||
-rw-r--r-- | test/Rpcgen/RPCGENHEADERFLAGS.py | 8 | ||||
-rw-r--r-- | test/Rpcgen/RPCGENSERVICEFLAGS.py | 8 | ||||
-rw-r--r-- | test/Rpcgen/RPCGENXDRFLAGS.py | 8 | ||||
-rw-r--r-- | test/TEX/LATEX.py | 20 | ||||
-rw-r--r-- | test/YACC/YACCHFILESUFFIX.py | 4 | ||||
-rw-r--r-- | test/YACC/YACCHXXFILESUFFIX.py | 2 | ||||
-rw-r--r-- | test/YACC/YACCVCGFILESUFFIX.py | 2 | ||||
-rw-r--r-- | testing/framework/TestCmd.py | 2 |
22 files changed, 87 insertions, 49 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..089d31b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +doc/* linguist-documentation +src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1 linguist-vendored +*.xml linguist-documentation +*.xsl linguist-documentation +*.gen linguist-documentation + diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9daae32 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,5 @@ +# These are supported funding model platforms + +github: bdbaddog +patreon: bdbaddog + diff --git a/bin/scons_dev_master.py b/bin/scons_dev_master.py index 4b1160f..cdbd68e 100644..100755 --- a/bin/scons_dev_master.py +++ b/bin/scons_dev_master.py @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/python # # A script for turning a generic Ubuntu system into a master for diff --git a/doc/man/scons.xml b/doc/man/scons.xml index a9e0dd7..ae54e2e 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -4960,7 +4960,8 @@ the same target file(s). The default is 0, which means the builder can not be called multiple times for the same target file(s). Calling a builder multiple times for the same target simply adds additional source files to the target; it is not allowed to change the environment associated -with the target, specify addition environment overrides, or associate a different +with the target, specify additional environment overrides, +or associate a different builder with the target.</para> </listitem> diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 092c2c8..db0a5f2 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,6 +6,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER + From Philipp Maierhöfer: + - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in + non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when + the fontenc package is included with \usepackage[T1]{fontenc}) is read. + From Mathew Robinson: - Improved threading performance by ensuring NodeInfo is shared @@ -25,6 +30,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER On vs2019 saves 5+ seconds per SCons invocation, which really helps test suite runs. - Remove deprecated SourceSignatures, TargetSignatures + - Remove deprecated Builder keywords: overrides and scanner From Jacek Kuczera: - Fix CheckFunc detection code for Visual 2019. Some functions @@ -39,6 +45,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Ivan Kravets - Added support for "-imacros" to ParseFlags + From Tim Gates + - Resolved a typo in engine.SCons.Tool + RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 From William Deegan: diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index 4352d7a..e3fb396 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -396,16 +396,13 @@ class BuilderBase(object): self.env = env self.single_source = single_source if 'overrides' in overrides: - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuilderKeywordsWarning, - "The \"overrides\" keyword to Builder() creation has been deprecated;\n" +\ - "\tspecify the items as keyword arguments to the Builder() call instead.") - overrides.update(overrides['overrides']) - del overrides['overrides'] + msg = "The \"overrides\" keyword to Builder() creation has been removed;\n" +\ + "\tspecify the items as keyword arguments to the Builder() call instead." + raise TypeError(msg) if 'scanner' in overrides: - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuilderKeywordsWarning, - "The \"scanner\" keyword to Builder() creation has been deprecated;\n" - "\tuse: source_scanner or target_scanner as appropriate.") - del overrides['scanner'] + msg = "The \"scanner\" keyword to Builder() creation has been removed;\n" +\ + "\tuse: source_scanner or target_scanner as appropriate." + raise TypeError(msg) self.overrides = overrides self.set_suffix(suffix) diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index c8fb389..f255b21 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -99,7 +99,7 @@ for suffix in LaTeXSuffixes: SourceFileScanner.add_scanner(suffix, LaTeXScanner) SourceFileScanner.add_scanner(suffix, PDFLaTeXScanner) -# Tool aliases are needed for those tools whos module names also +# Tool aliases are needed for those tools whose module names also # occur in the python standard library. This causes module shadowing and # can break using python library functions under python3 TOOL_ALIASES = { diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py index 64b9d3b..5cf7bca 100644 --- a/src/engine/SCons/Tool/tex.py +++ b/src/engine/SCons/Tool/tex.py @@ -297,8 +297,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None logfilename = targetbase + '.log' logContent = '' if os.path.isfile(logfilename): - with open(logfilename, "r") as f: - logContent = f.read() + with open(logfilename, "rb") as f: + logContent = f.read().decode(errors='replace') # Read the fls file to find all .aux files diff --git a/test/GetBuildFailures/option-k.py b/test/GetBuildFailures/option-k.py index 92a9db8..039ad50 100644 --- a/test/GetBuildFailures/option-k.py +++ b/test/GetBuildFailures/option-k.py @@ -45,11 +45,11 @@ test = TestSCons.TestSCons() contents = r"""\ import sys -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 sys.exit(exit_value) """ diff --git a/test/GetBuildFailures/parallel.py b/test/GetBuildFailures/parallel.py index 5387e4a..63125ad 100644 --- a/test/GetBuildFailures/parallel.py +++ b/test/GetBuildFailures/parallel.py @@ -59,11 +59,11 @@ write_marker = sys.argv[2] + '.marker' if wait_marker != '-.marker': while not os.path.exists(wait_marker): time.sleep(1) -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 if write_marker != '-.marker': os.mkdir(write_marker) diff --git a/test/GetBuildFailures/serial.py b/test/GetBuildFailures/serial.py index 7557dd5..4aecc12 100644 --- a/test/GetBuildFailures/serial.py +++ b/test/GetBuildFailures/serial.py @@ -48,11 +48,11 @@ test = TestSCons.TestSCons() contents = r"""\ import sys -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 sys.exit(exit_value) """ diff --git a/test/Rpcgen/RPCGEN.py b/test/Rpcgen/RPCGEN.py index eaa4e16..86cdd71 100644 --- a/test/Rpcgen/RPCGEN.py +++ b/test/Rpcgen/RPCGEN.py @@ -69,10 +69,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENCLIENTFLAGS.py b/test/Rpcgen/RPCGENCLIENTFLAGS.py index a298ebd..1143227 100644 --- a/test/Rpcgen/RPCGENCLIENTFLAGS.py +++ b/test/Rpcgen/RPCGENCLIENTFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENFLAGS.py b/test/Rpcgen/RPCGENFLAGS.py index c254ed0..3673a23 100644 --- a/test/Rpcgen/RPCGENFLAGS.py +++ b/test/Rpcgen/RPCGENFLAGS.py @@ -71,10 +71,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENHEADERFLAGS.py b/test/Rpcgen/RPCGENHEADERFLAGS.py index 8e40ad7..6223ba3 100644 --- a/test/Rpcgen/RPCGENHEADERFLAGS.py +++ b/test/Rpcgen/RPCGENHEADERFLAGS.py @@ -72,10 +72,10 @@ expect_h = output_h % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENSERVICEFLAGS.py b/test/Rpcgen/RPCGENSERVICEFLAGS.py index 2edc77c..7cdf430 100644 --- a/test/Rpcgen/RPCGENSERVICEFLAGS.py +++ b/test/Rpcgen/RPCGENSERVICEFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output_svc % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENXDRFLAGS.py b/test/Rpcgen/RPCGENXDRFLAGS.py index 2d1ca96..2f6d8d9 100644 --- a/test/Rpcgen/RPCGENXDRFLAGS.py +++ b/test/Rpcgen/RPCGENXDRFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output_xdr % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/TEX/LATEX.py b/test/TEX/LATEX.py index 553313e..dabe8b1 100644 --- a/test/TEX/LATEX.py +++ b/test/TEX/LATEX.py @@ -28,6 +28,8 @@ r""" Validate that we can set the LATEX string to our own utility, that the produced .dvi, .aux and .log files get removed by the -c option, and that we can use this to wrap calls to the real latex utility. +Check that a log file with a warning encoded in non-UTF-8 (here: Latin-1) +is read without throwing an error. """ import TestSCons @@ -193,6 +195,24 @@ This is the include file. mod %s test.must_not_exist('latexi.ilg') + test.write('SConstruct', """ +env = Environment() +env.DVI('latin1log.tex') +""") + + # This will trigger an overfull hbox warning in the log file, + # containing the umlaut "o in Latin-1 ("T1 fontenc") encoding. + test.write('latin1log.tex', r""" +\documentclass[12pt,a4paper]{article} +\usepackage[T1]{fontenc} +\begin{document} +\"oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +\end{document} +""") + + test.run(arguments = 'latin1log.dvi', stderr = None) + test.must_exist('latin1log.dvi') + test.pass_test() # Local Variables: diff --git a/test/YACC/YACCHFILESUFFIX.py b/test/YACC/YACCHFILESUFFIX.py index 6c34db1..da3416c 100644 --- a/test/YACC/YACCHFILESUFFIX.py +++ b/test/YACC/YACCHFILESUFFIX.py @@ -71,9 +71,9 @@ test.write('bbb.yacc', "bbb.yacc\n/*yacc*/\n") test.run(arguments = '.') test.must_match('aaa.c', "aaa.y\n") -test.must_match('aaa.hsuffix', "myyacc.py -d -o aaa.c aaa.y\n") +test.must_contain('aaa.hsuffix', "myyacc.py -d -o aaa.c aaa.y\n") test.must_match('bbb.c', "bbb.yacc\n") -test.must_match('bbb.hsuffix', "myyacc.py -d -o bbb.c bbb.yacc\n") +test.must_contain('bbb.hsuffix', "myyacc.py -d -o bbb.c bbb.yacc\n") test.up_to_date(arguments = '.') diff --git a/test/YACC/YACCHXXFILESUFFIX.py b/test/YACC/YACCHXXFILESUFFIX.py index 63a5358..3ee70ee 100644 --- a/test/YACC/YACCHXXFILESUFFIX.py +++ b/test/YACC/YACCHXXFILESUFFIX.py @@ -69,7 +69,7 @@ test.write('aaa.yy', "aaa.yy\n/*yacc*/\n") test.run(arguments = '.') test.must_match('aaa.cc', "aaa.yy\n") -test.must_match('aaa.hxxsuffix', "myyacc.py -d -o aaa.cc aaa.yy\n") +test.must_contain('aaa.hxxsuffix', "myyacc.py -d -o aaa.cc aaa.yy\n") test.up_to_date(arguments = '.') diff --git a/test/YACC/YACCVCGFILESUFFIX.py b/test/YACC/YACCVCGFILESUFFIX.py index aee3265..32c3440 100644 --- a/test/YACC/YACCVCGFILESUFFIX.py +++ b/test/YACC/YACCVCGFILESUFFIX.py @@ -78,7 +78,7 @@ test.must_not_exist('aaa.vcgsuffix') test.must_match('bbb.cc', "bbb.yy\n") test.must_not_exist('bbb.vcg') -test.must_match('bbb.vcgsuffix', "myyacc.py -g -o bbb.cc bbb.yy\n") +test.must_contain('bbb.vcgsuffix', "myyacc.py -g -o bbb.cc bbb.yy\n") test.up_to_date(arguments = '.') diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py index 81e03f3..9218f60 100644 --- a/testing/framework/TestCmd.py +++ b/testing/framework/TestCmd.py @@ -1528,7 +1528,7 @@ class TestCmd(object): # TODO: Run full tests on both platforms and see if this fixes failures # It seems that py3.6 still sets text mode if you set encoding. elif sys.version_info[0] == 3: # TODO and sys.version_info[1] < 6: - stream = stream.decode('utf-8') + stream = stream.decode('utf-8', errors='replace') stream = stream.replace('\r\n', '\n') elif sys.version_info[0] == 2: stream = stream.replace('\r\n', '\n') |