diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2010-06-15 14:28:22 +0000 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2010-06-15 14:28:22 +0000 |
commit | 738149c9bfb9965d013d01ef99f9bb1c2819e7e8 (patch) | |
tree | 0397d9bf3b12c903dc73419585df231397ff343c /src/engine/SCons/Scanner/Fortran.py | |
parent | e7885e3af440eaef38a9301fd92a105afc8ddebb (diff) |
Imported Upstream version 2.0.0upstream/2.0.0
Diffstat (limited to 'src/engine/SCons/Scanner/Fortran.py')
-rw-r--r-- | src/engine/SCons/Scanner/Fortran.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/engine/SCons/Scanner/Fortran.py b/src/engine/SCons/Scanner/Fortran.py index 1587368..8d023e7 100644 --- a/src/engine/SCons/Scanner/Fortran.py +++ b/src/engine/SCons/Scanner/Fortran.py @@ -25,12 +25,10 @@ This module implements the dependency scanner for Fortran code. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -__revision__ = "src/engine/SCons/Scanner/Fortran.py 4720 2010/03/24 03:14:11 jars" +__revision__ = "src/engine/SCons/Scanner/Fortran.py 5023 2010/06/14 22:05:46 scons" import re -import string import SCons.Node import SCons.Node.FS @@ -75,7 +73,7 @@ class F90Scanner(SCons.Scanner.Classic): kw['skeys'] = suffixes kw['name'] = name - apply(SCons.Scanner.Current.__init__, (self,) + args, kw) + SCons.Scanner.Current.__init__(self, *args, **kw) def scan(self, node, env, path=()): @@ -94,12 +92,12 @@ class F90Scanner(SCons.Scanner.Classic): d = {} for m in defmodules: d[m] = 1 - modules = filter(lambda m, d=d: not d.has_key(m), modules) + modules = [m for m in modules if m not in d] #modules = self.undefinedModules(modules, defmodules) # Convert module name to a .mod filename suffix = env.subst('$FORTRANMODSUFFIX') - modules = map(lambda x, s=suffix: string.lower(x) + s, modules) + modules = [x.lower() + suffix for x in modules] # Remove unique items from the list mods_and_includes = SCons.Util.unique(includes+modules) node.includes = mods_and_includes @@ -123,9 +121,7 @@ class F90Scanner(SCons.Scanner.Classic): sortkey = self.sort_key(dep) nodes.append((sortkey, n)) - nodes.sort() - nodes = map(lambda pair: pair[1], nodes) - return nodes + return [pair[1] for pair in sorted(nodes)] def FortranScan(path_variable="FORTRANPATH"): """Return a prototype Scanner instance for scanning source files |