Skip to content

Commit 1c79907

Browse files
committed
properly keep track of version
1 parent 8265686 commit 1c79907

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
import os
44
from setuptools import setup
5+
import simms
56

67
setup(name="simms",
7-
version="0.5.2",
8+
version=simms.__version__,
89
description="Empty MS creation tool",
910
author="Sphesihle Makhathini",
1011
author_email="Sphesihle Makhathini <sphemakh@gmail.com>",

simms/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.5.3"

simms/casasm.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ def toFloat(val):
172172
f0 = me.frequency("rest", freq0[i-1])["m0"]["value"]
173173
freq0[i] = "%fMHz"%( (f0 + df)/1e6)
174174

175-
print "<><><>", freq0, dfreq, nchan
176-
177175
for i,(freq,df,nc) in enumerate( zip(freq0,dfreq,nchan) ):
178176
sm.setspwindow(spwname = '%02d'%i,
179177
freq = freq,

simms/simms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import numpy as np
1111
import json
1212

13+
14+
1315
# I want to replace error() in argparse.ArgumentParser class
1416
# I do this so I can catch the exception raised when too few arguments
1517
# are parsed.
@@ -22,6 +24,7 @@ def error(self, message):
2224
# set simms directory
2325
simms_path = os.path.realpath(__file__)
2426
simms_path = os.path.dirname(simms_path)
27+
execfile("%s/__init__.py"%simms_path)
2528

2629
# Communication functions
2730
def info(string):
@@ -208,9 +211,6 @@ def toList(value, nchan=False):
208211

209212
def main():
210213

211-
__version_info__ = (1,0,0)
212-
__version__ = ".".join( map(str,__version_info__) )
213-
214214
for i, arg in enumerate(sys.argv):
215215
if (arg[0] == '-') and arg[1].isdigit(): sys.argv[i] = ' ' + arg
216216

0 commit comments

Comments
 (0)