summaryrefslogtreecommitdiff
path: root/engine/SCons/Node/FS.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-04-10 16:42:42 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-04-10 16:42:42 +0200
commit2b4e62c8dacc53317d63d987c4a8826a38bbf9aa (patch)
tree2ec174254744787d91ee83de5c49c8ab9309937e /engine/SCons/Node/FS.py
parent5ee29f69a1062eaa564b19dff870c13f9f8445df (diff)
parent70639bffe44444b5faee83772cc3c73dc2e46fed (diff)
Merge tag 'upstream/2.5.0'
Upstream version 2.5.0
Diffstat (limited to 'engine/SCons/Node/FS.py')
-rw-r--r--engine/SCons/Node/FS.py57
1 files changed, 4 insertions, 53 deletions
diff --git a/engine/SCons/Node/FS.py b/engine/SCons/Node/FS.py
index bd43676..57085ec 100644
--- a/engine/SCons/Node/FS.py
+++ b/engine/SCons/Node/FS.py
@@ -11,7 +11,7 @@ that can be used by scripts or modules looking for the canonical default.
"""
#
-# Copyright (c) 2001 - 2015 The SCons Foundation
+# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ that can be used by scripts or modules looking for the canonical default.
# 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/Node/FS.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
+__revision__ = "src/engine/SCons/Node/FS.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog"
import fnmatch
import os
@@ -186,7 +186,7 @@ needs_normpath_check = re.compile(
# We need to renormalize the path if it contains a '.'
# directory, but NOT if it is a single '.' '/' characters. We
# do not want to match a single '.' because this case is checked
- # for explicitely since this is common enough case.
+ # for explicitly since this is common enough case.
#
# Note that we check for all the following cases:
#
@@ -1165,15 +1165,6 @@ class LocalFS(object):
return ''
-#class RemoteFS:
-# # Skeleton for the obvious methods we might need from the
-# # abstraction layer for a remote filesystem.
-# def upload(self, local_src, remote_dst):
-# pass
-# def download(self, remote_src, local_dst):
-# pass
-
-
class FS(LocalFS):
def __init__(self, path = None):
@@ -2234,7 +2225,6 @@ class Dir(Base):
# the overall list will also be filtered later,
# after we exit this loop.
if pattern[0] != '.':
- #disk_names = [ d for d in disk_names if d[0] != '.' ]
disk_names = [x for x in disk_names if x[0] != '.']
disk_names = fnmatch.filter(disk_names, pattern)
dirEntry = dir.Entry
@@ -2627,13 +2617,6 @@ class File(Base):
the directory of this file."""
return self.dir.File(name)
- #def generate_build_dict(self):
- # """Return an appropriate dictionary of values for building
- # this File."""
- # return {'Dir' : self.Dir,
- # 'File' : self.File,
- # 'RDirs' : self.RDirs}
-
def _morph(self):
"""Turn a file system node into a File object."""
self.scanner_paths = {}
@@ -2907,9 +2890,7 @@ class File(Base):
pass
if scanner:
- # result = [n.disambiguate() for n in scanner(self, env, path)]
- result = scanner(self, env, path)
- result = [N.disambiguate() for N in result]
+ result = [n.disambiguate() for n in scanner(self, env, path)]
else:
result = []
@@ -3519,36 +3500,6 @@ class FileFinder(object):
filedir, filename = os.path.split(filename)
if filedir:
- # More compact code that we can't use until we drop
- # support for Python 1.5.2:
- #
- #def filedir_lookup(p, fd=filedir):
- # """
- # A helper function that looks up a directory for a file
- # we're trying to find. This only creates the Dir Node
- # if it exists on-disk, since if the directory doesn't
- # exist we know we won't find any files in it... :-)
- # """
- # dir, name = os.path.split(fd)
- # if dir:
- # p = filedir_lookup(p, dir)
- # if not p:
- # return None
- # norm_name = _my_normcase(name)
- # try:
- # node = p.entries[norm_name]
- # except KeyError:
- # return p.dir_on_disk(name)
- # if isinstance(node, Dir):
- # return node
- # if isinstance(node, Entry):
- # node.must_be_same(Dir)
- # return node
- # if isinstance(node, Dir) or isinstance(node, Entry):
- # return node
- # return None
- #paths = [_f for _f in map(filedir_lookup, paths) if _f]
-
self.default_filedir = filedir
paths = [_f for _f in map(self.filedir_lookup, paths) if _f]