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.