Commit 579b5395 authored by Éloi Rivard's avatar Éloi Rivard

build documentation with tox

parent 0e343a8c
...@@ -4,7 +4,7 @@ develop-eggs ...@@ -4,7 +4,7 @@ develop-eggs
parts parts
.installed.cfg .installed.cfg
build build
docs/_build doc/_build
__pycache__ __pycache__
*.pyc *.pyc
*.so *.so
......
...@@ -23,6 +23,7 @@ install: ...@@ -23,6 +23,7 @@ install:
script: script:
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then bin/coverage run bin/coverage-test -v; fi - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then bin/coverage run bin/coverage-test -v; fi
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then bin/test -v; fi - if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then bin/test -v; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy3* ]]; then pip install --upgrade --requirement doc/requirements.txt; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy3* ]]; then make -C doc html; fi - if [[ $TRAVIS_PYTHON_VERSION != pypy3* ]]; then make -C doc html; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls; fi # install early enough to get into the cache - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls; fi # install early enough to get into the cache
after_success: after_success:
......
...@@ -53,7 +53,9 @@ interpreter = py ...@@ -53,7 +53,9 @@ interpreter = py
eggs = Sphinx eggs = Sphinx
[sphinx_egg:python2 or python34] [sphinx_egg:python2 or python34]
eggs = Sphinx < 2 eggs =
Sphinx < 2
pygments < 2.6
[sphinx] [sphinx]
recipe = zc.recipe.egg recipe = zc.recipe.egg
......
...@@ -14,19 +14,33 @@ ...@@ -14,19 +14,33 @@
# All configuration values have a default; values that are commented out # All configuration values have a default; values that are commented out
# serve to show the default. # serve to show the default.
import sys
import os
import pkg_resources
# If your extensions are in another directory, add it here. If the directory # If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it # is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here. # absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath(".."))
# General configuration # General configuration
# --------------------- # ---------------------
rqmt = pkg_resources.require('ZODB')[0]
# Add any Sphinx extension module names here, as strings. They can be extensions # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', extensions = [
'j1m.sphinxautointerface', 'sphinx.ext.autodoc',
'j1m.sphinxautozconfig'] 'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'j1m.sphinxautointerface',
'j1m.sphinxautozconfig',
]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates'] templates_path = ['.templates']
...@@ -41,15 +55,15 @@ source_suffix = '.rst' ...@@ -41,15 +55,15 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'ZODB' project = 'ZODB'
copyright = u'2009-2016, Zope Foundation' copyright = '2009-2020, Zope Foundation'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '5.0' version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
#release = '3.10.3' #release = '3.10.3'
...@@ -89,6 +103,10 @@ pygments_style = 'sphinx' ...@@ -89,6 +103,10 @@ pygments_style = 'sphinx'
# Options for HTML output # Options for HTML output
# ----------------------- # -----------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# The style sheet to use for HTML and HTML Help pages. A file of that name # The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths # must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path. # given in html_static_path.
...@@ -166,8 +184,8 @@ htmlhelp_basename = 'ZODBdocumentationandarticlesdoc' ...@@ -166,8 +184,8 @@ htmlhelp_basename = 'ZODBdocumentationandarticlesdoc'
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]). # (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'ZODBdocumentationandarticles.tex', ur'ZODB documentation and articles', ('index', 'ZODBdocumentationandarticles.tex', 'ZODB documentation and articles',
ur'Zope Developer Community', 'manual'), 'Zope Developer Community', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
...@@ -186,3 +204,10 @@ latex_documents = [ ...@@ -186,3 +204,10 @@ latex_documents = [
# If false, no module index is generated. # If false, no module index is generated.
#latex_use_modindex = True #latex_use_modindex = True
intersphinx_mapping = {
"python": ('https://docs.python.org/3/', None),
"persistent": ('https://persistent.readthedocs.io/en/latest/', None),
"zodburi": ("https://docs.pylonsproject.org/projects/zodburi/en/latest/", None),
"btrees": ("https://btrees.readthedocs.io/en/latest/", None),
}
Sphinx Sphinx
pygments<2.6
docutils docutils
ZODB ZODB
j1m.sphinxautointerface j1m.sphinxautointerface
j1m.sphinxautozconfig j1m.sphinxautozconfig
sphinx_rtd_theme
[tox] [tox]
envlist = py27,py35,py36,py37,py38,pypy,pypy3,py38-pure envlist = py27,py35,py36,py37,py38,pypy,pypy3,py38-pure,docs
[testenv] [testenv]
# ZODB.tests.testdocumentation needs to find # ZODB.tests.testdocumentation needs to find
...@@ -28,3 +28,12 @@ basepython = ...@@ -28,3 +28,12 @@ basepython =
python3.8 python3.8
setenv = setenv =
PURE_PYTHON = 1 PURE_PYTHON = 1
[testenv:docs]
basepython =
python3.7
commands =
sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html
sphinx-build -d doc/_build/doctrees doc doc/_build/doctest
deps =
--requirement doc/requirements.txt
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment