MCPcopy Create free account
hub / github.com/pytorch/executorch / dst_path

Method dst_path

setup.py:347–362  ·  view source on GitHub ↗

Returns the path to the destination file. Args: installer: The InstallerBuildExt instance that is installing the file.

(self, installer: "InstallerBuildExt")

Source from the content-addressed store, hash-verified

345 )
346
347 def dst_path(self, installer: "InstallerBuildExt") -> Path:
348 """Returns the path to the destination file.
349
350 Args:
351 installer: The InstallerBuildExt instance that is installing the
352 file.
353 """
354 dst_root = Path(installer.build_lib).resolve()
355
356 if self.dst.endswith("/"):
357 # Destination looks like a directory. Use the basename of the source
358 # file for its final component.
359 return dst_root / Path(self.dst) / self.src_path(installer).name
360 else:
361 # Destination looks like a file.
362 return dst_root / Path(self.dst)
363
364 def inplace_dir(self, installer: "InstallerBuildExt") -> Path:
365 """For a `BuiltFile`, we use self.dst as its inplace directory path.

Callers 2

build_extensionMethod · 0.45

Calls 1

src_pathMethod · 0.45

Tested by

no test coverage detected