refactor installer project
@@ -311,18 +311,8 @@ class ConanInstaller(object):
return [(PackageReference(node.conan_ref, package_id), node.conanfile)
for node, package_id, build in nodes if build]
- def _build(self, nodes_to_process, deps_graph, skip_nodes, profile_build_requires, keep_build,
- root_node, update):
- """ The build assumes an input of conans ordered by degree, first level
- should be independent from each other, the next-second level should have
- dependencies only to first level conans.
- param nodes_by_level: list of lists [[nodeA, nodeB], [nodeC], [nodeD, ...], ...]
- """
- inverse_levels = deps_graph.inverse_levels()
- for level in inverse_levels:
- level[:] = [n for n in level if n not in skip_nodes]
-
- for node, package_id, build_needed in nodes_to_process:
+ def _handle_node_cache(self, node, package_id, build_needed, keep_build, profile_build_requires,
+ inverse_levels, deps_graph, update):
conan_ref, conan_file = node.conan_ref, node.conanfile
output = ScopedOutput(str(conan_ref), self._out)
package_ref = PackageReference(conan_ref, package_id)
@@ -342,6 +332,21 @@ class ConanInstaller(object):
self._call_package_info(conan_file, package_folder)
clean_dirty(package_folder)
+ def _build(self, nodes_to_process, deps_graph, skip_nodes, profile_build_requires, keep_build,
+ root_node, update):
+ """ The build assumes an input of conans ordered by degree, first level
+ should be independent from each other, the next-second level should have
+ dependencies only to first level conans.
+ param nodes_by_level: list of lists [[nodeA, nodeB], [nodeC], [nodeD, ...], ...]
+ """
+ inverse_levels = deps_graph.inverse_levels()
+ for level in inverse_levels:
+ level[:] = [n for n in level if n not in skip_nodes]
+
+ for node, package_id, build_needed in nodes_to_process:
+ self._handle_node_cache(node, package_id, build_needed, keep_build, profile_build_requires,
+ inverse_levels, deps_graph, update)
+
# Finally, propagate information to root node (conan_ref=None)
self._propagate_info(root_node, inverse_levels, deps_graph)
