コード例 #1
0
    def create(cls, bootstrap_options):
        """
        :param Options bootstrap_options: The bootstrap options bag.
        """
        binary_tool_fetcher = BinaryToolFetcher(
            bootstrap_dir=bootstrap_options.pants_bootstrapdir,
            timeout_secs=bootstrap_options.binaries_fetch_timeout_secs,
        )
        binary_util = BinaryUtil(
            baseurls=bootstrap_options.binaries_baseurls,
            binary_tool_fetcher=binary_tool_fetcher,
            path_by_id=bootstrap_options.binaries_path_by_id,
            allow_external_binary_tool_downloads=bootstrap_options.
            allow_external_binary_tool_downloads,
        )

        return WatchmanLauncher(
            binary_util,
            bootstrap_options.level,
            bootstrap_options.watchman_version,
            bootstrap_options.watchman_supportdir,
            bootstrap_options.watchman_startup_timeout,
            bootstrap_options.watchman_socket_timeout,
            bootstrap_options.watchman_socket_path,
            bootstrap_options.pants_subprocessdir,
        )
コード例 #2
0
ファイル: test_binary_util.py プロジェクト: jaipradeesh/pants
 def _gen_binary_tool_fetcher(cls, bootstrap_dir='/tmp', timeout_secs=30, fetcher=None,
                              ignore_cached_download=True):
   return BinaryToolFetcher(
     bootstrap_dir=bootstrap_dir,
     timeout_secs=timeout_secs,
     fetcher=fetcher,
     ignore_cached_download=ignore_cached_download)