def ParseDependency(dep):
  """
  Given a dependency like '/path/to/foo.gyp:somedep#target', returns a tuple
  ('/path/to/foo.gyp', 'somedep').
  """
  path = dep[:dep.find(':')]
  name = dep[dep.find(':')+1:dep.find('#')]
  return (path, name)