Update to use Sphinx for python3, fix a couple little bugs and add a helper script to build the docs in a mock.
From: "Brian C. Lane" bcl@redhat.com
--- pyanaconda/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py index d2c2975..fb478e3 100644 --- a/pyanaconda/errors.py +++ b/pyanaconda/errors.py @@ -42,7 +42,7 @@
# If we don't do the check above this import will fail within _isys from pyanaconda.ui.gui.utils import escape_markup -except (RuntimeError, ImportError): +except (RuntimeError, ImportError, ValueError): escape_markup = lambda x: x
class InvalidImageSizeError(Exception):
From: "Brian C. Lane" bcl@redhat.com
--- pyanaconda/ui/gui/spokes/langsupport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/langsupport.py b/pyanaconda/ui/gui/spokes/langsupport.py index 36c93c6..fd62b20 100644 --- a/pyanaconda/ui/gui/spokes/langsupport.py +++ b/pyanaconda/ui/gui/spokes/langsupport.py @@ -21,7 +21,7 @@ #
import gi -gi.require_verseion("Pango", "1.0") +gi.require_version("Pango", "1.0") gi.require_version("Gdk", "3.0")
from gi.repository import Pango, Gdk
From: "Brian C. Lane" bcl@redhat.com
This now uses python3-sphinx and refers to the python3 intersphinx. --- docs/Makefile.am | 4 ++-- docs/conf.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am index a8ea674..67b85a3 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -30,8 +30,8 @@ MAINTAINERCLEANFILES = Makefile.in
# You can set these variables from the command line. SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXAPIDOC = sphinx-apidoc +SPHINXBUILD = sphinx-build-3 +SPHINXAPIDOC = sphinx-apidoc-3 PAPER = BUILDDIR = . SOURCEDIR = ../pyanaconda diff --git a/docs/conf.py b/docs/conf.py index eb6971c..e0598b0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -302,7 +302,7 @@ def read_version():
# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/2': None} +intersphinx_mapping = {'https://docs.python.org/3': None}
# on_rtd is whether we are on readthedocs.org on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
From: "Brian C. Lane" bcl@redhat.com
Run ./scripts/make-sphinx-docs and after a while you will have new html docs in ./docs/html.new/ and instructions on how to update the gh-pages.
This needs to be run from a host with a GUI, otherwise you get Gtk errors and a coredump from sphinx trying to import the project inside the mock chroot. --- scripts/make-sphinx-docs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 scripts/make-sphinx-docs
diff --git a/scripts/make-sphinx-docs b/scripts/make-sphinx-docs new file mode 100755 index 0000000..3fbcd7b --- /dev/null +++ b/scripts/make-sphinx-docs @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Helper script for updating the Sphinx documentation. It requires a full install of the +# dependencies so we do that in a mock chroot. +# +# Copyright (C) 2015 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# Author: Brian C. Lane bcl@redhat.com +# +MOCKCFG=fedora-rawhide-x86_64 + +if [ -z "$DISPLAY" ]; then + echo "Run script on a desktop system with a GUI" + exit 1 +fi +mock -r $MOCKCFG --init +mock -r $MOCKCFG -i anaconda-gui -i python3-sphinx -i python3-sphinx_rtd_theme -i ostree +mock -r $MOCKCFG --copyin $PWD /builddir/anaconda/ +# Note that DISPLAY is needed to make GTK happy, so this needs to be run from a system with a GUI +mock -r $MOCKCFG --chroot "cd /builddir/anaconda/docs/; DISPLAY=$DISPLAY make -f Makefile.am html" +mock -r $MOCKCFG --copyout /builddir/anaconda/docs/html $PWD/docs/html.new + +echo "Now make sure the ./docs/html.new/ looks ok and copy it over the top of ./docs/html/ and commit." +echo "Then copy ./docs/html/ outside the repo and check out the gh-pages branch. Copy them back to /" +echo "and commit to update the https://rhinstaller.github.io/anaconda/ page."
Added label: ACK.
Pushed. Docs updated.
Closed.
anaconda-patches@lists.fedorahosted.org