"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "SCons/SConf.py" between
SCons-4.3.0.tar.gz and SCons-4.4.0.tar.gz

About: SCons is a software construction tool (a Python script and a set of modules as a superior alternative to the classic "Make" build tool).

SConf.py  (SCons-4.3.0):SConf.py  (SCons-4.4.0)
skipping to change at line 143 skipping to change at line 143
for k, v in _ac_config_hs.items(): for k, v in _ac_config_hs.items():
env.SConfigHBuilder(k, env.Value(v)) env.SConfigHBuilder(k, env.Value(v))
class SConfWarning(SCons.Warnings.SConsWarning): class SConfWarning(SCons.Warnings.SConsWarning):
pass pass
SCons.Warnings.enableWarningClass(SConfWarning) SCons.Warnings.enableWarningClass(SConfWarning)
# some error definitions # some error definitions
class SConfError(SCons.Errors.UserError): class SConfError(SCons.Errors.UserError):
def __init__(self,msg): def __init__(self,msg):
SCons.Errors.UserError.__init__(self,msg) super().__init__(msg)
class ConfigureDryRunError(SConfError): class ConfigureDryRunError(SConfError):
"""Raised when a file or directory needs to be updated during a Configure """Raised when a file or directory needs to be updated during a Configure
process, but the user requested a dry-run""" process, but the user requested a dry-run"""
def __init__(self,target): def __init__(self,target):
if not isinstance(target, SCons.Node.FS.File): if not isinstance(target, SCons.Node.FS.File):
msg = 'Cannot create configure directory "%s" within a dry-run.' % s tr(target) msg = 'Cannot create configure directory "%s" within a dry-run.' % s tr(target)
else: else:
msg = 'Cannot update configure test "%s" within a dry-run.' % str(ta rget) msg = 'Cannot update configure test "%s" within a dry-run.' % str(ta rget)
SConfError.__init__(self,msg) super().__init__(msg)
class ConfigureCacheError(SConfError): class ConfigureCacheError(SConfError):
"""Raised when a use explicitely requested the cache feature, but the test """Raised when a use explicitely requested the cache feature, but the test
is run the first time.""" is run the first time."""
def __init__(self,target): def __init__(self,target):
SConfError.__init__(self, '"%s" is not yet built and cache is forced.' % str(target)) super().__init__('"%s" is not yet built and cache is forced.' % str(targ et))
# define actions for building text files # define actions for building text files
def _createSource(target, source, env): def _createSource(target, source, env):
fd = open(str(target[0]), "w") fd = open(str(target[0]), "w")
fd.write(source[0].get_contents().decode()) fd.write(source[0].get_contents().decode())
fd.close() fd.close()
def _stringSource( target, source, env ): def _stringSource( target, source, env ):
return (str(target[0]) + ' <-\n |' + return (str(target[0]) + ' <-\n |' +
source[0].get_contents().decode().replace( '\n', "\n |" ) ) source[0].get_contents().decode().replace( '\n', "\n |" ) )
skipping to change at line 447 skipping to change at line 447
# add default tests # add default tests
default_tests = { default_tests = {
'CheckCC' : CheckCC, 'CheckCC' : CheckCC,
'CheckCXX' : CheckCXX, 'CheckCXX' : CheckCXX,
'CheckSHCC' : CheckSHCC, 'CheckSHCC' : CheckSHCC,
'CheckSHCXX' : CheckSHCXX, 'CheckSHCXX' : CheckSHCXX,
'CheckFunc' : CheckFunc, 'CheckFunc' : CheckFunc,
'CheckType' : CheckType, 'CheckType' : CheckType,
'CheckTypeSize' : CheckTypeSize, 'CheckTypeSize' : CheckTypeSize,
'CheckMember' : CheckMember,
'CheckDeclaration' : CheckDeclaration, 'CheckDeclaration' : CheckDeclaration,
'CheckHeader' : CheckHeader, 'CheckHeader' : CheckHeader,
'CheckCHeader' : CheckCHeader, 'CheckCHeader' : CheckCHeader,
'CheckCXXHeader' : CheckCXXHeader, 'CheckCXXHeader' : CheckCXXHeader,
'CheckLib' : CheckLib, 'CheckLib' : CheckLib,
'CheckLibWithHeader' : CheckLibWithHeader, 'CheckLibWithHeader' : CheckLibWithHeader,
'CheckProg' : CheckProg, 'CheckProg' : CheckProg,
} }
self.AddTests(default_tests) self.AddTests(default_tests)
self.AddTests(custom_tests) self.AddTests(custom_tests)
skipping to change at line 987 skipping to change at line 988
context.did_show_result = 1 context.did_show_result = 1
return res return res
def CheckDeclaration(context, declaration, includes = "", language = None): def CheckDeclaration(context, declaration, includes = "", language = None):
res = SCons.Conftest.CheckDeclaration(context, declaration, res = SCons.Conftest.CheckDeclaration(context, declaration,
includes = includes, includes = includes,
language = language) language = language)
context.did_show_result = 1 context.did_show_result = 1
return not res return not res
def CheckMember(context, aggregate_member, header = None, language = None):
'''Returns the status (False : failed, True : ok).'''
res = SCons.Conftest.CheckMember(context, aggregate_member, header=header, l
anguage=language)
context.did_show_result = 1
return not res
def createIncludesFromHeaders(headers, leaveLast, include_quotes = '""'): def createIncludesFromHeaders(headers, leaveLast, include_quotes = '""'):
# used by CheckHeader and CheckLibWithHeader to produce C - #include # used by CheckHeader and CheckLibWithHeader to produce C - #include
# statements from the specified header (list) # statements from the specified header (list)
if not SCons.Util.is_List(headers): if not SCons.Util.is_List(headers):
headers = [headers] headers = [headers]
l = [] l = []
if leaveLast: if leaveLast:
lastHeader = headers[-1] lastHeader = headers[-1]
headers = headers[:-1] headers = headers[:-1]
else: else:
 End of changes. 5 change blocks. 
3 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)