File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1212# serve to show the default.
1313
1414import sys , os
15+ import configparser
1516
1617# If extensions (or modules to document with autodoc) are in another directory,
1718# add these directories to sys.path here. If the directory is relative to the
5051# |version| and |release|, also used in various other places throughout the
5152# built documents.
5253#
53- v_globals = {}
54- v_locals = {}
55- exec (open ('../nptdms/version.py' ).read (), v_globals , v_locals )
54+ setup_cfg = configparser .ConfigParser ()
55+ setup_cfg .read ('../setup.cfg' )
5656# The short X.Y version.
57- version = '.' .join ('%d' % d for d in v_locals [ '__version_info__' ] [:2 ])
57+ version = '.' .join (setup_cfg [ 'metadata' ][ 'version' ]. split ( '.' ) [:2 ])
5858# The full version, including alpha/beta/rc tags.
59- release = v_locals [ '__version__ ' ]
59+ release = setup_cfg [ 'metadata' ][ 'version ' ]
6060
6161# The language for content autogenerated by Sphinx. Refer to documentation
6262# for a list of supported languages.
You can’t perform that action at this time.
0 commit comments