Skip to content
Snippets Groups Projects
Commit ec5ad83a authored by Donald Stufft's avatar Donald Stufft
Browse files

Merge pull request #45 from dstufft/make-docs-build

Make docs build
parents 3703d2be 7c02b87c
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ env: ...@@ -21,6 +21,7 @@ env:
- TOXENV=py32 SODIUM_INSTALL=system CC=clang - TOXENV=py32 SODIUM_INSTALL=system CC=clang
- TOXENV=py33 SODIUM_INSTALL=system CC=clang - TOXENV=py33 SODIUM_INSTALL=system CC=clang
- TOXENV=pypy SODIUM_INSTALL=system CC=clang - TOXENV=pypy SODIUM_INSTALL=system CC=clang
- TOXENV=docs
install: install:
# Add the PyPy repository # Add the PyPy repository
......
...@@ -7,11 +7,13 @@ ...@@ -7,11 +7,13 @@
# #
# 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 os
import sys
# If extensions (or modules to document with autodoc) are in another directory, # 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 # 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. # 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 import nacl
...@@ -175,3 +177,28 @@ intersphinx_mapping = {"http://docs.python.org/": None} ...@@ -175,3 +177,28 @@ intersphinx_mapping = {"http://docs.python.org/": None}
# Enable the new ReadTheDocs theme # Enable the new ReadTheDocs theme
RTD_NEW_THEME = True 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()
...@@ -60,7 +60,7 @@ Reference ...@@ -60,7 +60,7 @@ Reference
.. autoclass:: nacl.signing.SignedMessage .. autoclass:: nacl.signing.SignedMessage
:members: :members:
.. autoclass:: nacl.signing.BadSignatureError .. autoclass:: nacl.exceptions.BadSignatureError
:members: :members:
......
...@@ -13,7 +13,6 @@ commands = ...@@ -13,7 +13,6 @@ commands =
[testenv:docs] [testenv:docs]
deps = deps =
sphinx sphinx
cffi
basepython = python2.7 basepython = python2.7
commands = commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment