buildhosts.rst 3.1 KB

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