Installing Sphinx¶
In order to work with Sphinx and generate the HTML/PDF documentation you will need the following:
To optionally make PDF documentation you will need the following:
- LaTeX installation with full extensions (in order to build PDF documentation). For more details, see Installing LaTeX.
Windows¶
-
Download and install Python 3. Though there are various distributions and versions, the official versions have been tested and work as expected.
Put python in your Path. To do so, go to Control Panel --> System --> Advanced --> Environment Variables. Look for
PATHamong the system variables, and add the installation locations to the end of the string. For example, if python is installed inC:\Pythonadd the following to the end of the string:bat ...;C:\PythonConfirm availability of Python 3:
bash python --version -
Open a command line window and run:
bat cd doc\en pip3 install -r requirements.txt -
Confirm availability with:
bat sphinx-build --version sphinx-autobuild --version -
To test for a successful installation, in a command line window, navigate to your GeoServer source checkout and run:
bat mvn clean -f doc/en installThis is the same as running:
bat cd doc\en ant user ant docguide ant developerThis should generate HTML pages in the
doc\en\target\user\htmldirectory.
Ubuntu¶
Note
These instructions may work on other Linux distributions as well, but have not been tested.
-
Open a terminal and type the following command:
bash sudo apt-get install python-dev build-essential pipDepending on your system this may trigger the installation of other packages.
Confirm availability of Python 3:
bash python --version -
Install Sphinx using pip:
bash cd doc/en pip3 install -r requirements.txt -
Confirm availability with:
bash sphinx-build --version sphinx-autobuild --version -
To test for a successful installation, navigate to your GeoServer source checkout and run:
bash mvn clean -f doc/en installThis should generate HTML pages in the
doc/en/target/user/htmldirectory.
Mac OS X¶
Installing Sphinx on macOS is nearly identical to installing Sphinx on a Linux system.
-
Example using homebrew package manager:
bash brew install pythonConfirm availability of Python 3:
bash python --version -
Use
piporpip3to install sphinx and related tools:bash cd doc/en pip3 install -r requirements.txt -
Confirm availability with:
bash sphinx-build --version sphinx-autobuild --version -
To test for a successful installation, navigate to your GeoServer source checkout and run:
bash mvn clean -f doc/en install