diff --git a/.travis.yml b/.travis.yml index 777141faf77a8deba8a8f3922c24f323a7e435ea..a9a0baf894dffcc02a65ac71f255caa6f01e1ed5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: - TOXENV=py32 SODIUM_INSTALL=system CC=clang - TOXENV=py33 SODIUM_INSTALL=system CC=clang - TOXENV=pypy SODIUM_INSTALL=system CC=clang + - TOXENV=docs install: # Add the PyPy repository diff --git a/docs/conf.py b/docs/conf.py index 57a3bbeeea8c2339df5adff666c1f285195d27a8..c96071b6a8f4b68d8b5b49d307be48e9d5dfdf1c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,11 +7,13 @@ # # All configuration values have a default; values that are commented out # serve to show the default. +import os +import sys # 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. -#sys.path.insert(0, os.path.abspath(".")) +sys.path.insert(0, os.path.abspath("../src")) import nacl @@ -175,3 +177,28 @@ intersphinx_mapping = {"http://docs.python.org/": None} # Enable the new ReadTheDocs theme RTD_NEW_THEME = True + + +# Mock out CFFI +class Mock(object): + def __init__(self, *args, **kwargs): + pass + + def __call__(self, *args, **kwargs): + return Mock() + + @classmethod + def __getattr__(cls, name): + if name in ('__file__', '__path__'): + return '/dev/null' + else: + return Mock() + + def __floordiv__(self, other): + return Mock() + +MOCK_MODULES = [ + "cffi", "cffi.vengine_cpy", "cffi.vengine_gen", "cffi.verifier", +] +for mod_name in MOCK_MODULES: + sys.modules[mod_name] = Mock() diff --git a/docs/signing.rst b/docs/signing.rst index 3af4fa1ea57c99d0e5469a004e9a337d25410b7b..076939ad02ce12ae728175aef3f74e5a126aee03 100644 --- a/docs/signing.rst +++ b/docs/signing.rst @@ -60,7 +60,7 @@ Reference .. autoclass:: nacl.signing.SignedMessage :members: -.. autoclass:: nacl.signing.BadSignatureError +.. autoclass:: nacl.exceptions.BadSignatureError :members: diff --git a/tox.ini b/tox.ini index 11d3257119ed4c05e7f005b28eca0661590418f3..68b0fd850dac390ac274985f6c49bcf6bb9ac455 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,6 @@ commands = [testenv:docs] deps = sphinx - cffi basepython = python2.7 commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html