Do not expose Task.allow_argsfile and remove allow_argsfile from non-Task class #2216

The class waflib.Tools.winres.rc_parser is not a subclass of waflib.Task.Task:
rc_parser -> c_preproc.c_parser -> object
This commit is contained in:
Thomas Nagy 2019-03-03 16:39:28 +01:00
parent e3c0c1b571
commit b72fabf8e5
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
3 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,15 @@
NEW IN WAF 2.0.15
-----------------
* Fix Python path detection under Git-Bash #2217
* Provide an option to disable args files #2216
* Improve command line length calculation for args files #2214
* Add libs/stubs to Cuda library path #2213
* Suppress ant_glob java warnings #2212
* Support multiple 'default_cmd' #2211
* Warn when buildcopy is used without any files to copy #2210
* Protobuf examples enhancements #2208 #2209
* Fix all DeprecationWarning: invalid escape sequence #2207
NEW IN WAF 2.0.14
-----------------
* Support Fortran 2008 submodules #2205

View File

@ -150,9 +150,6 @@ class Task(evil):
always_run = False
"""Specify whether task instances must always be executed or not (class attribute)"""
allow_argsfile = True
"""Specify whether task instances support the @argsfile shortcut for sunting arguments to a file (class attribute)"""
shell = False
"""Execute the command with the shell (class attribute)"""
@ -316,7 +313,7 @@ class Task(evil):
cmd_bytes = sum([len(arg) for arg in cmd]) + len(cmd) -1
# Shunt arguments to a temporary file if the command is
# going to be too long.
if self.allow_argsfile and (cmd_bytes >= 8192 if Utils.is_win32 else cmd_bytes > 200000):
if (cmd_bytes >= 8192 if Utils.is_win32 else cmd_bytes > 200000) and getattr(self, 'allow_argsfile', True):
cmd, args = self.split_argfile(cmd)
try:
(fd, tmp) = tempfile.mkstemp()

View File

@ -32,8 +32,6 @@ class rc_parser(c_preproc.c_parser):
"""
Calculates dependencies in .rc files
"""
allow_argsfile = False
def filter_comments(self, node):
"""
Overrides :py:meth:`waflib.Tools.c_preproc.c_parser.filter_comments`