From da999f730b693f0e34dd33aa49cf41707252a5c5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 24 Apr 2019 15:12:36 +0530 Subject: [PATCH] Dont assume sphinx-build is a python script Fixes #1561 --- docs/Makefile | 2 +- docs/conf.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 89d27e32b..2e07b0139 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line. SPHINXOPTS = -j auto -T $(FAIL_WARN) -SPHINXBUILD = python3 .. +launch :sphinx-build +SPHINXBUILD = sphinx-build SPHINXPROJ = kitty SOURCEDIR = . BUILDDIR = _build diff --git a/docs/conf.py b/docs/conf.py index cb22b3a28..20c0ab6a9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,11 @@ from sphinx import addnodes from sphinx.environment.adapters.toctree import TocTree from sphinx.util.logging import getLogger -from kitty.constants import str_version +kitty_src = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if kitty_src not in sys.path: + sys.path.insert(0, kitty_src) +if True: + from kitty.constants import str_version # config {{{ # -- Project information -----------------------------------------------------