From e3c35a966af2b403f298f52d31fe0e5bb7996027 Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 27 Jan 2021 15:02:55 +0100 Subject: [PATCH] =?utf8?q?#20601=20:=20correctif=20pour=20le=20cas=20o?= =?utf8?q?=C3=B9=20le=20nom=20du=20pyconf=20diff=C3=A8re=20du=20nom=20du?= =?utf8?q?=20produit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- commands/check.py | 2 +- commands/compile.py | 1 + commands/configure.py | 4 ++-- commands/generate.py | 2 +- commands/make.py | 4 ++-- commands/makeinstall.py | 4 ++-- commands/script.py | 2 +- src/compilation.py | 3 +++ src/product.py | 4 ++-- 9 files changed, 15 insertions(+), 11 deletions(-) diff --git a/commands/check.py b/commands/check.py index 7961ca0..ffb31af 100644 --- a/commands/check.py +++ b/commands/check.py @@ -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") diff --git a/commands/compile.py b/commands/compile.py index cd5b6e6..984363c 100644 --- a/commands/compile.py +++ b/commands/compile.py @@ -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) diff --git a/commands/configure.py b/commands/configure.py index 2bf068b..876e928 100644 --- a/commands/configure.py +++ b/commands/configure.py @@ -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 diff --git a/commands/generate.py b/commands/generate.py index b34b0b6..e7e05b4 100644 --- a/commands/generate.py +++ b/commands/generate.py @@ -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 diff --git a/commands/make.py b/commands/make.py index b3e6aaf..39f562a 100644 --- a/commands/make.py +++ b/commands/make.py @@ -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 diff --git a/commands/makeinstall.py b/commands/makeinstall.py index 8a2a07a..b01ee62 100644 --- a/commands/makeinstall.py +++ b/commands/makeinstall.py @@ -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 diff --git a/commands/script.py b/commands/script.py index 7345977..0ca1434 100644 --- a/commands/script.py +++ b/commands/script.py @@ -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") diff --git a/src/compilation.py b/src/compilation.py index e0ec8d6..210eb52 100644 --- a/src/compilation.py +++ b/src/compilation.py @@ -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) diff --git a/src/product.py b/src/product.py index a1bf7e6..7d354c4 100644 --- a/src/product.py +++ b/src/product.py @@ -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): -- 2.39.2