def SetDestination(self, path):

    path_tree_match = self.path_tree_re.search(path)
    if path_tree_match:
      # Everything else needs to be relative to an Xcode variable.
      path_tree = path_tree_match.group(1)
      relative_path = path_tree_match.group(3)

      if path_tree in self.path_tree_to_subfolder:
        subfolder = self.path_tree_to_subfolder[path_tree]
        if relative_path is None:
          relative_path = ''
      else:
        # The path starts with an unrecognized Xcode variable
        # name like $(SRCROOT).  Xcode will still handle this
        # as an "absolute path" that starts with the variable.
        subfolder = 0
        relative_path = path
    elif path.startswith('/'):
      # Special case.  Absolute paths are in dstSubfolderSpec 0.
      subfolder = 0
      relative_path = path[1:]
    else:
      raise ValueError('Can\'t use path %s in a %s' % \
                       (path, self.__class__.__name__))

    self._properties['dstPath'] = relative_path
    self._properties['dstSubfolderSpec'] = subfolder
Set the dstSubfolderSpec and dstPath properties from path.
dataset/ETHPy150Open adblockplus/gyp/pylib/gyp/xcodeproj_file.py/PBXCopyFilesBuildPhase.SetDestination