summaryrefslogtreecommitdiffstats
path: root/src/pcp
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-10-23 08:06:52 +0200
committerMichal Minar <miminar@redhat.com>2013-10-24 10:28:30 +0200
commit82c2688adeda9286de8819a254c7d0ca1ef0669f (patch)
tree8d2628262c4f9b268d204eefae62a30158ba7a69 /src/pcp
parent74068b042909f529d878daa6a3cd85eee7ca4f8c (diff)
downloadopenlmi-providers-82c2688adeda9286de8819a254c7d0ca1ef0669f.tar.gz
openlmi-providers-82c2688adeda9286de8819a254c7d0ca1ef0669f.tar.xz
openlmi-providers-82c2688adeda9286de8819a254c7d0ca1ef0669f.zip
python: let's not hardcode version in setups
Let's write openlmi version to the main __init__ module of each python egg at build time. This version information is easily accessible from setup scripts.
Diffstat (limited to 'src/pcp')
-rw-r--r--src/pcp/lmi/pcp/__init__.py3
-rw-r--r--src/pcp/lmi/pcp/__init__.skel26
-rw-r--r--src/pcp/setup.py4
3 files changed, 31 insertions, 2 deletions
diff --git a/src/pcp/lmi/pcp/__init__.py b/src/pcp/lmi/pcp/__init__.py
index 81de2e5..db421b6 100644
--- a/src/pcp/lmi/pcp/__init__.py
+++ b/src/pcp/lmi/pcp/__init__.py
@@ -18,8 +18,9 @@
#
# Authors: Frank Ch. Eigler <fche@redhat.com>
#
-
"""
CIM providers for PCP metrics.
Part of OpenLMI project.
"""
+
+__version__ = "0.3.0"
diff --git a/src/pcp/lmi/pcp/__init__.skel b/src/pcp/lmi/pcp/__init__.skel
new file mode 100644
index 0000000..2d5b613
--- /dev/null
+++ b/src/pcp/lmi/pcp/__init__.skel
@@ -0,0 +1,26 @@
+# PCP bridge Providers
+#
+# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Authors: Frank Ch. Eigler <fche@redhat.com>
+#
+"""
+CIM providers for PCP metrics.
+Part of OpenLMI project.
+"""
+
+__version__ = "@OPENLMI_VERSION@"
diff --git a/src/pcp/setup.py b/src/pcp/setup.py
index 27a6404..8995892 100644
--- a/src/pcp/setup.py
+++ b/src/pcp/setup.py
@@ -1,11 +1,13 @@
from setuptools import setup
+from lmi.pcp import __version__
+
setup(
name='openlmi-pcp',
description='PCP metric providers',
author='Frank Ch. Eigler',
author_email='fche@redhat.com',
url='https://fedorahosted.org/openlmi/',
- version='0.3.0',
+ version=__version__,
namespace_packages=['lmi'],
packages=[
'lmi',