From dd12dbf8c224977663c612622b160e97067270bc Mon Sep 17 00:00:00 2001 From: Rolf Krahl Date: Sat, 2 Dec 2023 20:20:05 +0100 Subject: [PATCH] Minor fixes for documentation build: - Don't need to set PYTHONPATH - Import source from build/lib - Don't write byte code --- Makefile | 8 ++++---- doc/src/conf.py | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b4c7e04..e56bf56 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,11 @@ test: sdist: $(PYTHON) setup.py sdist -doc-html: meta - $(MAKE) -C doc html PYTHONPATH=$(CURDIR) +doc-html: build + $(MAKE) -C doc html -doc-man: meta - $(MAKE) -C doc man PYTHONPATH=$(CURDIR) +doc-man: build + $(MAKE) -C doc man clean: rm -rf build diff --git a/doc/src/conf.py b/doc/src/conf.py index 6adbd49..7ae9635 100644 --- a/doc/src/conf.py +++ b/doc/src/conf.py @@ -10,9 +10,11 @@ import sys maindir = Path(__file__).resolve().parent.parent.parent -sys.path[0] = str(maindir) +buildlib = maindir / "build" / "lib" +sys.path[0] = str(buildlib) +sys.dont_write_bytecode = True -import _meta +import archive # -- Project information ----------------------------------------------------- @@ -22,7 +24,7 @@ author = 'Rolf Krahl' # The full version, including alpha/beta/rc tags -release = _meta.__version__ +release = archive.__version__ # The short X.Y version version = ".".join(release.split(".")[0:2])