summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2015-08-17 21:33:00 -0500
committerDavid McMackins II <contact@mcmackins.org>2015-08-17 21:33:00 -0500
commita6f8d6bac41da5f520706c07ec1ce7193a638b65 (patch)
treecdb4ca400b011d142bba2151baab47004819f4bb
parentce38fbffb741f5d38787ce3541f08e0f52848392 (diff)
Added version to source
-rw-r--r--coinfetchapi.py2
-rw-r--r--setup.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/coinfetchapi.py b/coinfetchapi.py
index 7eed83d..0ea809f 100644
--- a/coinfetchapi.py
+++ b/coinfetchapi.py
@@ -20,6 +20,8 @@ from requests import get
from getopt import getopt
from sys import stderr
+__version__ = '4.1.1'
+
USAGE_INFO = '''
USAGE: coinfetch [OPTIONS] [AMOUNT] FROM TO
diff --git a/setup.py b/setup.py
index 9bb0579..ef6ca41 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,14 @@
+import re
from setuptools import setup
+version = ''
+with open('coinfetchapi.py', 'r') as f:
+ version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
+ f.read(), re.MULTILINE).group(1)
+
setup(
name = 'coinfetch',
- version = '4.1.1',
+ version = version,
scripts = ['coinfetch', 'bterfetch', 'cccfetch'],
py_modules = ['coinfetchapi'],