Example #1
0
 def __init__(self, output, loader, client_cache, registry, remote_manager,
              action_recorder, workspace):
     self._proxy = ConanProxy(client_cache,
                              output,
                              remote_manager,
                              recorder=action_recorder,
                              registry=registry)
     self._output = output
     self._loader = loader
     self._resolver = RangeResolver(output, client_cache, self._proxy)
     self._client_cache = client_cache
     self._registry = registry
     self._remote_manager = remote_manager
     self._workspace = workspace
Example #2
0
 def _get_app(self):
     self.remote_manager = MockRemoteManager()
     cache = self.cache
     self.resolver = RangeResolver(self.cache, self.remote_manager)
     proxy = ConanProxy(cache, self.output, self.remote_manager)
     self.loader = ConanFileLoader(None, self.output, ConanPythonRequire(None, None))
     binaries = GraphBinariesAnalyzer(cache, self.output, self.remote_manager)
     self.manager = GraphManager(self.output, cache, self.remote_manager, self.loader, proxy,
                                 self.resolver, binaries)
     hook_manager = Mock()
     app_type = namedtuple("ConanApp", "cache out remote_manager hook_manager graph_manager"
                           " binaries_analyzer")
     app = app_type(self.cache, self.output, self.remote_manager, hook_manager, self.manager,
                    binaries)
     return app
 def setUp(self):
     self.output = TestBufferConanOutput()
     cache_folder = temp_folder()
     cache = ClientCache(cache_folder, self.output)
     self.cache = cache
     self.remote_manager = MockRemoteManager()
     self.resolver = RangeResolver(cache, self.remote_manager)
     proxy = ConanProxy(cache, self.output, self.remote_manager)
     self.loader = ConanFileLoader(None, self.output, ConanPythonRequire(None, None))
     self.manager = GraphManager(self.output, cache, self.remote_manager, self.loader, proxy,
                                 self.resolver)
     hook_manager = Mock()
     recorder = Mock()
     self.binary_installer = BinaryInstaller(cache, self.output, self.remote_manager, recorder,
                                             hook_manager)
Example #4
0
    def __init__(self, client_cache, user_io, runner, remote_manager, interactive=True):
        assert isinstance(user_io, UserIO)
        assert isinstance(client_cache, ClientCache)
        self._client_cache = client_cache
        self._user_io = user_io
        self._runner = runner
        self._remote_manager = remote_manager
        self._registry = RemoteRegistry(self._client_cache.registry, self._user_io.out)
        if not interactive:
            self._user_io.disable_input()

        self._proxy = ConanProxy(client_cache, self._user_io.out, remote_manager, registry=self._registry)
        resolver = RangeResolver(self._user_io.out, client_cache, self._proxy)
        python_requires = ConanPythonRequire(self._proxy, resolver)
        self._loader = ConanFileLoader(self._runner, self._user_io.out, python_requires)
        self._graph_manager = GraphManager(self._user_io.out, self._client_cache, self._registry,
                                           self._remote_manager, self._loader, self._proxy, resolver)
 def _get_app(self):
     self.remote_manager = MockRemoteManager()
     cache = self.cache
     self.resolver = RangeResolver(self.cache, self.remote_manager)
     proxy = ConanProxy(cache, self.output, self.remote_manager)
     pyreq_loader = PyRequireLoader(proxy, self.resolver)
     pyreq_loader.enable_remotes(remotes=Remotes())
     self.loader = ConanFileLoader(None, self.output, ConanPythonRequire(None, None),
                                   pyreq_loader=pyreq_loader)
     binaries = GraphBinariesAnalyzer(cache, self.output, self.remote_manager)
     self.manager = GraphManager(self.output, cache, self.remote_manager, self.loader, proxy,
                                 self.resolver, binaries)
     generator_manager = GeneratorManager()
     hook_manager = Mock()
     app_type = namedtuple("ConanApp", "cache out remote_manager hook_manager graph_manager"
                           " binaries_analyzer generator_manager")
     app = app_type(self.cache, self.output, self.remote_manager, hook_manager, self.manager,
                    binaries, generator_manager)
     return app
Example #6
0
    def setUp(self):
        self.output = TestBufferConanOutput()
        self.loader = ConanFileLoader(None, Settings.loads(""), Profile())
        self.retriever = Retriever(self.loader, self.output)
        self.remote_search = MockSearchRemote()
        paths = SimplePaths(self.retriever.folder)
        self.resolver = RangeResolver(self.output, paths, self.remote_search)
        self.builder = DepsGraphBuilder(self.retriever, self.output, self.loader, self.resolver)

        for v in ["0.1", "0.2", "0.3", "1.1", "1.1.2", "1.2.1", "2.1", "2.2.1"]:
            say_content = """
from conans import ConanFile

class SayConan(ConanFile):
    name = "Say"
    version = "%s"
""" % v
            say_ref = ConanFileReference.loads("Say/%s@memsharded/testing" % v)
            self.retriever.conan(say_ref, say_content)
Example #7
0
 def _get_graph_builder(self, loader, remote_proxy):
     resolver = RangeResolver(self._user_io.out, self._client_cache, remote_proxy)
     graph_builder = DepsGraphBuilder(remote_proxy, self._user_io.out, loader, resolver)
     return graph_builder