Skip to content

Commit

Permalink
doc: get release version from metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Mar 1, 2023
1 parent c0229dc commit e953242
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys

sys.path.insert(0, os.path.abspath("../src"))

try:
import importlib.metadata as importlib_metadata
except ModuleNotFoundError:
import importlib_metadata

# -- Project information -----------------------------------------------------

Expand All @@ -23,8 +22,7 @@
author = "Frost Ming"

# The full version, including alpha/beta/rc tags
release = "0.7.0"

release = importlib_metadata.version("unearth")

# -- General configuration ---------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ sphinx
myst-parser
sphinx-copybutton
sphinx-argparse
importlib-metadata ; python_version < "3.8"
.

0 comments on commit e953242

Please sign in to comment.