From fd81d62a1a0d15cad02eafedf11695c594f369af Mon Sep 17 00:00:00 2001 From: Zedas <75276424+Zedas030@users.noreply.github.com> Date: Mon, 23 Nov 2026 22:01:41 +0100 Subject: [PATCH] Install the package for the readthedocs build (#1853) --- .readthedocs.yml | 3 ++- docs/source/conf.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 9c3144b9..7cfe4697 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,6 +4,7 @@ formats: all sphinx: configuration: docs/source/conf.py + fail_on_warning: true build: @@ -13,6 +14,6 @@ build: jobs: install: - pip install --upgrade pip - - pip install --group 'docs' + - pip install . --group 'docs' pre_build: - python -m sphinx -b linkcheck docs/source/ $READTHEDOCS_OUTPUT/linkcheck diff --git a/docs/source/conf.py b/docs/source/conf.py index 03e44d95..bea0bac8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,6 +12,7 @@ # import os import sys +from importlib.metadata import version as package_version sys.path.insert(0, os.path.abspath("..")) # Will find modules in the docs parent @@ -21,6 +22,8 @@ sys.path.insert(0, os.path.abspath("..")) # Will find modules in the docs paren project = "python-kasa" copyright = "2020, python-kasa developers" author = "python-kasa developers" +release = package_version("python-kasa") +version = release # -- General configuration ---------------------------------------------------