Given a path to a file in this distribution, return a SimplePath to it. This method is used by callers of ``Distribution.files()`` to locate files within the distribution. If it's possible for a Distribution to represent files in the distribution as
(self, path: str | os.PathLike[str])
| 432 | |
| 433 | @abc.abstractmethod |
| 434 | def locate_file(self, path: str | os.PathLike[str]) -> SimplePath: |
| 435 | """ |
| 436 | Given a path to a file in this distribution, return a SimplePath |
| 437 | to it. |
| 438 | |
| 439 | This method is used by callers of ``Distribution.files()`` to |
| 440 | locate files within the distribution. If it's possible for a |
| 441 | Distribution to represent files in the distribution as |
| 442 | ``SimplePath`` objects, it should implement this method |
| 443 | to resolve such objects. |
| 444 | |
| 445 | Some Distribution providers may elect not to resolve SimplePath |
| 446 | objects within the distribution by raising a |
| 447 | NotImplementedError, but consumers of such a Distribution would |
| 448 | be unable to invoke ``Distribution.files()``. |
| 449 | """ |
| 450 | |
| 451 | @classmethod |
| 452 | def from_name(cls, name: str) -> Distribution: |
no outgoing calls