Skip to content

Add a script to check for Sphinx install requirements

Mauro Carvalho Chehab linux-kbuild lkml 2 versions – Applied

Status from this message: I've applied these (including the Mageia one), thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 3 repliesApplied
  2. v15 patches 8 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/8docs: Makefile: remove no-ops targetsDocumentation/Makefile Documentation/translations/zh_CN/HOWTO Makefile+1 -130 replies
2/8scripts/sphinx-pre-install: add a script to check Sphinx installscripts/sphinx-pre-install+517 -00 replies
3/8sphinx-pre-install: detect an existing virtualenvscripts/sphinx-pre-install+17 -90 replies
4/8sphinx-pre-install: use a requirements fileDocumentation/sphinx/requirements.txt scripts/sphinx-pre-install+5 -30 replies
5/8sphinx-pre-install: check for the need of graphviz-gdscripts/sphinx-pre-install+9 -00 replies
6/8sphinx-pre-install: add dependencies for ImageMagick to work with svgscripts/sphinx-pre-install+6 -00 replies
7/8sphinx-pre-install: fix USE needs for GraphViz and ImageMagickscripts/sphinx-pre-install+6 -10 replies
8/8sphinx.rst: document scripts/sphinx-pre-install scriptDocumentation/doc-guide/sphinx.rst+44 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/8] Add a script to check for Sphinx install requirements

Sphinx installation is not trivial, as not all versions are supported, and it requires a lot of stuff for math, images and PDF/LaTeX output to work.

So, add a script that checks if everything is fine, providing distro-specific hints about what's needed for it to work.

I posted already RFC patches for the first patch in this series along this weekend at linux-doc ML. The current version of the script will provide hints for some popular distributions. I tested myself on a couple of release-based and rolling popular distributions:

- Fedora 25 and 26;
- Ubuntu 17.04;
- OpenSuse Tumbleweed;
- Arch Linux;
- Gentoo.

I tested compilation with both htmldocs and pdfdocs targets[1]. Yet, tests (and fix patches) are welcomed :-)

Those patches are at:

https://git.linuxtv.org/mchehab/experimental.git/log/?h=sphinx_install_v2

PS.:

1) The first patch in this series is actually independent: it is just a cleanup from DocBook removal patches.

2) Debian 17.04 version of ImageMagick seems capped:
it can't read SVG texts with things like:
font-family="'Liberation Sans', Sans"
It also doesn't handle other random SVG tags. So, I had to rewrite several media SVG files to make them more compliant with ImageMagick.

So far, I can't submit those patches via e-mail, as some lines there are bigger than 998 characters, with violates VGER rules for maximum number of columns. I'll try to break the big lines there via some scripting.

-

v2: be sure that GraphViz and ImageMagick will generate PDF
outputs on all platforms but OpenSuse (where GraphViz is built without PDf support).

Mauro Carvalho Chehab (8):
docs: Makefile: remove no-ops targets scripts/sphinx-pre-install: add a script to check Sphinx install
sphinx-pre-install: detect an existing virtualenv
sphinx-pre-install: use a requirements file
sphinx-pre-install: check for the need of graphviz-gd
sphinx-pre-install: add dependencies for ImageMagick to work with svg
sphinx-pre-install: fix USE needs for GraphViz and ImageMagick sphinx.rst: document scripts/sphinx-pre-install script

 Documentation/Makefile                 |  10 -
 Documentation/doc-guide/sphinx.rst     |  48 ++-
 Documentation/sphinx/requirements.txt  |   3 +
 Documentation/translations/zh_CN/HOWTO |   2 -
 Makefile                               |   2 +-
 scripts/sphinx-pre-install             | 544 +++++++++++++++++++++++++++++++++
 6 files changed, 592 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/sphinx/requirements.txt
 create mode 100755 scripts/sphinx-pre-install
Signature · 1 line
2.13.3