Skip to content

Commit 15c8a0e

Browse files
committed
Add __version_info__ as a tuple-based version identifier
1 parent e69e2e6 commit 15c8a0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@
115115
# this is computed based on the number of commits since the last tag.
116116
from ._version import get_versions
117117
__version__ = str(get_versions()['version'])
118+
raise ValueError(__version__)
119+
__version_info__ = tuple(
120+
map(int, re.match(r'^(\d+)\.(\d+)\.(\d+)', __version__).groups()))
121+
118122
del get_versions
119123

120124
_log = logging.getLogger(__name__)

0 commit comments

Comments
 (0)