diff --git a/doc/conf.py b/doc/conf.py index f3bada8d5cc..0d7a78d5c0e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -22,18 +22,14 @@ os.symlink('../../deps/swagger-ui/dist/swagger-ui.css', '.sphinx/_static/swagger-ui/swagger-ui.css') ### MAN PAGES ### -# Find path to incus client (different for local builds and on RTD) -if ("LOCAL_SPHINX_BUILD" in os.environ and - os.environ["LOCAL_SPHINX_BUILD"] == "True"): - path = str(subprocess.check_output(['go', 'env', 'GOPATH'], encoding="utf-8").strip()) - incus = os.path.join(path, 'bin', 'incus') - if os.path.isfile(incus): - print("Using " + incus + " to generate man pages.") - else: - print("Cannot find incus in " + incus) - exit(2) +# Find the path to the incus binary +path = str(subprocess.check_output(['go', 'env', 'GOPATH'], encoding="utf-8").strip()) +incus = os.path.join(path, 'bin', 'incus') +if os.path.isfile(incus): + print("Using " + incus + " to generate man pages.") else: - incus = "../incus.bin" + print("Cannot find incus in " + incus) + exit(2) # Generate man pages content os.makedirs('.sphinx/deps/manpages', exist_ok=True)