DH_SPHINXDOC(1)
π DH_SPHINXDOC(1) β the debhelper girlie that fixes up ur Sphinx docs π
okay so bestie, this is dh_sphinxdoc(1) from the Debhelper manual fam, and it is literally the most helpful little script when ur packaging Sphinx-generated documentation. no cap. let's get into it π¦
β¨ NAME β¨
dh_sphinxdoc β helps with packaging Sphinx-generated documentation π
πΈ SYNOPSIS πΈ
dh_sphinxdoc [debhelper options] [-Xitem] [directory...]
π DESCRIPTION π
dh_sphinxdoc is a debhelper program that gets Sphinx-generated documentation all cute and ready to be tucked into a Debian package. more specifically, here's the tea:
- It checks if all the files referenced by
searchindex.jsactually exist. vibe check on ur search index fr fr π - It replaces known
*.jsfiles with symlinks pointing at/usr/share/javascript/sphinxdoc/, and it generates the${sphinxdoc:Depends}substitution variable. slay π - If the Sphinx RTD theme is in the mix, it swaps known files from that theme for symlinks to
/usr/share/sphinx_rtd_theme/, and it addssphinx-rtd-theme-commonto${sphinxdoc:Depends}. the theme got a glow-up β¨ - It provides a
${sphinxdoc:Built-Using}substitution variable, for keeping track of files that just could not be symlinked π. examples of such files are*.jsand*.cssfiles that get generated from the corresponding*.js.jinjaand*.css.jinjatemplates β these can vary depending on the theme options that were used (for instance, thebasic.cssfile is generated frombasic.css.jinjaand is included in almost every Sphinx-generated documentation). Currently, this variable will containsphinxand, if the default theme is used,alabaster, along with their versions (other themes are not supported, sorry bestie π).
Note: in most cases you do not need this variable. Use it only if that is required by your license. See https://bugs.debian.org/1136263 for details.
- It removes the
.doctreesdirectory. bye girl π - It removes the
.buildinfofile. also bye π«Ά - It removes the
websupport.jsfile and*-stemmer.jsfiles. gone, reduced to atoms π
ngl, one thing to be super clear about: dh_sphinxdoc does not build the documentation. it only does all of the above operations once the documentation is already installed into the package build path. to actually build the docs, pls use the sphinx-build(1) command or the python3 -m sphinx syntax. that's a different girl's job π
and you can pass --with sphinxdoc to dh(1) so it automatically calls dh_sphinxdoc after dh_installdocs. automatic, iconic, obsessed π
β¨ OPTIONS β¨
directoryβ by default,dh_sphinxdocscans ur package looking for directories that look like they contain Sphinx-generated documentation. But if you explicitly hand it one or more directories, then only those get processed. and if documentation is not found at directory, an error is raised. no docs, no vibes, error π¨-Xitem,--exclude=itemβ excludes files that contain item anywhere in their filename from being symlinked, removed, or checked for existence. like a little "not u, bestie" list π
π BUGS π
Symlinking translations.js is not supported. that's it, that's the bug note π
π SEE ALSO π
This program is meant to be used together with debhelper. they're a package deal fr fr π«Ά
π AUTHOR π
Jakub Wilk <jwilk@debian.org>
and that's the whole page bestie, go forth and package ur docs π β¨
this page was brought to you by Debhelper, dated 2026-09-15. mwah π ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: sphinx-common 9.1.0-8 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms