From f4627c480788454ff3e8ab9f2c75966ed999d9cd Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 9 May 2016 15:26:03 -0700 Subject: Fixed usage of linknames which needed to be defined outside of the two methods which share it's value and wasn't. Curious this only fails in python2.7 when __future__ is imported.. --- src/engine/SCons/Tool/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 9606ac1..26caf2f 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -244,6 +244,9 @@ def createStaticLibBuilder(env): return static_lib +# used by the following two methods +linknames = [] + def _call_linker_cb(env, callback, args, result = None): """Returns the result of env['LINKCALLBACKS'][callback](*args) if env['LINKCALLBACKS'] is a dictionary and env['LINKCALLBACKS'][callback] @@ -268,7 +271,7 @@ def _call_linker_cb(env, callback, args, result = None): if Verbose: print('_call_linker_cb: env["LINKCALLBACKS"][{:r}] found'.format(callback)) print('_call_linker_cb: env["LINKCALLBACKS"][{:r}]={:r}'.format(callback, cbfun)) - if(callable(cbfun)): + if (callable(cbfun)): if Verbose: print("VersionShLibLinkNames: linkname ",linkname, ", target ",libname) linknames.append(linkname) -- cgit v0.12