def build(self):

    # Cache our starting working directory since we're going to move around
    originalWorkingDir = os.getcwd()

    # Check requirements (attempt to access 3rd party dependencies/tools)
    print("Checking dependencies...", end="", file=sys.stdout)
    sys.stdout.flush()
    if self.checkDependencies():
      print("done.", file=sys.stdout)
    else:
      return False  # error message displayed in subroutine

    # Make sure submodules are intialized & up-to-date
    print("Initializing component data...", end="", file=sys.stdout)
    sys.stdout.flush()
    if self.gitSubmoduleUpdate():
      print("done.", file=sys.stdout)
    else:
      self.error.gitSubmoduleUpdateFailed(dest=sys.stdout)
      return False

    # Before building the tools, check if the user has requested that not all tools
    # are built. To do this, the --skip-tools parameter must be set with a file. Alternatively,
    # the user could have requested that only are subset are built using the --compile-tools
    # argument.
    self.skipTools()
    self.compileTools()

    # Build all tools
    print("Building tools: ", file=sys.stdout)
    for tool in conf.tools:
      print('  ' + tool.name + '...', end = '', file=sys.stdout)
      sys.stdout.flush()
      if self.buildTool(tool):
        print('done.', file=sys.stdout)
        self.builtTools[tool.name] = True
        self.userSettings['compiled tools'].append(tool.name)
      else:
        self.error.toolBuildFailed(tool.name, dest=sys.stdout)
        self.builtTools[tool.name] = False
        self.allBuilt         = False
        #return False

    # Fetch all default resources (current releases only)
    print("Fetching default resources:", file=sys.stdout)
    for resource in conf.resources:
      if resource.isDefault:
        print('  ' + resource.name + ':', file=sys.stdout)
        sys.stdout.flush()
        if not self.addCurrentRelease(resource.name, '    '):
          self.error.resourceFetchFailed(resource.name, dest=sys.stdout)
          return False

    # If we get here - clean up, mark built status, and return success
    os.chdir(originalWorkingDir)
    self.userSettings["isBuilt"] = True
    return True

  # Check if the user has requested that not all tools be built.
dataset/ETHPy150Open gkno/gkno_launcher/src/gkno/adminUtils.py/adminUtils.build/original