File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 10
10
# All configuration values have a default; values that are commented out
11
11
# serve to show the default.
12
12
13
+ import pathlib
14
+ import re
15
+
16
+
17
+ def get_version ():
18
+ path = pathlib .Path (__file__ ).parent .parent / "wtforms_components" / "__init__.py"
19
+ contents = path .read_text ()
20
+ pattern = r'^__version__ = "(.*?)"$'
21
+ return re .search (pattern , contents , re .MULTILINE ).group (1 )
22
+
13
23
14
24
# If extensions (or modules to document with autodoc) are in another directory,
15
25
# add these directories to sys.path here. If the directory is relative to the
54
64
# built documents.
55
65
#
56
66
# The short X.Y version.
57
- version = "0.1"
67
+ version = get_version ()
58
68
# The full version, including alpha/beta/rc tags.
59
- release = "0.1"
69
+ release = version
60
70
61
71
# The language for content autogenerated by Sphinx. Refer to documentation
62
72
# for a list of supported languages.
You can’t perform that action at this time.
0 commit comments