aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2017-09-23 22:04:36 -0400
committerTim Harder <radhermit@gmail.com>2017-09-23 22:04:36 -0400
commitd77d6a92c6bb3dd0989d69e05b959ded6702c33c (patch)
tree488f9a08245622067bb098fa92b668cc73bc3a10 /doc
parenttravis-ci: use doc deps for building sdist for github deploy (diff)
downloadpkgcore-d77d6a92c6bb3dd0989d69e05b959ded6702c33c.tar.gz
pkgcore-d77d6a92c6bb3dd0989d69e05b959ded6702c33c.tar.bz2
pkgcore-d77d6a92c6bb3dd0989d69e05b959ded6702c33c.zip
fix docs build on readthedocs
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile6
-rw-r--r--doc/conf.py12
2 files changed, 9 insertions, 9 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 4165254b..084798fe 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -9,6 +9,8 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = $(CURDIR)/_build
+TOPDIR = ..
+PACKAGEDIR = ../src
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -45,7 +47,7 @@ clean:
-rm -rf $(BUILDDIR) api generated
html:
- $(PYTHON) -m snakeoil.dist.generate_docs --html ../ pkgcore
+ $(PYTHON) -m snakeoil.dist.generate_docs --html $(TOPDIR) $(PACKAGEDIR) pkgcore
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@@ -118,7 +120,7 @@ text:
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
- $(PYTHON) -m snakeoil.dist.generate_docs --man ../ pkgcore
+ $(PYTHON) -m snakeoil.dist.generate_docs --man $(TOPDIR) $(PACKAGEDIR) pkgcore
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@for file in man/*; do \
[ -L "$${file}" ] && rm -f "$${file}" || continue; \
diff --git a/doc/conf.py b/doc/conf.py
index c65adfc9..860871a0 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -22,9 +22,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 pkgcore import __version__, const
-from snakeoil.dist.generate_docs import generate_man, generate_html
+import pkgdist
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
@@ -56,7 +54,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = 'pkgcore'
+project = pkgdist.MODULE
authors = ''
copyright = '2006-2017, pkgcore contributors'
@@ -65,7 +63,7 @@ copyright = '2006-2017, pkgcore contributors'
# built documents.
#
# The short X.Y version.
-version = __version__
+version = pkgdist.version()
# The full version, including alpha/beta/rc tags.
release = 'trunk'
@@ -105,8 +103,8 @@ pygments_style = 'sphinx'
# auto-generate required files for RTD build environment
if on_rtd:
- generate_man(project, const.DATA_PATH)
- generate_html(project, const.DATA_PATH)
+ pkgdist.generate_man()
+ pkgdist.generate_html()
# -- Options for HTML output ---------------------------------------------------