diff options
author | Michal Minar <miminar@redhat.com> | 2013-10-23 08:06:52 +0200 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-10-24 10:28:30 +0200 |
commit | 82c2688adeda9286de8819a254c7d0ca1ef0669f (patch) | |
tree | 8d2628262c4f9b268d204eefae62a30158ba7a69 /src/python | |
parent | 74068b042909f529d878daa6a3cd85eee7ca4f8c (diff) | |
download | openlmi-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/python')
-rw-r--r-- | src/python/lmi/base/__init__.py | 5 | ||||
-rw-r--r-- | src/python/lmi/base/__init__.skel | 23 | ||||
-rw-r--r-- | src/python/setup.py | 4 |
3 files changed, 28 insertions, 4 deletions
diff --git a/src/python/lmi/base/__init__.py b/src/python/lmi/base/__init__.py index c3b443f..6525ea3 100644 --- a/src/python/lmi/base/__init__.py +++ b/src/python/lmi/base/__init__.py @@ -1,5 +1,3 @@ -# Software Management Providers -# # Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved. # # This library is free software; you can redistribute it and/or @@ -18,7 +16,8 @@ # # Authors: Michal Minar <miminar@redhat.com> # - """ Common utilities for OpenLMI python projects. """ + +__version__ = "0.3.0" diff --git a/src/python/lmi/base/__init__.skel b/src/python/lmi/base/__init__.skel new file mode 100644 index 0000000..455ab50 --- /dev/null +++ b/src/python/lmi/base/__init__.skel @@ -0,0 +1,23 @@ +# Copyright (C) 2012-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: Michal Minar <miminar@redhat.com> +# +""" +Common utilities for OpenLMI python projects. +""" + +__version__ = "@OPENLMI_VERSION@" diff --git a/src/python/setup.py b/src/python/setup.py index 21cb9cb..a5a834e 100644 --- a/src/python/setup.py +++ b/src/python/setup.py @@ -1,11 +1,13 @@ from setuptools import setup +from lmi.base import __version__ + setup( name='openlmi', description='OpenLMI python providers', author='Michal Minar', author_email='miminar@redhat.com', url='https://fedorahosted.org/openlmi/', - version='0.3.0', + version=__version__, license='LGPLv2+', namespace_packages = ['lmi'], packages = ['lmi', 'lmi.base', 'lmi.providers'], |