summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2013-01-10 22:18:33 +0100
committerDavid Sommerseth <davids@redhat.com>2013-01-10 23:00:38 +0100
commit80609cb370b0de3c105c2855733aca86389a450e (patch)
tree84571dd3c1226ead22075a6208eb177db9700e71 /setup.py
parenta99fa86133705e63bc7183db7b287d8855c3648d (diff)
downloadrteval-80609cb370b0de3c105c2855733aca86389a450e.tar.gz
rteval-80609cb370b0de3c105c2855733aca86389a450e.tar.xz
rteval-80609cb370b0de3c105c2855733aca86389a450e.zip
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>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 30ff468..cd8d08f 100644
--- a/setup.py
+++ b/setup.py
@@ -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')