diff options
author | David Sommerseth <davids@redhat.com> | 2013-01-10 22:06:23 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2013-01-10 22:10:07 +0100 |
commit | a99fa86133705e63bc7183db7b287d8855c3648d (patch) | |
tree | 02818b3e251faec60f6590262ef5d0c8b3504534 | |
parent | 8c0567d58fec552d160ff73c52677f7da939d454 (diff) | |
download | rteval-a99fa86133705e63bc7183db7b287d8855c3648d.tar.gz |
Put the rteval version into a separate importable file
This is to avoid having massive build requirements just to retrieve
the rteval version.
The version string is also still available via the rteval module as
well, to avoid other external implementations to fail with this change.
But that variable is basically just a "re-export" of the value found
in rteval/version.py
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | rteval.spec | 8 | ||||
-rw-r--r-- | rteval/__init__.py | 4 | ||||
-rw-r--r-- | rteval/version.py | 25 |
3 files changed, 33 insertions, 4 deletions
diff --git a/rteval.spec b/rteval.spec index 65b8fc0..7558828 100644 --- a/rteval.spec +++ b/rteval.spec @@ -3,7 +3,7 @@ Name: rteval Version: 2.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Utility to evaluate system suitability for RT Linux Group: Development/Tools @@ -43,7 +43,7 @@ Common files used by rteva, rteval-xmlrpc and rteval-parser %setup -q # version sanity check (make sure specfile and rteval.py match) -srcver=$(%{__python} -c "from rteval import RTEVAL_VERSION; print RTEVAL_VERSION") +srcver=$(%{__python} -c "from rteval.version import RTEVAL_VERSION; print RTEVAL_VERSION") if [ $srcver != %{version} ]; then printf "\n***\n*** rteval spec file version do not match the rteval/rteval.py version\n***\n\n" exit -1 @@ -86,6 +86,10 @@ rm -rf $RPM_BUILD_ROOT /usr/bin/rteval %changelog +* Thu Jan 10 2013 David Sommerseth <dazo@users.sourceforge.net> - 2.0-3 +- Separate out RTEVAL_VERSION into rteval.version, to avoid + massive BuildRequirements + * Fri Dec 21 2012 David Sommerseth <davids@redhat.com> - 2.0-2 - Split out common files into rteval-common diff --git a/rteval/__init__.py b/rteval/__init__.py index dbb6d87..a27dc35 100644 --- a/rteval/__init__.py +++ b/rteval/__init__.py @@ -40,9 +40,9 @@ from rtevalReport import rtevalReport from rtevalXMLRPC import rtevalXMLRPC from Log import Log import rtevalConfig, rtevalMailer +import version - -RTEVAL_VERSION = "2.0" +RTEVAL_VERSION = version.RTEVAL_VERSION sigint_received = False def sig_handler(signum, frame): diff --git a/rteval/version.py b/rteval/version.py new file mode 100644 index 0000000..9c80d94 --- /dev/null +++ b/rteval/version.py @@ -0,0 +1,25 @@ +# +# Copyright 2012 David Sommerseth <davids@redhat.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# For the avoidance of doubt the "preferred form" of this code is one which +# is in an open unpatent encumbered format. Where cryptographic key signing +# forms part of the process of creating an executable the information +# including keys needed to generate an equivalently functional executable +# are deemed to be part of the source code. + +RTEVAL_VERSION = '2.0' + |