buildhosts.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. .. _buildhosts:
  2. ==========
  3. Buildhosts
  4. ==========
  5. .. sidebar:: This article needs some work
  6. If you have any contribution send us your :pull:`PR <../pulls>`, see
  7. :ref:`how to contribute`.
  8. To get best results from build, its recommend to install additional packages
  9. on build hosts.
  10. .. _docs build:
  11. Build docs
  12. ==========
  13. .. _Graphviz: https://graphviz.gitlab.io
  14. .. _ImageMagick: https://www.imagemagick.org
  15. .. _XeTeX: https://tug.org/xetex/
  16. .. _dvisvgm: https://dvisvgm.de/
  17. .. sidebar:: Sphinx build needs
  18. - ImageMagick_
  19. - Graphviz_
  20. - XeTeX_
  21. - dvisvgm_
  22. Most of the sphinx requirements are installed from :origin:`setup.py` and the
  23. docs can be build from scratch with ``make docs``. For better math and image
  24. processing additional packages are needed. The XeTeX_ needed not only for PDF
  25. creation, its also needed for :ref:`math` when HTML output is build.
  26. To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
  27. as images (``sphinx.ext.imgmath`` extension).
  28. Here is the extract from the :origin:`docs/conf.py` file, setting math renderer
  29. to ``imgmath``:
  30. .. literalinclude:: ../conf.py
  31. :language: python
  32. :start-after: # sphinx.ext.imgmath setup
  33. :end-before: # sphinx.ext.imgmath setup END
  34. If your docs build (``make docs``) shows warnings like this::
  35. WARNING: dot(1) not found, for better output quality install \
  36. graphviz from http://www.graphviz.org
  37. ..
  38. WARNING: LaTeX command 'latex' cannot be run (needed for math \
  39. display), check the imgmath_latex setting
  40. you need to install additional packages on your build host, to get better HTML
  41. output.
  42. .. tabs::
  43. .. group-tab:: Ubuntu / debian
  44. .. code-block:: sh
  45. $ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
  46. .. group-tab:: Arch Linux
  47. .. code-block:: sh
  48. $ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
  49. .. group-tab:: Fedora / RHEL
  50. .. code-block:: sh
  51. $ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-tools
  52. For PDF output you also need:
  53. .. tabs::
  54. .. group-tab:: Ubuntu / debian
  55. .. code:: sh
  56. $ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
  57. .. group-tab:: Arch Linux
  58. .. code:: sh
  59. $ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
  60. .. group-tab:: Fedora / RHEL
  61. .. code:: sh
  62. $ sudo dnf install \
  63. texlive-collection-fontsrecommended texlive-collection-latex \
  64. dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
  65. .. _sh lint:
  66. Lint shell scripts
  67. ==================
  68. .. _ShellCheck: https://github.com/koalaman/shellcheck
  69. To lint shell scripts, we use ShellCheck_ - A shell script static analysis tool.
  70. .. SNIP sh lint requirements
  71. .. tabs::
  72. .. group-tab:: Ubuntu / debian
  73. .. code-block:: sh
  74. $ sudo apt install shellcheck
  75. .. group-tab:: Arch Linux
  76. .. code-block:: sh
  77. $ sudo pacman -S shellcheck
  78. .. group-tab:: Fedora / RHEL
  79. .. code-block:: sh
  80. $ sudo dnf install ShellCheck
  81. .. SNAP sh lint requirements