summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2017-09-11 07:14:45 -0500
committerJason Madden <jamadden@gmail.com>2017-09-11 07:14:45 -0500
commit0a852da59af04f98c50e0cbd8fbd68f2ab5fefbe (patch)
tree757802e6c068db6a17a7fb93a07141994e294e84 /docs
parent2f51b299dd65d4580564695e146fcca83ed945a7 (diff)
downloadzope-security-0a852da59af04f98c50e0cbd8fbd68f2ab5fefbe.tar.gz
Add test environments for ZOPE_WATCH_CHECKERS
They cover both the pure-python and C cases. This modified two existing test environments, but without loss of test coverage (since PyPy will always cover the pure-python case).
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py34
1 files changed, 30 insertions, 4 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 2bcdf49..caabf00 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -11,8 +11,16 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import os
+import sys
+import pkg_resources
+sys.path.append(os.path.abspath('../src'))
+rqmt = pkg_resources.require('zope.security')[0]
+
+# We can't have ZOPE_WATCH_CHECKERS set because it interferes
+# with doctests
+os.environ['ZOPE_WATCH_CHECKERS'] = '0'
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -28,6 +36,7 @@ import sys, os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
+ 'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'repoze.sphinx.autointerface',
@@ -54,9 +63,9 @@ copyright = u'2012, Zope Foundation Contributors <zope-dev@zope.org>'
# built documents.
#
# The short X.Y version.
-version = '4.0'
+version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
# The full version, including alpha/beta/rc tags.
-release = '4.0dev'
+release = rqmt.version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -249,4 +258,21 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
+intersphinx_mapping = {
+ 'https://docs.python.org/': None,
+ 'https://zopeinterface.readthedocs.io/en/latest': None,
+ 'https://zopeproxy.readthedocs.io/en/latest': None,
+ 'https://zopeschema.readthedocs.io/en/latest': None,
+}
+
+extlinks = {'issue': ('https://github.com/zopefoundation/zope.datetime/issues/%s',
+ 'issue #'),
+ 'pr': ('https://github.com/zopefoundation/zope.datetime/pull/%s',
+ 'pull request #')}
+
+autodoc_default_flags = [
+ 'members',
+ 'show-inheritance',
+]
+autoclass_content = 'both'
+autodoc_member_order = 'bysource'