diff options
author | Tausif Rahman <tausif.rahman@mongodb.com> | 2022-05-24 22:55:22 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-25 17:40:16 +0000 |
commit | 9ea1d6f0419938770eea612479c75838f75752b7 (patch) | |
tree | 26b57fa102878dba3251b40f7ddf9c50ab8b275a /src/mongo/SConscript | |
parent | 3ad805fea14b2f1d5c5a367f6ec05ece93502f32 (diff) | |
download | mongo-9ea1d6f0419938770eea612479c75838f75752b7.tar.gz |
SERVER-66490 Apply pylinters to build system code
Diffstat (limited to 'src/mongo/SConscript')
-rw-r--r-- | src/mongo/SConscript | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mongo/SConscript b/src/mongo/SConscript index db6a4182ed7..6cb7d85b326 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -15,11 +15,9 @@ env = env.Clone() env.InjectMongoIncludePaths() -env.AppendUnique( - FORCEINCLUDES=[ - 'mongo/platform/basic.h', - ], -) +env.AppendUnique(FORCEINCLUDES=[ + 'mongo/platform/basic.h', +], ) env.SConscript( dirs=[ @@ -53,7 +51,8 @@ env.SConscript( ) config_header_substs = ( - ('@mongo_config_altivec_vec_vbpermq_output_index@', 'MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX'), + ('@mongo_config_altivec_vec_vbpermq_output_index@', + 'MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX'), ('@mongo_config_debug_build@', 'MONGO_CONFIG_DEBUG_BUILD'), ('@mongo_config_have_execinfo_backtrace@', 'MONGO_CONFIG_HAVE_EXECINFO_BACKTRACE'), ('@mongo_config_have_explicit_bzero@', 'MONGO_CONFIG_HAVE_EXPLICIT_BZERO'), @@ -78,20 +77,21 @@ config_header_substs = ( ('@mongo_config_wiredtiger_enabled@', 'MONGO_CONFIG_WIREDTIGER_ENABLED'), ) + def makeConfigHeaderDefine(self, key): val = "// #undef {0}".format(key) if key in self['CONFIG_HEADER_DEFINES']: val = "#define {0} {1}".format(key, self['CONFIG_HEADER_DEFINES'][key]) return val + + env.AddMethod(makeConfigHeaderDefine) generateConfigHeaderFile = env.Substfile( 'config.h.in', - SUBST_DICT=[(k, env.makeConfigHeaderDefine(v)) for (k, v) in config_header_substs] -) + SUBST_DICT=[(k, env.makeConfigHeaderDefine(v)) for (k, v) in config_header_substs]) env.Alias('generated-sources', generateConfigHeaderFile) - # NOTE: The 'base' library does not really belong here. Its presence # here is temporary. Do not add to this library, do not remove from # it, and do not declare other libraries in this file. @@ -102,11 +102,9 @@ if use_libunwind == True: quick_exit_env = baseEnv.Clone() if has_option('gcov'): - quick_exit_env.Append( - CPPDEFINES=[ - 'MONGO_GCOV', - ], - ) + quick_exit_env.Append(CPPDEFINES=[ + 'MONGO_GCOV', + ], ) quick_exit_obj = quick_exit_env.LibraryObject( target='quick_exit', source=[ @@ -261,9 +259,11 @@ env.AutoInstall( # If no module has introduced a file named LICENSE-Enterprise.txt then this # is a Community build, so inject the AGPL and the Community license -enterprise_license = [banner for banner in env["MODULE_BANNERS"] if banner.name == "LICENSE-Enterprise.txt"] +enterprise_license = [ + banner for banner in env["MODULE_BANNERS"] if banner.name == "LICENSE-Enterprise.txt" +] if not enterprise_license: - env.Append(MODULE_BANNERS = [distsrc.File('LICENSE-Community.txt')]) + env.Append(MODULE_BANNERS=[distsrc.File('LICENSE-Community.txt')]) # All module banners get staged to the top level of the tarfile, so we # need to fail if we are going to have a name collision. |