Skip to content

Commit

Permalink
conf.py: make sure the version file is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Apr 28, 2024
1 parent 4ecbeca commit 1df0c19
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
copyright = "2014-21, Meshmode contributors"

ver_dic = {}
exec(
compile(
open("../meshmode/version.py").read(), "../meshmode/version.py", "exec"),
ver_dic)
with open("../meshmode/version.py") as _inf:
exec(compile(_inf.read(), "../meshmode/version.py", "exec"), ver_dic)

version = ".".join(str(x) for x in ver_dic["VERSION"])
# The full version, including alpha/beta/rc tags.
release = ver_dic["VERSION_TEXT"]
Expand Down

0 comments on commit 1df0c19

Please sign in to comment.