setup.py: Check for version in env var

In order to allow the python package to have incrementing versions
without having to change the version manually every time the code
changes, check for the version to use in a PELTOOL_VERSION environment
variable.  If it isn't present, just use a default version of 1.0.

The plan is that build tools will call setup.py with the env var set to
a version based on the tag of the openbmc build they are being pulled
into.  This has the added bonus that it allows people to know which BMC
code level the tool matches up with.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia736d9ff2029b120235d3ef57d561ba43e75fe2a
diff --git a/xml/setup.py b/xml/setup.py
index 23a9539..15b6496 100644
--- a/xml/setup.py
+++ b/xml/setup.py
@@ -52,7 +52,7 @@
 
 setup(
     name         = 'openpower-hw-diags-pel-parser-data',
-    version      = '0.1',
+    version      = os.getenv('PELTOOL_VERSION', '1.0'),
     classifiers  = [ 'License :: OSI Approved :: Apache Software License' ],
     cmdclass     = { 'build_py': my_build_py }, # register custom build class
     packages     = [ package_name ],