aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2017-09-23 22:10:56 -0400
committerTim Harder <radhermit@gmail.com>2017-09-23 22:10:56 -0400
commitc49ef37c44bc2ca03fe7bd8d73022b1430612a61 (patch)
tree1291aac29c74bf791ead2d3440f0e4da56ff9ad4 /doc
parenttravis-ci: use doc deps for building sdist for github deploy (diff)
downloadpkgcheck-c49ef37c44bc2ca03fe7bd8d73022b1430612a61.tar.gz
pkgcheck-c49ef37c44bc2ca03fe7bd8d73022b1430612a61.tar.bz2
pkgcheck-c49ef37c44bc2ca03fe7bd8d73022b1430612a61.zip
fix docs generation on readthedocs
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile6
-rw-r--r--doc/conf.py13
2 files changed, 9 insertions, 10 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 84f40e37..f3337f72 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -9,6 +9,8 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
+TOPDIR = ..
+PACKAGEDIR = ../src
PREFIX = /usr/local
MAN_PREFIX = $(PREFIX)/share/man
@@ -56,7 +58,7 @@ clean:
-rm -rf $(BUILDDIR) api generated
html:
- $(PYTHON) -m snakeoil.dist.generate_docs --html ../ pkgcheck
+ $(PYTHON) -m snakeoil.dist.generate_docs --html $(TOPDIR) $(PACKAGEDIR) pkgcheck
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@@ -135,7 +137,7 @@ text:
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
- $(PYTHON) -m snakeoil.dist.generate_docs --man ../ pkgcheck
+ $(PYTHON) -m snakeoil.dist.generate_docs --man $(TOPDIR) $(PACKAGEDIR) pkgcheck
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
diff --git a/doc/conf.py b/doc/conf.py
index f8ed0981..9c51feaa 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -26,9 +26,7 @@ libdir = os.path.abspath(os.path.join('..', 'build', 'lib'))
if os.path.exists(libdir):
sys.path.insert(0, libdir)
sys.path.insert(1, os.path.abspath('..'))
-
-from pkgcheck import __version__
-from snakeoil.dist.generate_docs import generate_man, generate_html
+import pkgdist
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
@@ -66,7 +64,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = 'pkgcheck'
+project = pkgdist.MODULE
authors = ''
copyright = '2006-2017, pkgcheck contributors'
@@ -75,7 +73,7 @@ copyright = '2006-2017, pkgcheck contributors'
# built documents.
#
# The short X.Y version.
-version = __version__
+version = pkgdist.version()
# The full version, including alpha/beta/rc tags.
release = 'master'
@@ -118,10 +116,9 @@ pygments_style = 'sphinx'
#keep_warnings = False
# auto-generate required files for RTD build environment
-project_dir = os.path.abspath('..')
if on_rtd:
- generate_man(project, project_dir)
- generate_html(project, project_dir)
+ pkgdist.generate_man()
+ pkgdist.generate_html()
# -- Options for HTML output ----------------------------------------------