summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 1fadda7..20bfe0f 100644
--- a/setup.py
+++ b/setup.py
@@ -30,9 +30,17 @@
from setuptools import setup
+def get_version():
+ """ Parse __init__.py to find the package version """
+ for line in open("pyipmi/__init__.py"):
+ key, delim, value = line.partition("=")
+ if key.strip() == "__version__" and delim == "=":
+ return value.strip().strip("'\"")
+ raise Exception("Failed to parse pyipmi package version from __init__.py")
+
setup(
name='pyipmi',
- version='0.9.0',
+ version=get_version(),
packages=['pyipmi',
'pyipmi.commands',
'pyipmi.tools'],