@@ -4158,8 +4158,10 @@ def _sanity_check_step_common(self, custom_paths, custom_commands):
41584158 paths = {}
41594159 for key in path_keys_and_check :
41604160 paths .setdefault (key , [])
4161- paths .update ({SANITY_CHECK_PATHS_DIRS : ['bin' , ('lib' , 'lib64' )]})
4162- self .log .info ("Using default sanity check paths: %s" , paths )
4161+ # Default paths for extensions are handled in the parent easyconfig if desired
4162+ if not self .is_extension :
4163+ paths .update ({SANITY_CHECK_PATHS_DIRS : ['bin' , ('lib' , 'lib64' )]})
4164+ self .log .info ("Using default sanity check paths: %s" , paths )
41634165
41644166 # if enhance_sanity_check is enabled *and* sanity_check_paths are specified in the easyconfig,
41654167 # those paths are used to enhance the paths provided by the easyblock
@@ -4179,9 +4181,11 @@ def _sanity_check_step_common(self, custom_paths, custom_commands):
41794181 # verify sanity_check_paths value: only known keys, correct value types, at least one non-empty value
41804182 only_list_values = all (isinstance (x , list ) for x in paths .values ())
41814183 only_empty_lists = all (not x for x in paths .values ())
4182- if sorted_keys != known_keys or not only_list_values or only_empty_lists :
4184+ if sorted_keys != known_keys or not only_list_values or ( only_empty_lists and not self . is_extension ) :
41834185 error_msg = "Incorrect format for sanity_check_paths: should (only) have %s keys, "
4184- error_msg += "values should be lists (at least one non-empty)."
4186+ error_msg += "values should be lists"
4187+ if not self .is_extension :
4188+ error_msg += " (at least one non-empty)."
41854189 raise EasyBuildError (error_msg % ', ' .join ("'%s'" % k for k in known_keys ))
41864190
41874191 # Resolve arch specific entries
0 commit comments