diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | MANIFEST.in | 2 | ||||
-rw-r--r-- | setup.py | 40 |
3 files changed, 37 insertions, 6 deletions
@@ -20,3 +20,4 @@ missing build rpm* usr +dist/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..93b51a4 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include COPYING MANIFEST.in rteval-cmd +exclude dist/rteval @@ -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 |