diff options
author | Dirk Baechle <dl9obn@darc.de> | 2015-02-26 23:44:19 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2015-02-26 23:44:19 (GMT) |
commit | 354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1 (patch) | |
tree | e4e8f3ef044c39a930235a39bb7301d35b0300ff /src/engine/SCons/Tool/swig.py | |
parent | 8447a9187ac80c0a7e980510154542b49577ddaa (diff) | |
download | SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.zip SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.tar.gz SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.tar.bz2 |
- switching Node class and NodeInfo/Binfo to using slots
- memoizer subsystem now uses decorators instead of the metaclass approach
Diffstat (limited to 'src/engine/SCons/Tool/swig.py')
-rw-r--r-- | src/engine/SCons/Tool/swig.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/swig.py b/src/engine/SCons/Tool/swig.py index f166174..a315182 100644 --- a/src/engine/SCons/Tool/swig.py +++ b/src/engine/SCons/Tool/swig.py @@ -42,6 +42,7 @@ import SCons.Defaults import SCons.Scanner import SCons.Tool import SCons.Util +import SCons.Node SwigAction = SCons.Action.Action('$SWIGCOM', '$SWIGCOMSTR') @@ -117,9 +118,13 @@ def _swigEmitter(target, source, env): if outdir: java_files = [os.path.join(outdir, j) for j in java_files] java_files = list(map(env.fs.File, java_files)) + def t_from_s(t, p, s, x): + return t.dir + tsm = SCons.Node._target_from_source_map + tkey = len(tsm) + tsm[tkey] = t_from_s for jf in java_files: - t_from_s = lambda t, p, s, x: t.dir - SCons.Util.AddMethod(jf, t_from_s, 'target_from_source') + jf._func_target_from_source = tkey target.extend(java_files) return (target, source) |