Skip to content

Commit 0d9b761

Browse files
committed
Replace VERSION file with version.py for version metadata in docs
1 parent f3d9af1 commit 0d9b761

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/source/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys
1615
import os
16+
import sys
1717

1818
# If extensions (or modules to document with autodoc) are in another directory,
1919
# add these directories to sys.path here. If the directory is relative to the
@@ -57,8 +57,9 @@
5757
# built documents.
5858
#
5959
# The short X.Y version.
60-
with open(os.path.join('../../jwcrypto', 'VERSION')) as verfile:
61-
version = verfile.read().strip()
60+
with open(os.path.join('../../jwcrypto', 'version.py')) as verfile:
61+
version_string = verfile.read().strip()
62+
version = version_string.strip("=")[-1].strip()
6263
# The full version, including alpha/beta/rc tags.
6364
release = version
6465

0 commit comments

Comments
 (0)