7171
7272EMPTY_LIST = 'empty_list'
7373
74+ DATA = 'data'
75+ MODULES = 'modules'
76+ SOFTWARE = 'software'
77+
7478PKG_TOOL_FPM = 'fpm'
7579PKG_TYPE_RPM = 'rpm'
7680
9296DEFAULT_CONT_TYPE = CONT_TYPE_SINGULARITY
9397
9498DEFAULT_BRANCH = 'develop'
99+ DEFAULT_DOWNLOAD_INITIAL_WAIT_TIME = 10
100+ DEFAULT_DOWNLOAD_MAX_ATTEMPTS = 6
95101DEFAULT_DOWNLOAD_TIMEOUT = 10
96102DEFAULT_ENV_FOR_SHEBANG = '/usr/bin/env'
97103DEFAULT_ENVVAR_USERS_MODULES = 'HOME'
112118 'packagepath' : 'packages' ,
113119 'repositorypath' : 'ebfiles_repo' ,
114120 'sourcepath' : 'sources' ,
115- 'subdir_modules' : 'modules' ,
116- 'subdir_software' : 'software' ,
121+ 'sourcepath_data' : 'sources' ,
122+ 'subdir_data' : DATA ,
123+ 'subdir_modules' : MODULES ,
124+ 'subdir_software' : SOFTWARE ,
117125}
118126DEFAULT_PKG_RELEASE = '1'
119127DEFAULT_PKG_TOOL = PKG_TOOL_FPM
@@ -478,6 +486,7 @@ def mk_full_default_path(name, prefix=DEFAULT_PREFIX):
478486 ('chem' , "Chemistry, Computational Chemistry and Quantum Chemistry" ),
479487 ('compiler' , "Compilers" ),
480488 ('data' , "Data management & processing tools" ),
489+ ('dataset' , "Datasets" ),
481490 ('debugger' , "Debuggers" ),
482491 ('devel' , "Development tools" ),
483492 ('geo' , "Earth Sciences" ),
@@ -512,6 +521,7 @@ class ConfigurationVariables(BaseConfigurationVariables):
512521 'failed_install_build_dirs_path' ,
513522 'failed_install_logs_path' ,
514523 'installpath' ,
524+ 'installpath_data' ,
515525 'installpath_modules' ,
516526 'installpath_software' ,
517527 'job_backend' ,
@@ -526,6 +536,8 @@ class ConfigurationVariables(BaseConfigurationVariables):
526536 'repository' ,
527537 'repositorypath' ,
528538 'sourcepath' ,
539+ 'sourcepath_data' ,
540+ 'subdir_data' ,
529541 'subdir_modules' ,
530542 'subdir_software' ,
531543 'tmp_logdir' ,
@@ -569,16 +581,20 @@ def init(options, config_options_dict):
569581 """
570582 tmpdict = copy .deepcopy (config_options_dict )
571583
572- # make sure source path is a list
573- sourcepath = tmpdict ['sourcepath' ]
574- if isinstance (sourcepath , str ):
575- tmpdict ['sourcepath' ] = sourcepath .split (':' )
576- _log .debug ("Converted source path ('%s') to a list of paths: %s" % (sourcepath , tmpdict ['sourcepath' ]))
577- elif not isinstance (sourcepath , (tuple , list )):
578- raise EasyBuildError (
579- "Value for sourcepath has invalid type (%s): %s" , type (sourcepath ), sourcepath ,
580- exit_code = EasyBuildExit .OPTION_ERROR
581- )
584+ if tmpdict ['sourcepath_data' ] is None :
585+ tmpdict ['sourcepath_data' ] = tmpdict ['sourcepath' ][:]
586+
587+ for srcpath in ['sourcepath' , 'sourcepath_data' ]:
588+ # make sure source path is a list
589+ sourcepath = tmpdict [srcpath ]
590+ if isinstance (sourcepath , str ):
591+ tmpdict [srcpath ] = sourcepath .split (':' )
592+ _log .debug ("Converted source path ('%s') to a list of paths: %s" % (sourcepath , tmpdict [srcpath ]))
593+ elif not isinstance (sourcepath , (tuple , list )):
594+ raise EasyBuildError (
595+ "Value for %s has invalid type (%s): %s" , srcpath , type (sourcepath ), sourcepath ,
596+ exit_code = EasyBuildExit .OPTION_ERROR
597+ )
582598
583599 # initialize configuration variables (any future calls to ConfigurationVariables() will yield the same instance
584600 variables = ConfigurationVariables (tmpdict , ignore_unknown_keys = True )
@@ -704,11 +720,18 @@ def build_path():
704720
705721def source_paths ():
706722 """
707- Return the list of source paths
723+ Return the list of source paths for software
708724 """
709725 return ConfigurationVariables ()['sourcepath' ]
710726
711727
728+ def source_paths_data ():
729+ """
730+ Return the list of source paths for data
731+ """
732+ return ConfigurationVariables ()['sourcepath_data' ]
733+
734+
712735def source_path ():
713736 """NO LONGER SUPPORTED: use source_paths instead"""
714737 _log .nosupport ("source_path() is replaced by source_paths()" , '2.0' )
@@ -717,15 +740,16 @@ def source_path():
717740def install_path (typ = None ):
718741 """
719742 Returns the install path
720- - subdir 'software' for actual installation (default)
743+ - subdir 'software' for actual software installation (default)
721744 - subdir 'modules' for environment modules (typ='mod')
745+ - subdir 'data' for data installation (typ='data')
722746 """
723747 if typ is None :
724- typ = 'software'
748+ typ = SOFTWARE
725749 elif typ == 'mod' :
726- typ = 'modules'
750+ typ = MODULES
727751
728- known_types = ['modules' , 'software' ]
752+ known_types = [MODULES , SOFTWARE , DATA ]
729753 if typ not in known_types :
730754 raise EasyBuildError (
731755 "Unknown type specified in install_path(): %s (known: %s)" , typ , ', ' .join (known_types ),
0 commit comments