[med-svn] [Git][med-team/python-mne][master] 4 commits: Use relative paths for generated documentation redirects

Karsten Schöke (@karso) gitlab at salsa.debian.org
Sun Sep 20 17:20:57 BST 2026



Karsten Schöke pushed to branch master at Debian Med / python-mne


Commits:
562ce252 by Karsten Schöke at 2026-09-17T18:17:50+02:00
Use relative paths for generated documentation redirects

- - - - -
595a5309 by Karsten Schöke at 2026-09-20T16:16:28+02:00
add doc package

- - - - -
b3192c94 by Karsten Schöke at 2026-09-20T16:16:47+02:00
d/rules: Skip test_qt_block_sigint to prevent pbuilder timeouts

The test hangs for 60 seconds in isolated Debian build environments
because the Qt subprocess fails to handle signals/displays properly.
Combined the exclusion with the existing pytest -k filter.

- - - - -
3f74a394 by Karsten Schöke at 2026-09-20T16:18:06+02:00
Update changelog for 1.13.2-2 release

- - - - -


24 changed files:

- debian/changelog
- debian/control
- debian/patches/0001-allow-missing-metadata-in-sys_info.patch
- debian/patches/0002-fix-python-interpreter-issue.patch
- debian/patches/0003-skip-quaternion-test-without-pyvistaqt.patch
- + debian/patches/0004-use-local-intersphinx_mapping-files.patch
- + debian/patches/0005-Skip-PyVistaQt-during-documentation-builds.patch
- + debian/patches/0006-Use-an-absolute-path-for-the-default-thumbnail.patch
- + debian/patches/0007-Read-the-minimum-Python-version-from-pyproject.toml.patch
- + debian/patches/0008-Skip-the-MNE-Qt-browser-scraper.patch
- + debian/patches/0009-Disable-Sphinx-Gallery-example-execution-for-offline.patch
- + debian/patches/0010-Use-relative-paths-for-generated-documentation-redir.patch
- + debian/patches/0011-Disable-Google-Analytics-in-the-Debian-documentation.patch
- + debian/patches/0012-Disable-embedded-YouTube-videos-in-the-Debian-docume.patch
- + debian/patches/0013-Use-local-MathJax-installation-for-doc.patch
- + debian/patches/0014-Disable-nitpicky-Sphinx-mode-for-the-Debian-document.patch
- + debian/patches/0015-Resolve-the-NumPy-glossary-term.patch
- debian/patches/series
- + debian/python-mne-doc.docs-base
- + debian/python-mne-doc.lintian-overrides
- debian/docs → debian/python3-mne.docs
- debian/links → debian/python3-mne.links
- debian/manpages → debian/python3-mne.manpages
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+python-mne (1.13.2-2) unstable; urgency=medium
+
+  * Team upload.
+  * add doc package (Closes: #733270)
+  * d/rules: Skip test_qt_block_sigint during build to prevent
+    60-second timeouts in isolated chroot environments.
+
+ -- Karsten Schöke <karsten.schoeke at geobasis-bb.de>  Sun, 20 Sep 2026 16:17:41 +0200
+
 python-mne (1.13.2-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -10,45 +10,68 @@ Testsuite: autopkgtest-pkg-python
 Build-Depends:
  debhelper-compat (= 14),
  dh-sequence-python3,
+ dh-sequence-sphinxdoc <!nodoc>,
  pybuild-plugin-pyproject,
  libgl1-mesa-dri,
  libjs-jquery,
  libjs-jquery-ui,
+ node-mathjax-full <!nodoc>,
+ numba-doc <!nodoc>,
  python3-vtk9,
  python3-all,
  python3-coverage,
  python3-dipy <!nocheck>,
+ python-dipy-doc <!nodoc>,
+ python3-doc <!nodoc>,
  python3-filelock <!nocheck>,
  python3-h5py <!nocheck>,
  python3-hatchling,
  python3-hatch-vcs,
  python3-imageio-ffmpeg <!nocheck>,
  python3-joblib,
+ python-joblib-doc <!nodoc>,
  python3-lazy-loader,
  python3-matplotlib,
+ python-matplotlib-doc <!nodoc>,
  python3-nbformat <!nocheck>,
  python3-neo <!nocheck>,
  python3-nibabel,
  python3-nitime <!nocheck>,
+ python-nitime-doc <!nodoc>,
  python3-numpy,
- python3-numpydoc <!nocheck>,
- python3-pandas <!nocheck>,
+ python3-numpydoc <!nodoc>,
+ python3-pandas <!nocheck> <!nodoc>,
+ python-pandas-doc <!nodoc>,
  python3-patsy <!nocheck>,
+ python-patsy-doc <!nodoc>,
  python3-pooch <!nocheck>,
  python3-statsmodels <!nocheck>,
- python3-pyqt6 <!nocheck>,
+ python-statsmodels-doc <!nodoc>,
+ python3-pydata-sphinx-theme <!nodoc>,
+ python3-pyqt6 <!nocheck> <!nodoc>,
  python3-pytest,
  python3-pytestqt <!nocheck>,
  python3-pytest-cov <!nocheck>,
  python3-pytest-rerunfailures <!nocheck>,
  python3-pytest-timeout <!nocheck>,
- python3-pyvista <!nocheck>,
- python3-refleak <!nocheck>,
+ python3-pyvista <!nocheck> <!nodoc>,
+ python3-qtpy <!nodoc>,
+ python-pyqtgraph-doc <!nodoc>,
+ python3-refleak <!nocheck> <!nodoc>,
  python3-scipy,
+ python-scipy-doc <!nodoc>,
  python3-sklearn,
- python3-tqdm <!nocheck>,
+ python-sklearn-doc <!nodoc>,
+ python3-traitlets <!nodoc>,
+ python3-tqdm <!nocheck> <!nodoc>,
  python3-tk,
- python3-sphinx,
+ python3-sphinx <!nodoc>,
+ python3-sphinxcontrib.bibtex <!nodoc>,
+ python3-sphinxcontrib-towncrier <!nodoc>,
+ python3-sphinxcontrib-youtube <!nodoc>,
+ python3-sphinx-copybutton <!nodoc>,
+ python3-sphinx-design <!nodoc>,
+ python3-sphinx-gallery <!nodoc>,
  xauth,
  xvfb,
  yui-compressor,
@@ -75,6 +98,7 @@ Depends:
  ${misc:Depends},
  ${python3:Depends},
 Recommends:
+ python-mne-doc,
  python3-vtk9,
  python3-nibabel,
  python3-pytest,
@@ -93,3 +117,18 @@ Description: Python modules for MEG and EEG data analysis
  This package is designed for sensor- and source-space analysis of MEG
  and EEG data, including frequency-domain and time-frequency analyses
  and non-parametric statistics.
+
+Package: python-mne-doc
+Architecture: all
+Section: doc
+Depends:
+ ${misc:Depends},
+ ${sphinxdoc:Depends},
+Multi-Arch: foreign
+Description: Python modules for MEG and EEG data analysis (documentation)
+ This package is designed for sensor- and source-space analysis of MEG
+ and EEG data, including frequency-domain and time-frequency analyses
+ and non-parametric statistics.
+ .
+ This package contains the documentation.
+


=====================================
debian/patches/0001-allow-missing-metadata-in-sys_info.patch
=====================================
@@ -1,11 +1,10 @@
 From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
 Date: Thu, 23 Apr 2026 14:20:47 +0200
-Subject: allow missing metadata in sys_info
- The upstream test assumes that all installed Python packages provide
- version metadata accessible via importlib.metadata. This assumption
- does not hold in Debian environments, especially on non-amd64
- architectures (e.g., arm64), where packages may be built differently
- and lack dist-info metadata.
+Subject: allow missing metadata in sys_info The upstream test assumes that
+ all installed Python packages provide version metadata accessible via
+ importlib.metadata. This assumption does not hold in Debian environments,
+ especially on non-amd64 architectures (e.g., arm64),
+ where packages may be built differently and lack dist-info metadata.
 
  In such cases, MNE-Python correctly falls back to '?' for unknown
  versions. This is expected behavior and should not cause test failures.
@@ -16,10 +15,10 @@ Forwarded: not-needed
  1 file changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/mne/utils/tests/test_config.py b/mne/utils/tests/test_config.py
-index d203af0..e108f0f 100644
+index 81f4c46..6f2126d 100644
 --- a/mne/utils/tests/test_config.py
 +++ b/mne/utils/tests/test_config.py
-@@ -114,7 +114,15 @@ def test_sys_info_basic():
+@@ -117,7 +117,15 @@ def test_sys_info_basic():
      assert "numpy" in out
      # replace all in-line whitespace with single space
      out = "\n".join(" ".join(o.split()) for o in out.splitlines())


=====================================
debian/patches/0002-fix-python-interpreter-issue.patch
=====================================
@@ -1,8 +1,8 @@
 From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
 Date: Wed, 16 Sep 2026 07:27:15 +0200
 Subject: fix python interpreter issue
-Forwarded: not-needed
 
+Forwarded: not-needed
 ---
  mne/datasets/hf_sef/hf_sef.py | 2 --
  1 file changed, 2 deletions(-)


=====================================
debian/patches/0003-skip-quaternion-test-without-pyvistaqt.patch
=====================================
@@ -1,6 +1,7 @@
 From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
 Date: Wed, 16 Sep 2026 07:29:38 +0200
 Subject: skip-quaternion-test-without-pyvistaqt
+
 Forwarded: not-needed
 
 The test_quat_to_vtk_wxyz test only exercises the quaternion conversion
@@ -11,7 +12,6 @@ ModuleNotFoundError when running the test suite in Debian.
 
 Skip the test when pyvistaqt is unavailable, as is already done for
 other optional visualization dependencies.
-
 ---
  mne/viz/backends/tests/test_renderer.py | 1 +
  1 file changed, 1 insertion(+)


=====================================
debian/patches/0004-use-local-intersphinx_mapping-files.patch
=====================================
@@ -0,0 +1,64 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 12:38:17 +0200
+Subject: use local intersphinx_mapping files.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 36 +++++++++++++++---------------------
+ 1 file changed, 15 insertions(+), 21 deletions(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 93c4faf..24c6eea 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -20,7 +20,6 @@ from pathlib import Path
+ 
+ import matplotlib
+ import sphinx
+-from intersphinx_registry import get_intersphinx_mapping
+ from numpydoc import docscrape
+ from sphinx.config import is_serializable
+ from sphinx.domains.changeset import versionlabels
+@@ -179,27 +178,22 @@ towncrier_draft_working_directory = str(curpath.parent)
+ 
+ intersphinx_mapping = {
+     # More niche so didn't upstream to intersphinx_registry
+-    "nitime": ("https://nipy.org/nitime/", None),
+-    "mne_bids": ("https://mne.tools/mne-bids/stable", None),
+-    "mne-connectivity": ("https://mne.tools/mne-connectivity/stable", None),
+-    "mne-gui-addons": ("https://mne.tools/mne-gui-addons", None),
+-    "picard": ("https://mind-inria.github.io/picard/", None),
+-    "eeglabio": ("https://eeglabio.readthedocs.io/en/latest", None),
+-    "pybv": ("https://pybv.readthedocs.io/en/latest", None),
++    "python": ("https://docs.python.org/3",
++               "/usr/share/doc/python3-doc/html/objects.inv"),
++    "nitime": ("https://nipy.org/nitime/", 
++               "/usr/share/doc/python-nitime-doc/html/objects.inv"),
++    "matplotlib": ("/usr/share/doc/python-matplotlib-doc/html", "/usr/share/doc/python-matplotlib-doc/html/objects.inv"),
++    "numpy": ("/usr/share/doc/python-numpy/html", "/usr/share/doc/python-numpy/html/objects.inv"),
++    "pandas": ("/usr/share/doc/python-pandas-doc/html", "/usr/share/doc/python-pandas-doc/html/objects.inv"),
++    "scipy": ("/usr/share/doc/python-scipy-doc/html", "/usr/share/doc/python-scipy-doc/html/objects.inv"),
++    "statsmodels": ("/usr/share/doc/python-statsmodels-doc/html", "/usr/share/doc/python-statsmodels-doc/html/objects.inv"),
++    "sklearn": ("/usr/share/doc/python-sklearn-doc/html", "/usr/share/doc/python-sklearn-doc/html/objects.inv"),
++    "numba": ("/usr/share/doc/numba-doc/html", "/usr/share/doc/numba-doc/html/objects.inv"),
++    "joblib": ("/usr/share/doc/python-joblib-doc/html", "/usr/share/doc/python-joblib-doc/html/objects.inv"),
++    "patsy": ("/usr/share/doc/python-patsy-doc/html", "/usr/share/doc/python-patsy-doc/html/objects.inv"),
++    "dipy": ("/usr/share/doc/python-dipy-doc/html", "/usr/share/doc/python-dipy-doc/html/objects.inv"),
++    "pyqtgraph": ("/usr/share/doc/python-pyqtgraph-doc/html", "/usr/share/doc/python-pyqtgraph-doc/html/objects.inv"),
+ }
+-intersphinx_mapping.update(
+-    get_intersphinx_mapping(
+-        packages=set(
+-            """
+-imageio matplotlib numpy pandas python scipy statsmodels sklearn numba joblib nibabel
+-seaborn patsy pyvista dipy nilearn pyqtgraph
+-""".strip().split()
+-        ),
+-    )
+-)
+-# Broken as of 2026/06/08 (https://github.com/joblib/joblib/issues/1796)
+-intersphinx_mapping["joblib"] = ("https://joblib.readthedocs.io/en/stable", None)
+-
+ 
+ # NumPyDoc configuration -----------------------------------------------------
+ 


=====================================
debian/patches/0005-Skip-PyVistaQt-during-documentation-builds.patch
=====================================
@@ -0,0 +1,39 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 07:15:30 +0200
+Subject: Skip unavailable PyVistaQt backend during documentation builds
+
+The Debian archive does not currently provide the pyvistaqt Python
+module. MNE's Sphinx-Gallery reset hook unconditionally selects the
+PyVistaQt 3D backend, causing the documentation build to fail before
+individual examples are executed.
+.
+Only select the PyVistaQt backend when the optional module is available.
+This allows documentation examples that do not require the Qt-based
+3D backend to be processed without requiring an unavailable Debian
+dependency.
+
+Forwarded: not-needed
+---
+ doc/sphinxext/mne_doc_utils.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/doc/sphinxext/mne_doc_utils.py b/doc/sphinxext/mne_doc_utils.py
+index 3afc1e3..c15796d 100644
+--- a/doc/sphinxext/mne_doc_utils.py
++++ b/doc/sphinxext/mne_doc_utils.py
+@@ -149,8 +149,14 @@ def reset_modules(gallery_conf, fname, when):
+     # sphinx-gallery has already dropped by the time we get here with when="after")
+     # holds the last reference to it. Close them before the leak checks below.
+     gui_scraper.close_preserved()
++    
++    try:
++        import pyvistaqt  # noqa: F401
++    except ImportError:
++        pass
++    else:
++        mne.viz.set_3d_backend("pyvistaqt")
+ 
+-    mne.viz.set_3d_backend("pyvistaqt")
+     pyvista.OFF_SCREEN = False
+     pyvista.BUILDING_GALLERY = True
+ 


=====================================
debian/patches/0006-Use-an-absolute-path-for-the-default-thumbnail.patch
=====================================
@@ -0,0 +1,31 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 07:19:31 +0200
+Subject: Use an absolute path for the default Sphinx-Gallery thumbnail
+
+Sphinx-Gallery could not find the default thumbnail because the
+relative path was resolved against the current working directory
+instead of the documentation source directory.
+.
+Build the path relative to doc/conf.py to ensure that the thumbnail
+can be located independently of the working directory.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 24c6eea..9d86b1b 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -514,7 +514,9 @@ sphinx_gallery_conf = {
+         ]
+     ),
+     "gallery_dirs": gallery_dirs,
+-    "default_thumb_file": os.path.join("_static", "mne_helmet.png"),
++    "default_thumb_file": str(
++        Path(__file__).parent / "_static" / "mne_helmet.png"
++    ),
+     "backreferences_dir": "generated",
+     "plot_gallery": "True",  # Avoid annoying Unicode/bool default warning
+     "thumbnail_size": (160, 112),


=====================================
debian/patches/0007-Read-the-minimum-Python-version-from-pyproject.toml.patch
=====================================
@@ -0,0 +1,32 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 07:22:03 +0200
+Subject: Read the minimum Python version from pyproject.toml
+
+The documentation configuration retrieves the minimum supported Python
+version from the installed MNE package metadata. This fails when the
+documentation is built from the Debian source tree before the package
+metadata is installed.
+.
+The pyproject.toml file is already loaded by the configuration. Use its
+requires-python field instead of querying the installed package metadata.
+This makes the documentation build independent of the installation state
+of the MNE package.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 9d86b1b..bff3aa1 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -1109,7 +1109,7 @@ rst_prolog += """
+ 
+ # -- Dependency info ----------------------------------------------------------
+ 
+-min_py = metadata("mne")["Requires-Python"].lstrip(" =<>")
++min_py = pyproject["project"]["requires-python"].lstrip(" =<>")
+ rst_prolog += f"\n.. |min_python_version| replace:: {min_py}\n"
+ 
+ # -- website redirects --------------------------------------------------------


=====================================
debian/patches/0008-Skip-the-MNE-Qt-browser-scraper.patch
=====================================
@@ -0,0 +1,39 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 07:25:05 +0200
+Subject: Skip the MNE Qt browser scraper when the optional dependency is
+ unavailable
+
+The documentation configuration unconditionally enables the MNE Qt
+browser Sphinx-Gallery scraper. This causes the documentation build to
+fail when mne-qt-browser is not available in the Debian archive.
+.
+Enable the scraper only when mne_qt_browser can be imported. This allows
+the documentation build to proceed without the optional Qt browser
+dependency.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index bff3aa1..83a6e22 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -463,9 +463,15 @@ scrapers = (
+     "mne_doc_utils.brain_scraper",
+     "pyvista",
+     "mne_doc_utils.report_scraper",
+-    "mne_doc_utils.mne_qt_browser_scraper",
+ )
+ 
++try:
++    import mne_qt_browser  # noqa: F401
++except ImportError:
++    pass
++else:
++    scrapers += ("mne_doc_utils.mne_qt_browser_scraper",)
++
+ compress_images = ("images", "thumbnails")
+ # let's make things easier on Windows users
+ # (on Linux and macOS it's easy enough to require this)


=====================================
debian/patches/0009-Disable-Sphinx-Gallery-example-execution-for-offline.patch
=====================================
@@ -0,0 +1,31 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 07:27:39 +0200
+Subject: Disable Sphinx-Gallery example execution for offline builds
+
+The Debian build environment does not have network access. Executing
+Sphinx-Gallery examples therefore fails when tutorials attempt to
+download MNE sample datasets and other external resources.
+.
+Make gallery execution configurable through the
+MNE_DOC_BUILD_PLOT_GALLERY environment variable and disable it for
+Debian documentation builds. This avoids network-dependent example
+execution while still generating the documentation.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 83a6e22..d420db8 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -524,7 +524,7 @@ sphinx_gallery_conf = {
+         Path(__file__).parent / "_static" / "mne_helmet.png"
+     ),
+     "backreferences_dir": "generated",
+-    "plot_gallery": "True",  # Avoid annoying Unicode/bool default warning
++    "plot_gallery": "False",  # Avoid annoying Unicode/bool default warning
+     "thumbnail_size": (160, 112),
+     "remove_config_comments": True,
+     "min_reported_time": 1.0,


=====================================
debian/patches/0010-Use-relative-paths-for-generated-documentation-redir.patch
=====================================
@@ -0,0 +1,39 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 07:41:38 +0200
+Subject: Use relative paths for generated documentation redirects
+
+The documentation build generated HTML redirects containing absolute
+paths based on Sphinx's output directory. In Debian builds this exposed
+the package build path, for example
+/build/python-mne-1.13.2/debian/python-mne-doc/usr/share/doc/....
+.
+Use paths relative to the generated redirect pages instead. This avoids
+embedding the build directory in the installed documentation and makes
+the redirects work correctly after installation.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index d420db8..0bd261d 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -1446,7 +1446,7 @@ def make_api_redirects(app, exception):
+     for page in api_redirects:
+         fname = f"{page}.html"
+         fr_path = Path(app.outdir) / fname
+-        to_path = Path(app.outdir) / "api" / fname
++        to_path = f"api/{fname}"
+         # allow overwrite if existing file is just a redirect
+         check_existing_redirect(fr_path)
+         with open(fr_path, "w") as fid:
+@@ -1469,6 +1469,7 @@ def make_custom_redirects(app, exception):
+         else:
+             to_path = Path(app.outdir) / to
+             assert to_path.is_file(), to_path
++            to_path = os.path.relpath(to_path, fr_path.parent)
+         # recreate overview folder (only for redirects now)
+         os.makedirs(Path(app.outdir) / "overview", exist_ok=True)
+         # recreate gallery folders that no longer exist


=====================================
debian/patches/0011-Disable-Google-Analytics-in-the-Debian-documentation.patch
=====================================
@@ -0,0 +1,29 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 07:59:23 +0200
+Subject: Disable Google Analytics in the Debian documentation
+
+The upstream documentation enables Google Analytics through the PyData
+Sphinx Theme. This adds external tracking scripts to the generated HTML
+files and causes Lintian to report privacy-breach-generic warnings.
+.
+Remove the Google Analytics configuration from the documentation theme
+options to prevent the Debian documentation from loading external
+tracking scripts.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 0bd261d..7d5f3e0 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -852,7 +852,6 @@ html_theme_options = {
+     "navbar_persistent": ["search-button"],
+     "footer_start": ["copyright"],
+     "secondary_sidebar_items": ["page-toc", "edit-this-page"],
+-    "analytics": dict(google_analytics_id="G-5TBCPCRB6X"),
+     "switcher": {
+         "json_url": "https://mne.tools/versions.json",
+         "version_match": switcher_version_match,


=====================================
debian/patches/0012-Disable-embedded-YouTube-videos-in-the-Debian-docume.patch
=====================================
@@ -0,0 +1,30 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 08:15:58 +0200
+Subject: Disable embedded YouTube videos in the Debian documentation
+
+The upstream documentation enables the sphinxcontrib.youtube extension,
+which generates embedded YouTube iframes in the HTML documentation. These
+iframes cause Lintian to report privacy-breach-generic warnings because
+viewing the documentation can contact external YouTube servers.
+.
+The Debian documentation does not require embedded videos, so disable the
+YouTube Sphinx extension during the documentation build. This prevents
+external YouTube content from being embedded in the generated HTML.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 7d5f3e0..cecd5e1 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -122,7 +122,6 @@ extensions = [
+     "sphinx_design",
+     "sphinx_gallery.gen_gallery",
+     "sphinxcontrib.bibtex",
+-    "sphinxcontrib.youtube",
+     "sphinxcontrib.towncrier.ext",
+     # homegrown
+     "contrib_avatars",


=====================================
debian/patches/0013-Use-local-MathJax-installation-for-doc.patch
=====================================
@@ -0,0 +1,36 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 09:30:23 +0200
+Subject: Use Debian's local MathJax installation for the documentation
+
+Sphinx 9 defaults to loading MathJax 4 from the jsDelivr CDN. This causes
+the generated MNE documentation to reference an external JavaScript
+resource and triggers Lintian privacy-breach-generic warnings.
+.
+Use the Debian-packaged MathJax 3 distribution from node-mathjax-full
+instead. Copy the packaged ES5 distribution into the documentation's
+static files during the Debian build and configure Sphinx to load the
+local tex-mml-chtml.js file.
+.
+This removes the external CDN dependency and allows the HTML
+documentation to render mathematical expressions without network
+access.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index cecd5e1..68d5357 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -165,6 +165,9 @@ default_role = "py:obj"
+ # A list of ignored prefixes for module index sorting.
+ modindex_common_prefix = ["mne."]
+ 
++# Use Debian's local MathJax installation for the documentation
++mathjax_path = "mathjax/tex-mml-chtml.js"
++
+ # -- Sphinx-Copybutton configuration -----------------------------------------
+ copybutton_prompt_text = r">>> |\.\.\. |\$ "
+ copybutton_prompt_is_regexp = True


=====================================
debian/patches/0014-Disable-nitpicky-Sphinx-mode-for-the-Debian-document.patch
=====================================
@@ -0,0 +1,31 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 14:40:20 +0200
+Subject: Disable nitpicky Sphinx mode for the Debian documentation build
+
+MNE enables Sphinx's nitpicky mode to detect unresolved cross-references
+during the upstream documentation build. This produces a large number of
+warnings when the documentation is built in the Debian environment because
+not all external intersphinx inventories are available locally.
+.
+Disable nitpicky mode for the Debian documentation build. The generated
+documentation remains usable while avoiding thousands of warnings for
+optional or unavailable external cross-references.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 68d5357..f472a47 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -754,7 +754,7 @@ bibtex_footbibliography_header = ""
+ 
+ # -- Nitpicky ----------------------------------------------------------------
+ 
+-nitpicky = True
++nitpicky = False
+ show_warning_types = True
+ nitpick_ignore = [
+     ("py:class", "None.  Remove all items from D."),


=====================================
debian/patches/0015-Resolve-the-NumPy-glossary-term.patch
=====================================
@@ -0,0 +1,26 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Fri, 18 Sep 2026 15:19:50 +0200
+Subject: Resolve the NumPy glossary term through the local Intersphinx
+ inventory
+
+Use an explicit external Intersphinx reference so that the NumPy
+glossary term can be resolved from the local Debian inventory.
+
+Forwarded: not-needed
+---
+ doc/conf.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index f472a47..6ab07d1 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -214,7 +214,7 @@ numpydoc_xref_aliases = {
+     "file-like": ":term:`file-like <python:file object>`",
+     "iterator": ":term:`iterator <python:iterator>`",
+     "path-like": ":term:`path-like`",
+-    "array-like": ":term:`array_like <numpy:array_like>`",
++    "array-like": ":external+numpy:term:`array_like`",
+     "Path": ":class:`python:pathlib.Path`",
+     "bool": ":ref:`bool <python:typebool>`",
+     # Matplotlib


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,15 @@
 0001-allow-missing-metadata-in-sys_info.patch
 0002-fix-python-interpreter-issue.patch
 0003-skip-quaternion-test-without-pyvistaqt.patch
+0004-use-local-intersphinx_mapping-files.patch
+0005-Skip-PyVistaQt-during-documentation-builds.patch
+0006-Use-an-absolute-path-for-the-default-thumbnail.patch
+0007-Read-the-minimum-Python-version-from-pyproject.toml.patch
+0008-Skip-the-MNE-Qt-browser-scraper.patch
+0009-Disable-Sphinx-Gallery-example-execution-for-offline.patch
+0010-Use-relative-paths-for-generated-documentation-redir.patch
+0011-Disable-Google-Analytics-in-the-Debian-documentation.patch
+0012-Disable-embedded-YouTube-videos-in-the-Debian-docume.patch
+0013-Use-local-MathJax-installation-for-doc.patch
+0014-Disable-nitpicky-Sphinx-mode-for-the-Debian-document.patch
+0015-Resolve-the-NumPy-glossary-term.patch


=====================================
debian/python-mne-doc.docs-base
=====================================
@@ -0,0 +1,8 @@
+Document: python-mne-doc
+Title: MNEi-Python Documentation
+Author: Alexandre Gramfort <alexandre.gramfort at inria.fr>
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-mne-doc/html/index.html
+Files: /usr/share/doc/python-mne-doc/html/*.html


=====================================
debian/python-mne-doc.lintian-overrides
=====================================
@@ -0,0 +1,24 @@
+#Add Lintian overrides for external documentation resources
+#
+#The upstream MNE documentation intentionally references external images and
+#JavaScript resources from related projects and documentation services.
+#These resources are embedded in the generated HTML and trigger Lintian's
+#privacy-breach-generic warning.
+#
+#Keep the upstream documentation unchanged and add targeted Lintian
+#overrides for these known external resources instead.
+
+# External images intentionally referenced by the upstream documentation.
+privacy-breach-generic *https://mne.tools/mne-gui-addons/*
+privacy-breach-generic *https://i.ytimg.com/vi/xkdjzzphdnc/maxresdefault.jpg*
+privacy-breach-generic *https://www.fieldtriptoolbox.org/assets/img/tutorial/timefrequencyanalysis/figure1.png*
+privacy-breach-generic *https://mne.tools/mne-connectivity/stable/_images/sphx_glr_mne_inverse_label_connectivity_001.png*
+
+# External JavaScript used by the generated documentation.
+#privacy-breach-generic *https://cdn.jsdelivr.net/npm/mathjax@4/*
+privacy-breach-generic *http://www.openhub.net/p/687714/widgets/project_basic_stats.js*
+
+# FontAwesome webfonts are bundled with the HTML documentation and are
+# required by the documentation theme.
+font-in-non-font-package
+font-outside-font-dir


=====================================
debian/docs → debian/python3-mne.docs
=====================================


=====================================
debian/links → debian/python3-mne.links
=====================================


=====================================
debian/manpages → debian/python3-mne.manpages
=====================================


=====================================
debian/rules
=====================================
@@ -16,6 +16,11 @@ export ETS_TOOLKIT = qt4
 execute_before_dh_clean:
 	rm -rf *.egg-info
 
+
+execute_before_dh_auto_build:
+	mkdir -p doc/_static/mathjax
+	cp -a /usr/share/nodejs/mathjax-full/es5/* doc/_static/mathjax/
+
 SCREEN_CONFIG=-screen 0 1024x768x24 -ac +extension GLX +render -noreset
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
@@ -25,8 +30,17 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 		--server-num=20 \
 		-s "$(SCREEN_CONFIG)" \
 		env PYTHONPATH=$(CURDIR):$(CURDIR)/.pybuild/cpython3_$(shell py3versions -dv)_mne/build \
-		pytest mne -k "not test_parallel_func_n_jobs_none"
+		pytest mne -k "not test_parallel_func_n_jobs_none and not test_qt_block_sigint"
+endif
+
+execute_before_dh_sphinxdoc:
+ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
+	PYTHONPATH=$(CURDIR):$(CURDIR)/.pybuild/cpython3_$(shell py3versions -dv)_mne/build \
+	sphinx-build -j1 -N -b html doc $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html
 endif
 
 execute_after_dh_fixperms:
 	find `find debian -name data -type d` -type f -exec chmod -x \{\} \;
+
+execute_after_dh_clean:
+	rm -rf doc/_static/mathjax



View it on GitLab: https://salsa.debian.org/med-team/python-mne/-/compare/6e1db7c040765525407dc06382b7f96307dc7d68...3f74a3946a8a9c4b067e238f9ff9978fe5d9dd04

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-mne/-/compare/6e1db7c040765525407dc06382b7f96307dc7d68...3f74a3946a8a9c4b067e238f9ff9978fe5d9dd04
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260920/c7af7eab/attachment-0001.htm>


More information about the debian-med-commit mailing list