Salome HOME
#20601 : correctif pour le cas où le nom du pyconf diffère du nom du produit
authorcrouzet <nicolas.crouzet@cea.fr>
Wed, 27 Jan 2021 14:02:55 +0000 (15:02 +0100)
committercrouzet <nicolas.crouzet@cea.fr>
Wed, 27 Jan 2021 14:02:55 +0000 (15:02 +0100)
commands/check.py
commands/compile.py
commands/configure.py
commands/generate.py
commands/make.py
commands/makeinstall.py
commands/script.py
src/compilation.py
src/product.py

index 7961ca04e778ae2790aa336c515767cb08ced548..ffb31af02439e35014fd8904df00541e23165cca 100644 (file)
@@ -133,7 +133,7 @@ def check_product(p_name_info, config, logger):
     
     # Instantiate the class that manages all the construction commands
     # like cmake, check, make install, make test, environment management, etc...
-    builder = src.compilation.Builder(config, logger, p_info)
+    builder = src.compilation.Builder(config, logger, p_name, p_info)
     
     # Prepare the environment
     log_step(logger, header, "PREPARE ENV")
index cd5b6e633d38fd6b36ec22f724ba0497fefd1106..984363c0db1e9c51683e2a84a866b15b83807cb7 100644 (file)
@@ -510,6 +510,7 @@ def compile_product_pip(sat,
                              src.environment.Environ(dict(os.environ)),
                              True)
     environ_info = src.product.get_product_dependencies(config,
+                                                        p_name,
                                                         p_info)
     build_environ.silent = (config.USER.output_verbose_level < 5)
     build_environ.set_full_environ(logger, environ_info)
index 2bf068b83dd97f1d0296d83879431c25c66664ac..876e928f189cc0777c3dd7d2fdc83d7cf80ec1e6 100644 (file)
@@ -94,7 +94,7 @@ def configure_product(p_name_info, conf_option, config, logger):
 
     # Instantiate the class that manages all the construction commands
     # like cmake, make, make install, make test, environment management, etc...
-    builder = src.compilation.Builder(config, logger, p_info)
+    builder = src.compilation.Builder(config, logger, p_name, p_info)
     
     # Prepare the environment
     log_step(logger, header, "PREPARE ENV")
@@ -190,4 +190,4 @@ def run(args, runner, logger):
           'valid_result': nb_products - res,
           'nb_products': nb_products }, 1)    
     
-    return res 
\ No newline at end of file
+    return res 
index b34b0b6b684cdca138aedda1f6c45e41382ccce9..e7e05b4123e65e2ccb881be604b6ab4b396b060c 100644 (file)
@@ -83,7 +83,7 @@ def generate_component(config, compo, product_info, context, header, logger):
     config.PRODUCTS.addMapping(compo, src.pyconf.Mapping(config), "")
     config.PRODUCTS[compo].default = compo_info
 
-    builder = src.compilation.Builder(config, logger, compo_info, check_src=False)
+    builder = src.compilation.Builder(config, logger, compo, compo_info, check_src=False)
     builder.header = header
 
     # generate the component
index b3e6aaf54829f54df7b6589d1f1dccae38adbd12..39f562a100e94d500bdf68572b9a93e8f8d2b762 100644 (file)
@@ -95,7 +95,7 @@ def make_product(p_name_info, make_option, config, logger):
 
     # Instantiate the class that manages all the construction commands
     # like cmake, make, make install, make test, environment management, etc...
-    builder = src.compilation.Builder(config, logger, p_info)
+    builder = src.compilation.Builder(config, logger, p_name, p_info)
     
     # Prepare the environment
     log_step(logger, header, "PREPARE ENV")
@@ -209,4 +209,4 @@ def run(args, runner, logger):
           'valid_result': nb_products - res,
           'nb_products': nb_products }, 1)    
     
-    return res 
\ No newline at end of file
+    return res 
index 8a2a07a186093c48e9a6e782ee7aba4ac55ec7e8..b01ee62679f8468bc138c787e672e71ba38a6ecb 100644 (file)
@@ -90,7 +90,7 @@ def makeinstall_product(p_name_info, config, logger):
 
     # Instantiate the class that manages all the construction commands
     # like cmake, make, make install, make test, environment management, etc...
-    builder = src.compilation.Builder(config, logger, p_info)
+    builder = src.compilation.Builder(config, logger, p_name, p_info)
     
     # Prepare the environment
     log_step(logger, header, "PREPARE ENV")
@@ -173,4 +173,4 @@ def run(args, runner, logger):
           'valid_result': nb_products - res,
           'nb_products': nb_products }, 1)    
     
-    return res 
\ No newline at end of file
+    return res 
index 7345977be0c0c23ec96f683c2e20a4fd1466a4af..0ca14348b6cdba3ee9c0f77e6f551a2a43ca9b19 100644 (file)
@@ -106,7 +106,7 @@ def run_script_of_product(p_name_info, nb_proc, config, logger):
 
     # Instantiate the class that manages all the construction commands
     # like cmake, make, make install, make test, environment management, etc...
-    builder = src.compilation.Builder(config, logger, p_info)
+    builder = src.compilation.Builder(config, logger, p_name, p_info)
     
     # Prepare the environment
     log_step(logger, header, "PREPARE ENV")
index e0ec8d69c0530f8f21740b0579fc2eb672b695a7..210eb522096ea9f2bec2747233ba93ed4bd5536b 100644 (file)
@@ -38,12 +38,14 @@ class Builder:
     def __init__(self,
                  config,
                  logger,
+                 product_name,
                  product_info,
                  options = src.options.OptResult(),
                  check_src=True):
         self.config = config
         self.logger = logger
         self.options = options
+        self.product_name = product_name
         self.product_info = product_info
         self.build_dir = src.Path(self.product_info.build_dir)
         self.source_dir = src.Path(self.product_info.source_dir)
@@ -83,6 +85,7 @@ class Builder:
 
         # add products in depend and opt_depend list recursively
         environ_info = src.product.get_product_dependencies(self.config,
+                                                            self.product_name,
                                                             self.product_info)
         #environ_info.append(self.product_info.name)
 
index a1bf7e651cd9d8c00c83242954f1ba242e1ec69b..7d354c47a046b48fbd294cafb0b29b7fb5e425c9 100644 (file)
@@ -810,7 +810,7 @@ def get_products_list(options, cfg, logger):
     return res
 
 
-def get_product_dependencies(config, product_info):
+def get_product_dependencies(config, product_name, product_info):
     """\
     Get the list of products that are 
     in the product_info dependencies
@@ -827,7 +827,7 @@ def get_product_dependencies(config, product_info):
                              config)
     all_products_graph=get_dependencies_graph(all_products_infos)
     res=[]
-    res=depth_search_graph(all_products_graph, product_info.name, res)
+    res=depth_search_graph(all_products_graph, product_name, res)
     return res[1:]  # remove the product himself (in first position)
 
 def check_installation(config, product_info):