From f231bb2bbbbbc96bfdf3afdb56acb66baeff9699 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 14 Aug 2024 09:18:51 +0100 Subject: [PATCH] Fix version number in built docs (#2044) --- docs/conf.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 048e77f51d..886160382f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,11 +16,8 @@ import os import sys -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. +from importlib.metadata import version as get_version + import zarr # If extensions (or modules to document with autodoc) are in another directory, @@ -75,9 +72,8 @@ copyright = "2024, Zarr Developers" author = "Zarr Developers" -version = zarr.__version__ -# The full version, including alpha/beta/rc tags. -release = zarr.__version__ +version = get_version("zarr") +release = get_version("zarr") # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.