For a `BuiltFile`, we use self.dst as its inplace directory path. Need to handle directory vs file.
(self, installer: "InstallerBuildExt")
| 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. |
| 366 | Need to handle directory vs file. |
| 367 | """ |
| 368 | # HACK: get rid of the leading "executorch" in ext.dst. |
| 369 | # This is because we don't have a root level "executorch" module. |
| 370 | package_dir = self.dst.removeprefix("executorch/") |
| 371 | # If dst is a file, use it's directory |
| 372 | if not package_dir.endswith("/"): |
| 373 | package_dir = os.path.dirname(package_dir) |
| 374 | return Path(package_dir) |
| 375 | |
| 376 | |
| 377 | class BuiltExtension(_BaseExtension): |
no outgoing calls
no test coverage detected