diff options
author | David Sommerseth <davids@redhat.com> | 2012-12-21 16:54:08 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2012-12-21 17:25:20 +0100 |
commit | bb08642503e6e1635277cffaabcb95c346cc6a31 (patch) | |
tree | a61c1322273ca4025d8ab908ea2275db9d7d9dab /setup.py | |
parent | 71b5ce0b05bf3c4583f01036213c558a1e75e951 (diff) | |
download | rteval-bb08642503e6e1635277cffaabcb95c346cc6a31.tar.gz rteval-bb08642503e6e1635277cffaabcb95c346cc6a31.tar.xz rteval-bb08642503e6e1635277cffaabcb95c346cc6a31.zip |
Updated python setup.py to package rteval better
This only takes care of the rteval measurement stuff, it does not account
for the XML-RPC server side at all.
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 40 |
1 files changed, 34 insertions, 6 deletions
@@ -4,21 +4,29 @@ from distutils.core import setup from os.path import isfile, join import glob, os, shutil from rteval import RTEVAL_VERSION -from rteval.sysinfo import dmi # Just to get rid of a warning + # Get PYTHONLIB with no prefix so --prefix installs work. PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages') - -# DMI module might be loaded, so ignore any warnings it may have -dmi.ProcessWarnings() - +# Tiny hack to make rteval-cmd become a rteval when building/installing the package +try: + os.mkdir('dist', 0755) + distcreated = True +except OSError, e: + if e.errno == 17: + # If it already exists, ignore this error + distcreated = False + else: + raise e +shutil.copy('rteval-cmd','dist/rteval') setup(name="rteval", version = RTEVAL_VERSION, description = "Evaluate system performance for Realtime", author = "Clark Williams, David Sommerseth", author_email = "williams@redhat.com, davids@redhat.com", + url = "https://git.kernel.org/?p=linux/kernel/git/clrkwllms/rteval.git;a=summary", license = "GPLv2", long_description = """\ @@ -37,5 +45,25 @@ mean, variance and standard deviation) and a report is generated. "rteval.modules.loads", "rteval.modules.measurement", "rteval.sysinfo"], - scripts = ["rteval-cmd"], + package_dir = { "rteval": "rteval", + "rteval.modules": "rteval/modules", + "rteval.modules.loads": "rteval/modules/loads", + "rteval.modules.measurement": "rteval/modules/measurement", + "rteval.sysinfo": "rteval/sysinfo" + }, + data_files = [("share/rteval", ["rteval/rteval_dmi.xsl", + "rteval/rteval_histogram_raw.xsl", + "rteval/rteval_text.xsl"]), + ("/etc", ["rteval.conf"]) + ], + scripts = ["dist/rteval"] ) + +# Clean-up from our little hack +os.unlink('dist/rteval') +if distcreated: + try: + os.rmdir('dist') + except OSError: + # Ignore any errors + pass |