Skip to content

Commit

Permalink
BUG: Add __version__
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored and marsipu committed Nov 2, 2021
1 parent 5087ae6 commit 431ae0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions mne_qt_browser/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from ._version import __version__ # noqa
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@

readme = (pathlib.Path(__file__).parent / "README.md").read_text()

version = None
with open(pathlib.Path('mne_qt_browser') / '_version.py', 'r') as fid:
for line in (line.strip() for line in fid):
if line.startswith('__version__'):
version = line.split('=')[1].strip().strip('\'')
break
if version is None:
raise RuntimeError('Could not determine version')

setup(name='mne-qt-browser',
version='0.1.2',
version=version,
maintainer='Martin Schulz',
maintainer_email='[email protected]',
description='A new backend based on pyqtgraph for the 2D-Data-Browser '
Expand Down

0 comments on commit 431ae0e

Please sign in to comment.