MCPcopy
hub / github.com/pex-tool/pex / symlink

Method symlink

pex/common.py:777–790  ·  view source on GitHub ↗
(
        self,
        src,  # type: str
        dst,  # type: str
        label=None,  # type: Optional[str]
        compress=True,  # type: bool
    )

Source from the content-addressed store, hash-verified

775 # TODO: Ensure the target and dest are the same if the file already exists.
776
777 def symlink(
778 self,
779 src, # type: str
780 dst, # type: str
781 label=None, # type: Optional[str]
782 compress=True, # type: bool
783 ):
784 # type: (...) -> None
785 dst = self._normalize(dst)
786 self._tag(dst, label, compress)
787 self._ensure_parent(dst)
788 abs_src = os.path.realpath(src)
789 abs_dst = os.path.realpath(os.path.join(self.chroot, dst))
790 safe_relative_symlink(abs_src, abs_dst)
791
792 def write(
793 self,

Callers 5

test_chroot_zip_symlinkFunction · 0.95
_copy_or_linkMethod · 0.80
install_pyenv_versionsFunction · 0.80
install_pythonsFunction · 0.80

Calls 5

_normalizeMethod · 0.95
_tagMethod · 0.95
_ensure_parentMethod · 0.95
safe_relative_symlinkFunction · 0.85
joinMethod · 0.45

Tested by 2

test_chroot_zip_symlinkFunction · 0.76