]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
Improve the application command
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Tue, 13 Sep 2016 14:01:59 +0000 (16:01 +0200)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Tue, 13 Sep 2016 14:01:59 +0000 (16:01 +0200)
commands/application.py
src/product.py

index 345a7ec785e20a8cbffb6872c8f0baaad988c143..2cc326e37f602f4a3a812a6fa696f8ab676bbfb4 100644 (file)
@@ -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:
index 69505607f5dfb7cd803d6fc70465f4847292dc39..84c065748cdaee3afe0790b7b8cff18543f43b39 100644 (file)
@@ -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