parameters: (self, tarinfo, targetpath)
docstring: Make a (symbolic) link called targetpath. If it cannot be created
            (platform limitation), we try to make a copy of the referenced file
            instead of a link.
docstring_summary: Make a (symbolic) link called targetpath. If it cannot be created
            (platform limitation), we try to make a copy of the referenced file
            instead of a link.
docstring_tokens: Make a ( symbolic ) link called targetpath . If it cannot be created ( platform limitation ) we try to make a copy of the referenced file instead of a link .
function: def makelink(self, tarinfo, targetpath):
          """Make a (symbolic) link called targetpath. If it cannot be created
            (platform limitation), we try to make a copy of the referenced file
            instead of a link.
          """
          try:
              # For systems that support symbolic and hard links.
              if tarinfo.issym():
                  os.symlink(tarinfo.linkname, targetpath)
              else:
                  # See extract().
                  if os.path.exists(tarinfo._link_target):
                      os.link(tarinfo._link_target, targetpath)
                  else:
                      self._extract_member(self._find_link_target(tarinfo),
                                           targetpath)
          except symlink_exception:
              if tarinfo.issym():
                  linkpath = os.path.join(os.path.dirname(tarinfo.name),
                                          tarinfo.linkname)
              else:
                  linkpath = tarinfo.linkname
          else:
              try:
                  self._extract_member(self._find_link_target(tarinfo),
                                       targetpath)
              except KeyError:
                  raise ExtractError("unable to resolve link inside archive")
function_tokens: def makelink ( self , tarinfo , targetpath ) : try : # For systems that support symbolic and hard links. if tarinfo . issym ( ) : os . symlink ( tarinfo . linkname , targetpath ) else : # See extract(). if os . path . exists ( tarinfo . _link_target ) : os . link ( tarinfo . _link_target , targetpath ) else : self . _extract_member ( self . _find_link_target ( tarinfo ) , targetpath ) except symlink_exception : if tarinfo . issym ( ) : linkpath = os . path . join ( os . path . dirname ( tarinfo . name ) , tarinfo . linkname ) else : linkpath = tarinfo . linkname else : try : self . _extract_member ( self . _find_link_target ( tarinfo ) , targetpath ) except KeyError : raise ExtractError ( "unable to resolve link inside archive" )