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

Method for_file

pex/resolver.py:639–653  ·  view source on GitHub ↗
(
        cls,
        target,  # type: Union[DownloadTarget, Target]
        source_path,  # type: str
        subdirectory=None,  # type: Optional[str]
    )

Source from the content-addressed store, hash-verified

637class BuildRequest(object):
638 @classmethod
639 def for_file(
640 cls,
641 target, # type: Union[DownloadTarget, Target]
642 source_path, # type: str
643 subdirectory=None, # type: Optional[str]
644 ):
645 # type: (...) -> BuildRequest
646 fingerprint = _fingerprint_file(source_path)
647 return cls(
648 download_target=_as_download_target(target),
649 source_path=source_path,
650 fingerprint=fingerprint,
651 subdirectory=subdirectory,
652 editable=False,
653 )
654
655 @classmethod
656 def for_directory(

Callers 5

build_requestsMethod · 0.80
runMethod · 0.80
resolve_from_distsFunction · 0.80
lockMethod · 0.80

Calls 2

_fingerprint_fileFunction · 0.85
_as_download_targetFunction · 0.85

Tested by

no test coverage detected