install.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. .. _install_sphinx:
  2. Installing Sphinx
  3. =================
  4. In order to work with Sphinx and generate the HTML/PDF documentation you will need the following:
  5. * `Python 3 <http://www.python.org/download/>`_
  6. * `pip3 <https://pypi.org/project/pip/>`_ (Package Installer for Python, included with Python)
  7. To optionally make PDF documentation you will need the following:
  8. * `LaTeX <http://www.latex-project.org/>`_ installation with full extensions (in order to build PDF documentation). For more details, see :ref:`install_latex`.
  9. Windows
  10. -------
  11. #. Download and install Python 3. Though there are various distributions and versions, the `official versions <https://www.python.org/downloads/>`_ have been tested and work as expected.
  12. Put :command:`python` in your Path. To do so, go to :menuselection:`Control Panel --> System --> Advanced --> Environment Variables`. Look for ``PATH`` among the system variables, and add the installation locations to the end of the string. For example, if :command:`python` is installed in :file:`C:\\Python` add the following to the end of the string:
  13. .. code-block:: bat
  14. ...;C:\Python
  15. Confirm availability of Python 3:
  16. .. code-block:: bash
  17. python --version
  18. #. Open a command line window and run:
  19. .. code-block:: bat
  20. cd doc\en
  21. pip3 install -r requirements.txt
  22. #. Confirm availability with:
  23. .. code-block:: bat
  24. sphinx-build --version
  25. sphinx-autobuild --version
  26. #. To test for a successful installation, in a command line window, navigate to your GeoServer source checkout and run:
  27. .. code-block:: bat
  28. mvn clean -f doc/en install
  29. This is the same as running:
  30. .. code-block:: bat
  31. cd doc\en
  32. ant user
  33. ant docguide
  34. ant developer
  35. This should generate HTML pages in the :file:`doc\\en\\target\\user\\html` directory.
  36. Ubuntu
  37. ------
  38. .. note:: These instructions may work on other Linux distributions as well, but have not been tested.
  39. #. Open a terminal and type the following command:
  40. .. code-block:: bash
  41. sudo apt-get install python-dev build-essential pip
  42. Depending on your system this may trigger the installation of other packages.
  43. Confirm availability of Python 3:
  44. .. code-block:: bash
  45. python --version
  46. #. Install Sphinx using :command:`pip`:
  47. .. code-block:: bash
  48. cd doc/en
  49. pip3 install -r requirements.txt
  50. #. Confirm availability with:
  51. .. code-block:: bash
  52. sphinx-build --version
  53. sphinx-autobuild --version
  54. #. To test for a successful installation, navigate to your GeoServer source checkout and run:
  55. .. code-block:: bash
  56. mvn clean -f doc/en install
  57. This should generate HTML pages in the :file:`doc/en/target/user/html` directory.
  58. Mac OS X
  59. --------
  60. Installing Sphinx on macOS is nearly identical to installing Sphinx on a Linux system.
  61. #. Example using `homebrew <https://brew.sh>`__ package manager:
  62. .. code-block:: bash
  63. brew install python
  64. Confirm availability of Python 3:
  65. .. code-block:: bash
  66. python --version
  67. #. Use ``pip`` or ``pip3`` to install :command:`sphinx` and related tools:
  68. .. code-block:: bash
  69. cd doc/en
  70. pip3 install -r requirements.txt
  71. #. Confirm availability with:
  72. .. code-block:: bash
  73. sphinx-build --version
  74. sphinx-autobuild --version
  75. #. To test for a successful installation, navigate to your GeoServer source checkout and run:
  76. .. code-block:: bash
  77. mvn clean -f doc/en install