# current product
debug = 'no'
dev = 'no'
+ hpc = 'no'
verbose = 'no'
base = 'maybe'
section = None
# if no version, then take the default one defined in the application
- if isinstance(version, bool):
+ if isinstance(version, bool) or isinstance(version, str):
# in this case tag is mandatory, not debug, verbose, dev
version = config.APPLICATION.tag
if 'debug' in config.APPLICATION:
verbose = config.APPLICATION.verbose
if 'dev' in config.APPLICATION:
dev = config.APPLICATION.dev
-
+ if 'hpc' in config.APPLICATION:
+ hpc = config.APPLICATION.hpc
+
if isinstance(version, src.pyconf.Mapping):
dic_version = version
# Get the version/tag
elif 'dev' in config.APPLICATION:
dev = config.APPLICATION.dev
+ # Get the hpc if any
+ if 'hpc' in dic_version:
+ hpc = dic_version.hpc
+ elif 'hpc' in config.APPLICATION:
+ hpc = config.APPLICATION.hpc
+
# Get the base if any
if 'base' in dic_version:
base = dic_version.base
elif 'dev' in config.APPLICATION:
dev = config.APPLICATION.dev
+ # Get the hpc if any
+ if 'hpc' in dic_version:
+ hpc = dic_version.hpc
+ elif 'hpc' in config.APPLICATION:
+ hpc = config.APPLICATION.hpc
+
# Get the base if any
if 'base' in dic_version:
base = dic_version["base"]
prod_info.debug = debug
prod_info.verbose = verbose
prod_info.dev = dev
+ prod_info.hpc = hpc
prod_info.version = version
# Set the archive_info if the product is get in archive mode
# if product_info.name == "XDATA": return True #test #10569
return res
+def product_is_hpc(product_info):
+ """Know if a product is in hpc mode
+
+ :param product_info Config: The configuration specific to
+ the product
+ :return: True if the product is in hpc mode, else False
+ :rtype: boolean
+ """
+ hpc = product_info.hpc
+ res = (hpc.lower() == 'yes')
+ return res
+
def product_is_debug(product_info):
"""Know if a product is in debug mode