summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
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')