Skip to content

Commit

Permalink
MAINT: Fix setup (#945)
Browse files Browse the repository at this point in the history
* MAINT: Fix setup

* FIX: Remove attr

* FIX: Bad parse
  • Loading branch information
larsoner authored Jan 18, 2022
1 parent 31a870e commit 2bb880a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[metadata]
name = mne-bids
version = attr: mne_bids.__version__
url = https://github.com/mne-tools/mne-bids
author = mne-bids developers
maintainer = Mainak Jas
Expand Down
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@
# This enables setuptools to install wheel on-the-fly
SETUP_REQUIRES += ["wheel"] if "bdist_wheel" in sys.argv else []

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


if __name__ == "__main__":
setup(
version=version,
setup_requires=SETUP_REQUIRES,
)

0 comments on commit 2bb880a

Please sign in to comment.