SCons: dropping pre 1.0 compatibility

note: current SCons development is targetting 2.0,
current stable is 1.3, which is included in Squeeze
even Debian/Lenny includes 1.0.
This commit is contained in:
Fischlurch 2010-05-21 01:59:07 +02:00
parent 3ca17af42f
commit d10380d124
2 changed files with 9 additions and 23 deletions

View file

@ -59,7 +59,7 @@ def setupBasicEnvironment():
""" define cmdline options, build type decisions
"""
EnsurePythonVersion(2,3)
EnsureSConsVersion(0,96,90)
EnsureSConsVersion(1,0)
Decider('MD5-timestamp') # detect changed files by timestamp, then do a MD5

View file

@ -79,28 +79,14 @@ class LumieraEnvironment(Environment):
if alias:
self.libInfo[alias] = libInfo
return libInfo
def Glob (self, pattern):
""" temporary workaround; newer versions of SCons provide this as a global function """
pattern = self.subst(pattern)
return glob.glob(pattern)
def AddMethod (self, function):
""" temporary workaround; newer versions of SCons provide this as a global function """
self.__dict__[function.__name__] = function.__get__(self)
#### temporary pre 1.0 SCons compatibility hack ####
_ver = map(int, SCons.__version__.split('.')[:2])
_old = (_ver[0]<1 and _ver[1]<97)
if _old:
ConfigBase = SCons.SConf.SConf
else:
ConfigBase = SCons.SConf.SConfBase
del LumieraEnvironment.Glob
del LumieraEnvironment.AddMethod
# use the official impl present since SCons 0.98
# use the new name of the config context base class
# extending the 'Configure' functionality of SCons,
# especially for library dependency checking
ConfigBase = SCons.SConf.SConfBase