summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Scanner
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Scanner')
-rw-r--r--src/engine/SCons/Scanner/Dir.py2
-rw-r--r--src/engine/SCons/Scanner/Fortran.py2
-rw-r--r--src/engine/SCons/Scanner/LaTeX.py26
-rw-r--r--src/engine/SCons/Scanner/ScannerTests.py11
4 files changed, 8 insertions, 33 deletions
diff --git a/src/engine/SCons/Scanner/Dir.py b/src/engine/SCons/Scanner/Dir.py
index f02904f..1cecfb7 100644
--- a/src/engine/SCons/Scanner/Dir.py
+++ b/src/engine/SCons/Scanner/Dir.py
@@ -19,8 +19,6 @@
# 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.
-#
-from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/src/engine/SCons/Scanner/Fortran.py b/src/engine/SCons/Scanner/Fortran.py
index 74f44bc..29af9aa 100644
--- a/src/engine/SCons/Scanner/Fortran.py
+++ b/src/engine/SCons/Scanner/Fortran.py
@@ -25,8 +25,6 @@ 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.
-#
-from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py
index 904d612..9ea450b 100644
--- a/src/engine/SCons/Scanner/LaTeX.py
+++ b/src/engine/SCons/Scanner/LaTeX.py
@@ -57,12 +57,9 @@ def modify_env_var(env, var, abspath):
env.PrependENVPath(var, abspath)
try:
if SCons.Util.is_List(env[var]):
- #TODO(1.5)
- #env.PrependENVPath(var, [os.path.abspath(str(p)) for p in env[var]])
env.PrependENVPath(var, [os.path.abspath(str(p)) for p in env[var]])
else:
# Split at os.pathsep to convert into absolute path
- #TODO(1.5) env.PrependENVPath(var, [os.path.abspath(p) for p in str(env[var]).split(os.pathsep)])
env.PrependENVPath(var, [os.path.abspath(p) for p in str(env[var]).split(os.pathsep)])
except KeyError:
pass
@@ -72,8 +69,6 @@ def modify_env_var(env, var, abspath):
# does not work, refuses to append ":" (os.pathsep).
if SCons.Util.is_List(env['ENV'][var]):
- # TODO(1.5)
- #env['ENV'][var] = os.pathsep.join(env['ENV'][var])
env['ENV'][var] = os.pathsep.join(env['ENV'][var])
# Append the trailing os.pathsep character here to catch the case with no env[var]
env['ENV'][var] = env['ENV'][var] + os.pathsep
@@ -251,10 +246,11 @@ class LaTeX(SCons.Scanner.Base):
if include[0] == 'includegraphics':
base, ext = os.path.splitext( filename )
if ext == "":
- #TODO(1.5) return [filename + e for e in self.graphics_extensions]
- #return map(lambda e: filename+e, self.graphics_extensions + TexGraphics)
- # use the line above to find dependency for PDF builder when only .eps figure is present
- # Since it will be found if the user tell scons how to make the pdf figure leave it out for now.
+ #return [filename+e for e in self.graphics_extensions + TexGraphics]
+ # use the line above to find dependencies for the PDF builder
+ # when only an .eps figure is present. Since it will be found
+ # if the user tells scons how to make the pdf figure, leave
+ # it out for now.
return [filename+e for e in self.graphics_extensions]
return [filename]
@@ -335,19 +331,11 @@ class LaTeX(SCons.Scanner.Base):
while queue:
include = queue.pop()
- # TODO(1.5): more compact:
- #try:
- # if seen[include[1]] == 1:
- # continue
- #except KeyError:
- # seen[include[1]] = 1
try:
- already_seen = seen[include[1]]
+ if seen[include[1]] == 1:
+ continue
except KeyError:
seen[include[1]] = 1
- already_seen = False
- if already_seen:
- continue
#
# Handle multiple filenames in include[1]
diff --git a/src/engine/SCons/Scanner/ScannerTests.py b/src/engine/SCons/Scanner/ScannerTests.py
index a356308..2e9a72a 100644
--- a/src/engine/SCons/Scanner/ScannerTests.py
+++ b/src/engine/SCons/Scanner/ScannerTests.py
@@ -19,8 +19,6 @@
# 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.
-#
-from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
@@ -571,14 +569,7 @@ class ClassicCPPTestCase(unittest.TestCase):
assert n == 'path/bbb', n
assert i == 'bbb', i
- # TODO(1.5): remove when 2.2 is minimal; replace ccc
- # variable in find_include() call below with in-line u'ccc'.
- try:
- ccc = eval("u'ccc'")
- except SyntaxError:
- ccc = 'ccc'
-
- n, i = s.find_include(('<', ccc), 'foo', ('path',))
+ n, i = s.find_include(('<', u'ccc'), 'foo', ('path',))
assert n == 'path/ccc', n
assert i == 'ccc', i