diff options
author | David Sommerseth <davids@redhat.com> | 2013-01-10 22:18:33 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2013-01-10 23:00:38 +0100 |
commit | 80609cb370b0de3c105c2855733aca86389a450e (patch) | |
tree | 84571dd3c1226ead22075a6208eb177db9700e71 | |
parent | a99fa86133705e63bc7183db7b287d8855c3648d (diff) | |
download | rteval-80609cb370b0de3c105c2855733aca86389a450e.tar.gz |
rteval.spec: Added missing new files (version.py*)
These files was added by commit a99fa86133705e63bc7183db7b287d8855c3648d
Also added some more tweaks to avoid importing libxml2 and other
python modules. These modules might not be available on the build box,
and shouldn't be needed when building and packaging rteval.
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | rteval.spec | 7 | ||||
-rw-r--r-- | setup.py | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/rteval.spec b/rteval.spec index 7558828..4620ca7 100644 --- a/rteval.spec +++ b/rteval.spec @@ -43,7 +43,9 @@ 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.version import RTEVAL_VERSION; print RTEVAL_VERSION") +cp rteval/version.py rtevalversion.py +srcver=$(%{__python} -c "from rtevalversion import RTEVAL_VERSION; print RTEVAL_VERSION") +rm -rf rtevalversion.py if [ $srcver != %{version} ]; then printf "\n***\n*** rteval spec file version do not match the rteval/rteval.py version\n***\n\n" exit -1 @@ -64,6 +66,7 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/rteval/rtevalclient.py* %{python_sitelib}/rteval/rtevalConfig.py* %{python_sitelib}/rteval/rtevalXMLRPC.py* +%{python_sitelib}/rteval/version.py* %{python_sitelib}/rteval/Log.py* @@ -86,7 +89,7 @@ rm -rf $RPM_BUILD_ROOT /usr/bin/rteval %changelog -* Thu Jan 10 2013 David Sommerseth <dazo@users.sourceforge.net> - 2.0-3 +* Thu Jan 10 2013 David Sommerseth <davids@redhat.com> - 2.0-3 - Separate out RTEVAL_VERSION into rteval.version, to avoid massive BuildRequirements @@ -3,7 +3,6 @@ from distutils.sysconfig import get_python_lib from distutils.core import setup from os.path import isfile, join import glob, os, shutil, gzip -from rteval import RTEVAL_VERSION # Get PYTHONLIB with no prefix so --prefix installs work. @@ -21,6 +20,12 @@ except OSError, e: raise e shutil.copy('rteval-cmd','dist/rteval') +# Hack to avoid importing libxml2 and a lot of other stuff +# when getting the rteval version. These are modules which +# might not be available on the build box. +shutil.copy('rteval/version.py','dist/__init__.py') +from dist import RTEVAL_VERSION + # Compress the man page, so distutil will only care for the compressed file mangz = gzip.GzipFile('dist/rteval.8.gz', 'w', 9) man = open('doc/rteval.8', 'r') @@ -73,6 +78,9 @@ mean, variance and standard deviation) and a report is generated. # Clean-up from our little hack os.unlink('dist/rteval') os.unlink('dist/rteval.8.gz') +os.unlink('dist/__init__.py') +os.unlink('dist/__init__.pyc') + if distcreated: try: os.rmdir('dist') |