summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2017-12-01 13:18:53 -0500
committerDoug Hellmann <doug@doughellmann.com>2017-12-01 13:18:53 -0500
commit3662d5a80917eef2042c7f04582a8a77cefaf3b9 (patch)
tree78d58bad187ca90824c6fdf6ff0883902444f556
parentbc162de126a8612a08ad36fa7b8dd1bd88c49b43 (diff)
downloadcliff-3662d5a80917eef2042c7f04582a8a77cefaf3b9.tar.gz
do not require installing demo app to build docs
Remove the dependency on the demoapp and just add it to the import path so it is available to be imported. Copy the entry point settings into the main cliff setup.cfg to ensure they are registered for the doc build to find. Change-Id: I390410bc5247e8b6c8d0a8fec8e7ecb223d8d6c1 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
-rw-r--r--doc/source/conf.py7
-rw-r--r--setup.cfg15
-rw-r--r--tox.ini1
3 files changed, 21 insertions, 2 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 7c72ba7..63a342f 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -13,7 +13,9 @@
# serve to show the default.
import datetime
+import os.path
import subprocess
+import sys
# make openstackdocstheme an optional dependency. cliff is a low level lib
# that is used outside of OpenStack. Not having something OpenStack specific
@@ -28,7 +30,10 @@ else:
# 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('.'))
+
+# NOTE(dhellmann): Add the demoapp directory to the import path so the
+# directive for documenting the app can find the modules.
+sys.path.insert(0, os.path.abspath('../../demoapp'))
# -- General configuration ---------------------------------------------------
diff --git a/setup.cfg b/setup.cfg
index e451bfb..19904b0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -50,6 +50,21 @@ cliff.formatter.completion =
bash = cliff.complete:CompleteBash
none = cliff.complete:CompleteNoCode
+# NOTE(dhellmann): Duplicated from demoapp/setup.py for the
+# documentation build.
+cliff.demo =
+ simple = cliffdemo.simple:Simple
+ two_part = cliffdemo.simple:Simple
+ error = cliffdemo.simple:Error
+ list files = cliffdemo.list:Files
+ files = cliffdemo.list:Files
+ file = cliffdemo.show:File
+ show file = cliffdemo.show:File
+ unicode = cliffdemo.encoding:Encoding
+ hooked = cliffdemo.hook:Hooked
+cliff.demo.hooked =
+ sample-hook = cliffdemo.hook:Hook
+
[build_sphinx]
all-files = 1
diff --git a/tox.ini b/tox.ini
index 21aacea..929d28f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -19,7 +19,6 @@ commands =
coverage report --show-missing
deps =
-r{toxinidir}/test-requirements.txt
- {toxinidir}/demoapp
.[docs]
[testenv:pep8]