diff options
author | Martin Fischer <martin@push-f.com> | 2022-02-08 01:16:15 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-02-08 01:16:15 +0100 |
commit | 0d57be7ea30129000db5494e1a65b79c7618eed0 (patch) | |
tree | 345a178fd6830de2f219e798cce4a39bed70be43 | |
parent | 89995cd7be91dfedf03f35a03bfe377723575bca (diff) |
support single-file packages
-rwxr-xr-x | pydoc.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -48,6 +48,10 @@ def find_packages(path: Path, package_name: str) -> List[Path]: if (path / 'src' / package_name / '__init__.py').exists(): return [path / 'src' / package_name] + if (path / (package_name + '.py')).exists(): + # single-file package (e.g. Bottle) + return [path / (package_name + '.py')] + packages = [] for subpath in path.iterdir(): |