return "%s(\n%s\n)" % (self.__class__.__name__, PP.pformat(res))
def __set_sorted_products_list(self):
- from compile import get_dependencies_graph, depth_first_topo_graph
all_products_infos = src.product.get_products_infos(
self.cfg.APPLICATION.products,
self.cfg)
+ from compile import get_dependencies_graph,depth_first_topo_graph
all_products_graph=get_dependencies_graph(all_products_infos, self.forBuild)
visited_nodes=[]
sorted_nodes=[]
visited_nodes,
sorted_nodes)
self.sorted_product_list=sorted_nodes
+ self.all_products_graph=all_products_graph
def append(self, key, value, sep=os.pathsep):
logger.write("licence file found for product %s : %s\n" % (pi.name, licence_file_name), 5)
self.set("LICENCE_FILE", licence_file_name)
+ # these infos may be needed for the environment of some products
+ if "debug" in pi and pi.debug == "yes":
+ self.set("SAT_DEBUG", "1")
+ if "verbose" in pi and pi.verbose == "yes":
+ self.set("SAT_VERBOSE", "1")
+
if src.product.product_is_cpp(pi):
# set a specific environment for cpp modules
self.set_salome_minimal_product_env(pi, logger)
def set_full_environ(self, logger, env_info):
"""\
- Sets the full environment for products
+ Sets the full environment for products, with their dependencies
specified in env_info dictionary.
:param logger Logger: The logger instance to display messages
# use the sorted list of all products to sort the list of products
# we have to set
+ visited=[]
+ from compile import depth_search_graph # to get the dependencies
+ for p_name in env_info:
+ visited=depth_search_graph(self.all_products_graph, p_name, visited)
sorted_product_list=[]
for n in self.sorted_product_list:
- if n in env_info:
+ if n in visited:
sorted_product_list.append(n)
if "Python" in sorted_product_list:
:return: The path to the generated file
:rtype: str
"""
+ additional_env["sat_dist"]=self.config.VARS.dist
if not self.silent:
self.logger.write(_("Create environment file %s\n") %
src.printcolors.printcLabel(filename), 3)