7474from easybuild .tools .build_log import print_error , print_msg , print_warning
7575from easybuild .tools .config import CHECKSUM_PRIORITY_JSON , DEFAULT_ENVVAR_USERS_MODULES
7676from easybuild .tools .config import FORCE_DOWNLOAD_ALL , FORCE_DOWNLOAD_PATCHES , FORCE_DOWNLOAD_SOURCES
77+ from easybuild .tools .config import EASYBUILD_SOURCES_URL # noqa
7778from easybuild .tools .config import build_option , build_path , get_log_filename , get_repository , get_repositorypath
7879from easybuild .tools .config import install_path , log_path , package_path , source_paths
7980from easybuild .tools .environment import restore_env , sanitize_env
106107from easybuild .tools .utilities import remove_unwanted_chars , time2str , trace_msg
107108from easybuild .tools .version import this_is_easybuild , VERBOSE_VERSION , VERSION
108109
109-
110- EASYBUILD_SOURCES_URL = 'https://sources.easybuild.io'
111-
112110DEFAULT_BIN_LIB_SUBDIRS = ('bin' , 'lib' , 'lib64' )
113111
114112MODULE_ONLY_STEPS = [MODULE_STEP , PREPARE_STEP , READY_STEP , POSTITER_STEP , SANITYCHECK_STEP ]
@@ -887,8 +885,10 @@ def obtain_file(self, filename, extension=False, urls=None, download_filename=No
887885 source_urls = []
888886 source_urls .extend (self .cfg ['source_urls' ])
889887
890- # add https://sources.easybuild.io as fallback source URL
891- source_urls .append (EASYBUILD_SOURCES_URL + '/' + os .path .join (name_letter , location ))
888+ # Add additional URLs as configured.
889+ for url in build_option ("extra_source_urls" ):
890+ url += "/" + name_letter + "/" + location
891+ source_urls .append (url )
892892
893893 mkdir (targetdir , parents = True )
894894
@@ -2482,7 +2482,7 @@ def check_checksums_for(self, ent, sub='', source_cnt=None):
24822482 checksum_issues = []
24832483
24842484 sources = ent .get ('sources' , [])
2485- patches = ent .get ('patches' , [])
2485+ patches = ent .get ('patches' , []) + ent . get ( 'postinstallpatches' , [])
24862486 checksums = ent .get ('checksums' , [])
24872487 # Single source should be re-wrapped as a list, and checksums with it
24882488 if isinstance (sources , dict ):
@@ -3503,10 +3503,7 @@ def _sanity_check_step_extensions(self):
35033503 """Sanity check on extensions (if any)."""
35043504 failed_exts = []
35053505
3506- if build_option ('skip_extensions' ):
3507- self .log .info ("Skipping sanity check for extensions since skip-extensions is enabled..." )
3508- return
3509- elif not self .ext_instances :
3506+ if not self .ext_instances :
35103507 # class instances for extensions may not be initialized yet here,
35113508 # for example when using --module-only or --sanity-check-only
35123509 self .prepare_for_extensions ()
@@ -3659,7 +3656,10 @@ def xs2str(xs):
36593656
36603657 # also run sanity check for extensions (unless we are an extension ourselves)
36613658 if not extension :
3662- self ._sanity_check_step_extensions ()
3659+ if build_option ('skip_extensions' ):
3660+ self .log .info ("Skipping sanity check for extensions since skip-extensions is enabled..." )
3661+ else :
3662+ self ._sanity_check_step_extensions ()
36633663
36643664 linked_shared_lib_fails = self .sanity_check_linked_shared_libs ()
36653665 if linked_shared_lib_fails :
@@ -3926,12 +3926,13 @@ def update_config_template_run_step(self):
39263926 self .cfg .generate_template_values ()
39273927
39283928 def skip_step (self , step , skippable ):
3929- """Dedice whether or not to skip the specified step."""
3929+ """Decide whether or not to skip the specified step."""
39303930 skip = False
39313931 force = build_option ('force' )
39323932 module_only = build_option ('module_only' ) or self .cfg ['module_only' ]
39333933 sanity_check_only = build_option ('sanity_check_only' )
39343934 skip_extensions = build_option ('skip_extensions' )
3935+ skip_sanity_check = build_option ('skip_sanity_check' )
39353936 skip_test_step = build_option ('skip_test_step' )
39363937 skipsteps = self .cfg ['skipsteps' ]
39373938
@@ -3959,6 +3960,10 @@ def skip_step(self, step, skippable):
39593960 self .log .info ("Skipping %s step because of sanity-check-only mode" , step )
39603961 skip = True
39613962
3963+ elif skip_sanity_check and step == SANITYCHECK_STEP :
3964+ self .log .info ("Skipping %s step as request via skip-sanity-check" , step )
3965+ skip = True
3966+
39623967 elif skip_extensions and step == EXTENSIONS_STEP :
39633968 self .log .info ("Skipping %s step as requested via skip-extensions" , step )
39643969 skip = True
@@ -3969,9 +3974,9 @@ def skip_step(self, step, skippable):
39693974
39703975 else :
39713976 msg = "Not skipping %s step (skippable: %s, skip: %s, skipsteps: %s, module_only: %s, force: %s, "
3972- msg += "sanity_check_only: %s, skip_extensions: %s, skip_test_step: %s)"
3977+ msg += "sanity_check_only: %s, skip_extensions: %s, skip_test_step: %s, skip_sanity_check: %s )"
39733978 self .log .debug (msg , step , skippable , self .skip , skipsteps , module_only , force ,
3974- sanity_check_only , skip_extensions , skip_test_step )
3979+ sanity_check_only , skip_extensions , skip_test_step , skip_sanity_check )
39753980
39763981 return skip
39773982
@@ -4113,7 +4118,7 @@ def run_all_steps(self, run_test_cases):
41134118 Build and install this software.
41144119 run_test_cases (bool): run tests after building (e.g.: make test)
41154120 """
4116- if self .cfg ['stop' ] and self . cfg [ 'stop' ] == 'cfg' :
4121+ if self .cfg ['stop' ] == 'cfg' :
41174122 return True
41184123
41194124 steps = self .get_steps (run_test_cases = run_test_cases , iteration_count = self .det_iter_cnt ())
@@ -4725,7 +4730,7 @@ def make_checksum_lines(checksums, indent_level):
47254730
47264731 # back up easyconfig file before injecting checksums
47274732 ec_backup = back_up_file (ec ['spec' ])
4728- print_msg ("backup of easyconfig file saved to %s... " % ec_backup , log = _log )
4733+ print_msg ("backup of easyconfig file saved to %s" % ec_backup , log = _log )
47294734
47304735 # compute & inject checksums for sources/patches
47314736 print_msg ("injecting %s checksums for sources & patches in %s..." % (checksum_type , ec_fn ), log = _log )
0 commit comments