Commit 76f5bc96 authored by Thomas Vincent's avatar Thomas Vincent

Add support of sphinx programoutput extension

parent 54ad8d7a
......@@ -43,12 +43,16 @@ project = u'xsocs'
try:
import xsocs
project_dir = os.path.abspath(os.path.join(__file__, "..", "..", ".."))
build_dir = os.path.abspath(xsocs.__file__)
build_dir = os.path.abspath(os.path.dirname(xsocs.__file__))
if not build_dir.startswith(project_dir):
raise RuntimeError("%s looks to come from the system. Fix your PYTHONPATH and restart sphinx." % project)
except ImportError:
raise RuntimeError("%s is not on the path. Fix your PYTHONPATH and restart sphinx." % project)
# Add xsocs from build to PYTHONPATH for programoutput to work
build_lib_dir = os.path.dirname(build_dir)
os.environ["PYTHONPATH"] = build_lib_dir + os.pathsep + os.environ.get("PYTHONPATH", "")
# Disable deprecation warnings:
# It avoid to spam documentation logs with deprecation warnings.
# If we want to generate the documentation of deprecated features it should
......@@ -70,6 +74,7 @@ extensions = [
'sphinx.ext.mathjax',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinxcontrib.programoutput',
]
autodoc_member_order = 'bysource'
......
......@@ -2,11 +2,12 @@
# Those ARE NOT required for installation or at runtime
numpy >= 1.8
setuptools # Advanced packaging tools
wheel # To build wheels
Cython >= 0.21.1 # To regenerate .c/.cpp files from .pyx
Sphinx # To build the documentation in doc/
lxml # For test coverage in run_test.py
coverage # For test coverage in run_test.py
pillow # For loading images in documentation generation
nbsphinx # For converting ipynb in documentation
\ No newline at end of file
setuptools # Advanced packaging tools
wheel # To build wheels
Cython >= 0.21.1 # To regenerate .c/.cpp files from .pyx
Sphinx # To build the documentation in doc/
lxml # For test coverage in run_test.py
coverage # For test coverage in run_test.py
pillow # For loading images in documentation generation
nbsphinx # For converting ipynb in documentation
sphinxcontrib.programoutput # To generate doc from command line
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