Skip to content

Commit dfbf885

Browse files
authored
tag version 0.5 (#31)
1 parent a631828 commit dfbf885

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

setup.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,47 @@
11
import os
22
from setuptools import setup, Command
33

4+
45
# Utility function to read the README file.
56
# Used for the long_description. It's nice, because now 1) we have a top level
67
# README file and 2) it's easier to type in the README file than to put a raw
78
# string in below ...
89
def read(fname):
910
return open(os.path.join(os.path.dirname(__file__), fname)).read()
1011

12+
# get the version (don't import mne here, so dependencies are not needed)
13+
version = None
14+
with open(os.path.join('stormdb', '__init__.py'), 'r') as fid:
15+
for line in (line.strip() for line in fid):
16+
if line.startswith('__version__'):
17+
version = line.split('=')[1].strip().strip('\'')
18+
break
19+
if version is None:
20+
raise RuntimeError('Could not determine version')
21+
22+
1123
class CleanCommand(Command):
1224
"""Custom clean command to tidy up the project root."""
1325
user_options = []
26+
1427
def initialize_options(self):
1528
pass
29+
1630
def finalize_options(self):
1731
pass
32+
1833
def run(self):
1934
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')
2035

2136
setup(
22-
name = "stormdb",
23-
version = "0.5",
24-
author = "Christopher Bailey",
25-
author_email = "cjb@cfin.au.dk",
26-
description = ("Tools for accessing StormDb @ CFIN"),
27-
license = "BSD",
28-
keywords = "code",
29-
url = "https://github.com/meeg-cfin/stormdb-python.git",
37+
name="stormdb",
38+
version=version,
39+
author="Christopher Bailey",
40+
author_email="cjb@cfin.au.dk",
41+
description=("Tools for accessing StormDb @ CFIN"),
42+
license="BSD",
43+
keywords="code",
44+
url="https://github.com/meeg-cfin/stormdb-python.git",
3045
packages=['stormdb'],
3146
scripts=['bin/submit_to_cluster'],
3247
long_description=read('README.md'),

0 commit comments

Comments
 (0)