summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2022-02-08 09:22:22 +0100
committerMartin Fischer <martin@push-f.com>2022-02-08 09:22:22 +0100
commit71811124202de6732f9b45caef59203bb7b23374 (patch)
tree683ec0a3054a5857d123866c8ece389e4211acfb
parent2eb5585255e9efa8908ca17c9b588a65e3bb925e (diff)
add more sphinx_inventory_urls
-rw-r--r--packages.toml10
-rwxr-xr-xpydoc.py8
2 files changed, 14 insertions, 4 deletions
diff --git a/packages.toml b/packages.toml
index 515ee04..10def60 100644
--- a/packages.toml
+++ b/packages.toml
@@ -34,22 +34,30 @@ sphinx_inventory_url = "https://docs.makotemplates.org/en/latest/objects.inv"
[mistletoe]
[numpy]
+sphinx_inventory_url = "https://numpy.org/doc/stable/objects.inv"
[pydoctor]
docformat = "epytext"
[pygments]
+sphinx_inventory_url = "https://pygments.org/objects.inv"
+# TODO: this is the inventory for the master branch, stable would be better
[requests]
+sphinx_inventory_url = "https://docs.python-requests.org/en/stable/objects.inv"
[scrapy]
+sphinx_inventory_url = "https://docs.scrapy.org/en/latest/objects.inv"
-[setuptools]
+# [setuptools]
+# sphinx_inventory_url = "https://setuptools.pypa.io/en/stable/objects.inv"
+# TODO: disabled because setuptools inventory uses distutils to refer to its API?
[sphinx]
sphinx_inventory_url = "https://www.sphinx-doc.org/objects.inv"
# TODO: this is the inventory for the master branch, stable would be better
[sqlalchemy]
+sphinx_inventory_url = "https://docs.sqlalchemy.org/en/14/objects.inv"
[werkzeug]
diff --git a/pydoc.py b/pydoc.py
index cf297d2..5ebdf44 100755
--- a/pydoc.py
+++ b/pydoc.py
@@ -245,9 +245,11 @@ if __name__ == '__main__':
inventories = Path('inventories')
inventories.mkdir(exist_ok=True)
- for path in sources.iterdir():
- sourceid = path.name
- package_name, version = sourceid.rsplit('-', maxsplit=1)
+ for package_name in packages:
+ version = versions[package_name]
+ sourceid = f'{package_name}-{version}'
+ if not (sources / sourceid).exists():
+ continue
package_paths = list(find_packages(sources / sourceid, package_name))