コード例 #1
0
 def _resolve_plugin_locations(self):
   # We jump through some hoops here to avoid a live resolve if possible for purposes of speed.
   # Even with a local resolve cache fully up to date, running a resolve to activate a plugin
   # takes ~250ms whereas loading from a pre-cached list takes ~50ms.
   if all(requirement_is_exact(Requirement.parse(req)) for req in self._plugin_requirements):
     return self._resolve_exact_plugin_locations()
   else:
     return (plugin.location for plugin in self._resolve_plugins())
コード例 #2
0
ファイル: plugin_resolver.py プロジェクト: benjyw/pants
 def _resolve_plugin_locations(self):
   # We jump through some hoops here to avoid a live resolve if possible for purposes of speed.
   # Even with a local resolve cache fully up to date, running a resolve to activate a plugin
   # takes ~250ms whereas loading from a pre-cached list takes ~50ms.
   if all(requirement_is_exact(Requirement.parse(req)) for req in self._plugin_requirements):
     return self._resolve_exact_plugin_locations()
   else:
     return (plugin.location for plugin in self._resolve_plugins())
コード例 #3
0
 def exact(self):
     return requirement_is_exact(self.requirement)