Skip to content

Commit

Permalink
doc: use version from importlib
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Jul 4, 2024
1 parent 9f94baa commit da08727
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os
from importlib import metadata
from urllib.request import urlopen

_conf_url = \
Expand All @@ -7,13 +7,8 @@
exec(compile(_inf.read(), _conf_url, "exec"), globals())

copyright = "2013-21, Andreas Kloeckner and contributors"

os.environ["AKPYTHON_EXEC_FROM_WITHIN_WITHIN_SETUP_PY"] = "1"
ver_dic = {}
exec(compile(open("../pytential/version.py").read(),
"../pytential/version.py", "exec"), ver_dic)
version = ".".join(str(x) for x in ver_dic["VERSION"])
release = ver_dic["VERSION_TEXT"]
release = metadata.version("pytential")
version = ".".join(release.split(".")[:2])

autodoc_type_aliases = {
"GeometryLike": "pytential.collection.GeometryLike",
Expand Down

0 comments on commit da08727

Please sign in to comment.