From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sun, 24 Aug 2025 11:20:33 +0000
Subject: Use sphinxcontrib.apidoc

Forwarded: not-needed
---
 docs/source/conf.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/docs/source/conf.py b/docs/source/conf.py
index 9450bd5..74c3008 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -25,13 +25,14 @@ sys.path.append(os.path.abspath(os.path.dirname(__file__)))
 # -- General configuration -----------------------------------------------
 
 # sphinxcontrib.apidoc was added to sphinx in 8.2.0 as sphinx.etx.apidoc
-needs_sphinx = "8.2.0"
+# needs_sphinx = "8.2.0"
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = [
     'sphinx.ext.doctest', 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.intersphinx',
-    'sphinx.ext.apidoc', 'sphinx_reredirects', 'doi_role', "sphinx_autodoc_typehints",
+    # 'sphinx.ext.apidoc', 'sphinx_reredirects', 'doi_role', "sphinx_autodoc_typehints",
+    'sphinxcontrib.apidoc', 'sphinx_reredirects', 'doi_role', "sphinx_autodoc_typehints",
 ]
 
 # DocTest Settings
@@ -72,6 +73,12 @@ apidoc_modules = [
 ]
 apidoc_separate_modules = True
 apidoc_include_private = True
+apidoc_module_dir = "../../pyresample"
+apidoc_output_dir = 'api/'
+apidoc_excluded_paths = [
+    "test/test_*.py",
+    "test/**/test_*.py",
+]
 
 autodoc_mock_imports = ["hashlib._Hash"]
 autodoc_type_aliases = {
