Skip to content

Commit e1fe2ae

Browse files
committed
Attempt to fix readthedocs build
1 parent 22b4e29 commit e1fe2ae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# serve to show the default.
1313

1414
import 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
@@ -50,13 +51,12 @@
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.

0 commit comments

Comments
 (0)