From 43870c4d94b94417442eef96490ad6f9cfe70031 Mon Sep 17 00:00:00 2001 From: Pierre-Luc St-Charles Date: Wed, 17 Oct 2018 16:49:06 -0400 Subject: [PATCH] Fixup attempt for rtd run_apidoc wd --- docs/src/conf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/src/conf.py b/docs/src/conf.py index e2c0cba..a298def 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -50,13 +50,19 @@ napoleon_use_rtype = False napoleon_use_param = False +import os +on_rtd = os.environ.get('READTHEDOCS') == 'True' + def skip(app, what, name, obj, skip, options): if name == "__init__" or name == "__call__" or name == "__getitem__": return False return skip def run_apidoc(_): - argv = ["-o", "./src/", "../src/"] + if on_rtd: + argv = ["-o", ".", "../../src/"] + else: + argv = ["-o", "./src/", "../src/"] try: # Sphinx 1.7+ from sphinx.ext import apidoc