diff options
author | David Sommerseth <davids@redhat.com> | 2012-12-21 17:54:36 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2012-12-21 17:54:36 +0100 |
commit | 406c2abb8071de61e910db6a487472f7aa4ee632 (patch) | |
tree | 578dc95fe6975059b506a19c0cecfb2da4173c8a | |
parent | 635fbad9b5bb5b6f723996cc9861bc90d3769aa1 (diff) | |
download | rteval-406c2abb8071de61e910db6a487472f7aa4ee632.tar.gz rteval-406c2abb8071de61e910db6a487472f7aa4ee632.tar.xz rteval-406c2abb8071de61e910db6a487472f7aa4ee632.zip |
Make distutils package the doc/ dir and compress man page on install
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | MANIFEST.in | 3 | ||||
-rw-r--r-- | setup.py | 16 |
2 files changed, 16 insertions, 3 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index 93b51a4..94c1b6d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include COPYING MANIFEST.in rteval-cmd -exclude dist/rteval +recursive-include doc/ *.? *.txt +exclude dist/rteval dist/rteval.8.gz @@ -2,7 +2,7 @@ from distutils.sysconfig import get_python_lib from distutils.core import setup from os.path import isfile, join -import glob, os, shutil +import glob, os, shutil, gzip from rteval import RTEVAL_VERSION @@ -21,6 +21,15 @@ except OSError, e: raise e shutil.copy('rteval-cmd','dist/rteval') +# 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') +mangz.writelines(man) +man.close() +mangz.close() + + +# Do the distutils stuff setup(name="rteval", version = RTEVAL_VERSION, description = "Evaluate system performance for Realtime", @@ -54,13 +63,16 @@ mean, variance and standard deviation) and a report is generated. data_files = [("share/rteval", ["rteval/rteval_dmi.xsl", "rteval/rteval_histogram_raw.xsl", "rteval/rteval_text.xsl"]), - ("/etc", ["rteval.conf"]) + ("/etc", ["rteval.conf"]), + ("share/man/man8", ["dist/rteval.8.gz"]) ], scripts = ["dist/rteval"] ) + # Clean-up from our little hack os.unlink('dist/rteval') +os.unlink('dist/rteval.8.gz') if distcreated: try: os.rmdir('dist') |