From b290bea918ae017dde95805abe898e5e6bd08f69 Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 24 Jun 2020 15:53:34 +0200 Subject: [PATCH] =?utf8?q?pour=20l'environnement=20g=C3=A8re=20les=20produ?= =?utf8?q?its=20runtime=5Fet=5Fcompiletime=20comme=20compile-time?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- commands/compile.py | 16 +++++----------- src/environment.py | 11 ++++++++++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/commands/compile.py b/commands/compile.py index 87e5359..4d3a35c 100644 --- a/commands/compile.py +++ b/commands/compile.py @@ -736,22 +736,16 @@ def run(args, runner, logger): sorted_product_list=[] product_list_runtime=[] product_list_compiletime=[] - product_list_compile_and_runtime=[] # store at beginning compile time products, we need to compile them before! for n in sorted_nodes: if n in products_list: - if src.product.product_is_compile_and_runtime(all_products_dict[n][1]): - # these products (python/graphviz) are used at compile and run time - # they have no dependencies. - # we always compile them in the first place - product_list_compile_and_runtime.append(n) + if src.product.product_is_compile_time(all_products_dict[n][1]) or\ + src.product.product_is_compile_and_runtime(all_products_dict[n][1]): + product_list_compiletime.append(n) else: - if src.product.product_is_compile_time(all_products_dict[n][1]): - product_list_compiletime.append(n) - else: - product_list_runtime.append(n) - sorted_product_list = product_list_compile_and_runtime + product_list_compiletime + product_list_runtime + product_list_runtime.append(n) + sorted_product_list = product_list_compiletime + product_list_runtime logger.write("Sorted list of products to compile : %s\n" % sorted_product_list, 5) # from the sorted list of products to compile, build a sorted list of products infos diff --git a/src/environment.py b/src/environment.py index d76466b..6294338 100644 --- a/src/environment.py +++ b/src/environment.py @@ -250,7 +250,8 @@ class SalomeEnviron: # they should be added in build env compile_time_products=[] for (pname,pinfo) in all_products_infos: - if src.product.product_is_compile_time(pinfo): + if src.product.product_is_compile_time(pinfo) or\ + src.product.product_is_compile_and_runtime(pinfo) : compile_time_products.append(pname) self.compile_time_products=compile_time_products @@ -765,12 +766,16 @@ class SalomeEnviron: # for a build environment, add compile time products (like cmake) if self.forBuild : for product in self.compile_time_products: + if product == "Python": + continue self.set_a_product(product, logger) # The loop on the products for product in self.sorted_product_list: if product == "Python": continue + if self.forBuild and product in self.compile_time_products: + continue self.set_a_product(product, logger) def set_full_environ(self, logger, env_info): @@ -800,12 +805,16 @@ class SalomeEnviron: # for a build environment, add compile time products (like cmake) if self.forBuild : for product in self.compile_time_products: + if product == "Python": + continue self.set_a_product(product, logger) # set products for product in sorted_product_list: if product == "Python": continue + if self.forBuild and product in self.compile_time_products: + continue self.set_a_product(product, logger) class FileEnvWriter: -- 2.39.2