diff options
author | Martin Fischer <martin@push-f.com> | 2022-02-08 08:03:34 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-02-08 08:03:34 +0100 |
commit | cbf1314871d490e8213fd283fb72fa6fa3d2f115 (patch) | |
tree | 9069290ac841e8abbff47506564fcc5082d23526 | |
parent | 719830b9e18aa7c87061e0a1ba94b1e1c8ff0aeb (diff) |
skip inventory_url if it doesn't contain py:module
-rw-r--r-- | packages.toml | 1 | ||||
-rwxr-xr-x | pydoc.py | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/packages.toml b/packages.toml index 7b71f4b..f920c45 100644 --- a/packages.toml +++ b/packages.toml @@ -2,6 +2,7 @@ sphinx_inventory_url = "https://babel.pocoo.org/en/stable/objects.inv" [beautifulsoup4] +sphinx_inventory_url = "https://www.crummy.com/software/BeautifulSoup/bs4/doc/objects.inv" [bottle] @@ -238,8 +238,12 @@ if __name__ == '__main__': with inventory_path.open('wb') as f: f.write(inventory_bytes) - system = SphinxAwareSystem(inventory) - system.options.docformat = docformat + if 'py:module' in inventory: + system = SphinxAwareSystem(inventory) + system.options.docformat = docformat + else: + print(f"[warning] sphinx inventory for {package_name} does not contain py:module, we're ignoring the inventory") + pydoctor.driver.main( # fmt: off |