File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 2
2
This package provides the numpydoc Sphinx extension for handling docstrings
3
3
formatted according to the NumPy documentation format.
4
4
"""
5
- __version__ = '1.2.2.dev0'
5
+ from . _version import __version__
6
6
7
7
8
8
def _verify_sphinx_jinja ():
Original file line number Diff line number Diff line change
1
+ __version__ = '1.2.2.dev0'
Original file line number Diff line number Diff line change 3
3
4
4
from setuptools import setup
5
5
6
- from numpydoc import __version__ as version
6
+ # Adapted from MNE-Python (BSD)
7
+ version = None
8
+ with open (os .path .join ('numpydoc' , '_version.py' )) as fid :
9
+ for line in (line .strip () for line in fid ):
10
+ if line .startswith ('__version__' ):
11
+ version = line .split ('=' )[1 ].strip ().strip ('\' ' )
12
+ break
13
+ if version is None :
14
+ raise RuntimeError ('Could not determine version' )
7
15
8
16
if sys .version_info < (3 , 7 ):
9
17
raise RuntimeError ("Python version >= 3.7 required." )
You can’t perform that action at this time.
0 commit comments