Skip to content

Commit 85b7650

Browse files
committed
pkg version variable added
1 parent cce0378 commit 85b7650

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

numpy_fracdiff/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
__version__ = '0.3.2'
2+
13
from .fracdiff_fn import fracdiff

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
import pypandoc
33

44

5+
def get_version(path):
6+
with open(path, "r") as fp:
7+
lines = fp.read()
8+
for line in lines.split("\n"):
9+
if line.startswith('__version__'):
10+
delim = '"' if '"' in line else "'"
11+
return line.split(delim)[1]
12+
raise RuntimeError("Unable to find version string.")
13+
14+
515
setup(name='numpy-fracdiff',
6-
version='0.3.1',
16+
version=get_version("numpy_fracdiff/__init__.py"),
717
description='Fractional Difference for Time Series',
818
long_description=pypandoc.convert('README.md', 'rst'),
919
url='http://github.com/ulf1/numpy-fracdiff',

0 commit comments

Comments
 (0)