From ec9850a12818d9c91d73372dccf83776449be5cc Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Thu, 30 Apr 2015 14:26:17 +0200 Subject: updated version in setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 289d521..e35123f 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ to compile cython files: python setup.py build_ext --inplace -Copyright 2014, Mario Mulansky +Copyright 2014-2015, Mario Mulansky Distributed under the BSD License @@ -46,7 +46,7 @@ elif use_c: # c files are there, compile to binaries setup( name='pyspike', packages=find_packages(exclude=['doc']), - version='0.1.3', + version='0.2.0', cmdclass=cmdclass, ext_modules=ext_modules, include_dirs=[numpy.get_include()], -- cgit v1.2.3 From 7757dc01e2d6020e0f6d6e44afdb734e61ef3c9c Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Thu, 30 Apr 2015 17:23:06 +0200 Subject: addresses #5 - added __version__ property --- pyspike/__init__.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pyspike/__init__.py b/pyspike/__init__.py index a5f9f0a..3e836bd 100644 --- a/pyspike/__init__.py +++ b/pyspike/__init__.py @@ -23,3 +23,22 @@ from psth import psth from spikes import load_spike_trains_from_txt, spike_train_from_string, \ merge_spike_trains, generate_poisson_spikes + + +# define the __version__ following +# http://stackoverflow.com/questions/17583443 +from pkg_resources import get_distribution, DistributionNotFound +import os.path + +try: + _dist = get_distribution('pyspike') + # Normalize case for Windows systems + dist_loc = os.path.normcase(_dist.location) + here = os.path.normcase(__file__) + if not here.startswith(os.path.join(dist_loc, 'pyspike')): + # not installed, but there is another version that *is* + raise DistributionNotFound +except DistributionNotFound: + __version__ = 'Please install this project with setup.py' +else: + __version__ = _dist.version -- cgit v1.2.3 From a718911ba2aac9302465c0522cc18b4470b99f77 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 4 May 2015 10:46:17 +0200 Subject: added pypi badge --- Readme.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Readme.rst b/Readme.rst index e80c0f7..f50b12b 100644 --- a/Readme.rst +++ b/Readme.rst @@ -1,6 +1,8 @@ PySpike ======= +.. image:: https://badge.fury.io/py/pyspike.png + :target: http://badge.fury.io/py/pyspike .. image:: https://travis-ci.org/mariomulansky/PySpike.svg?branch=master :target: https://travis-ci.org/mariomulansky/PySpike -- cgit v1.2.3