diff options
| -rw-r--r-- | HACKING.txt | 25 | ||||
| -rw-r--r-- | docs/conf.py | 22 | ||||
| -rw-r--r-- | setup.py | 1 |
3 files changed, 7 insertions, 41 deletions
diff --git a/HACKING.txt b/HACKING.txt index e31dd8714..b82041c71 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -216,29 +216,12 @@ documentation in this package which references that API or behavior must be changed to reflect the bug fix, ideally in the same commit that fixes the bug or adds the feature. To build and review docs, use the following steps. -1. After following the steps above in "Using a Development Checkout", update - all git submodules from the top-level of your Pyramid checkout, like so: +1. In the main Pyramid checkout directory, run ``./builddocs.sh`` (which just + turns around and runs ``tox -e py2-docs,py3-docs``):: - $ git submodule update --init --recursive + $ ./builddocs.sh - This will checkout theme subrepositories and prevent error conditions when - HTML docs are generated. - -2. Next change into the submodule's directory and switch to a branch so that - the submodule repositories are no longer "headless". Then update the - repository to ensure that we have the latest updates. - See http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/ :: - - $ cd docs/_themes - $ git checkout master - $ git pull - -3. Change back to the main Pyramid checkout dir and run ``./builddocs`` (which - just turns around and runs ``tox -e py2-docs,py3-docs``):: - - $ ./builddocs - -4. Open the ``.tox/_build/html/index.html`` file to see the resulting HTML +2. Open the ``docs/_build/html/index.html`` file to see the resulting HTML rendering. Change Log diff --git a/docs/conf.py b/docs/conf.py index fa4578275..11e42c5f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,6 +20,7 @@ import warnings warnings.simplefilter('ignore', DeprecationWarning) import pkg_resources +import pylons_sphinx_themes # skip raw nodes from sphinx.writers.text import TextTranslator @@ -136,27 +137,8 @@ if book: # Options for HTML output # ----------------------- -# Add and use Pylons theme -if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers - from subprocess import call, Popen, PIPE - cwd = os.getcwd() - p = Popen('which git', shell=True, stdout=PIPE) - here = os.path.abspath(os.path.dirname(__file__)) - parent = os.path.abspath(os.path.dirname(here)) - _themes = os.path.join(here, '_themes') - git = p.stdout.read().strip() - try: - os.chdir(parent) - if not os.listdir(_themes): - call([git, 'submodule', '--init']) - else: - call([git, 'submodule', 'update']) - sys.path.append(_themes) - finally: - os.chdir(cwd) - -html_theme_path = ['_themes'] html_theme = 'pyramid' +html_theme_path = pylons_sphinx_themes.get_html_themes_path() html_theme_options = dict( github_url='https://github.com/Pylons/pyramid', in_progress='true', @@ -59,6 +59,7 @@ docs_extras = [ 'Sphinx >= 1.2.3', 'docutils', 'repoze.sphinx.autointerface', + 'pylons-sphinx-themes >= 0.3', ] testing_extras = tests_require + [ |
