From: Serge Rehbinder Date: Tue, 13 Sep 2016 14:01:59 +0000 (+0200) Subject: Improve the application command X-Git-Tag: 5.0.0a1~132 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=575e9b808e2a9425da2d487fb7aba4055d0e01a8;p=tools%2Fsat.git Improve the application command --- diff --git a/commands/application.py b/commands/application.py index 345a7ec..2cc326e 100644 --- a/commands/application.py +++ b/commands/application.py @@ -212,8 +212,6 @@ def create_application(config, appli_dir, catalog, logger, display=True): SALOME_modules = get_SALOME_modules(config) - prerequis = config.PRODUCT.prerequis - warn = ['KERNEL', 'GUI'] if display: for w in warn: diff --git a/src/product.py b/src/product.py index 6950560..84c0657 100644 --- a/src/product.py +++ b/src/product.py @@ -543,6 +543,42 @@ def product_is_vcs(product_info): ''' return product_info.get_source in AVAILABLE_VCS +def product_is_SALOME(product_info): + '''Know if a product is a SALOME module + + :param product_info Config: The configuration specific to + the product + :return: True if the product is a SALOME module, else False + :rtype: boolean + ''' + return ("properties" in product_info and + "is_SALOME_module" in product_info.properties and + product_info.properties.is_SALOME_module == "yes") + +def product_is_smesh_plugin(product_info): + '''Know if a product is a SMESH plugin + + :param product_info Config: The configuration specific to + the product + :return: True if the product is a SMESH plugin, else False + :rtype: boolean + ''' + return ("properties" in product_info and + "smesh_plugin" in product_info.properties and + product_info.properties.smesh_plugin == "yes") + +def product_is_cpp(product_info): + '''Know if a product is cpp + + :param product_info Config: The configuration specific to + the product + :return: True if the product is a cpp, else False + :rtype: boolean + ''' + return ("properties" in product_info and + "cpp" in product_info.properties and + product_info.properties.cpp == "yes") + def product_has_script(product_info): '''Know if a product has a compilation script