linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANNOUNCE] *** rteval-3.6 ***
@ 2023-02-21 19:58 John Kacur
  2023-02-21 19:58 ` [PATCH 12/14] rteval: Use sysconfig instead of deprecated distutils John Kacur
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: John Kacur @ 2023-02-21 19:58 UTC (permalink / raw)
  To: RT; +Cc: Clark Williams, Kate Carcia Poulin, John Kacur

I am pleased to announce version 3.6 of rteval

Some highlights of this release
- It removes the dependency on python-ethtool
- Catches any failures in python-dmidecode without failing
  Reports have also been sent upstream to fix a problem in python
  dmidecode uncovered by rteval
- Changes the default linux kernel to compile as a load to linux-6.1.8
- Removes deprecated distutils

Enjoy!

To fetch

Clone
git://git.kernel.org/pub/scm/utils/rteval/rteval.git

Branch: main
Tag: v3.6

Tarballs available here:
https://kernel.org/pub/linux/utils/rteval

Older version tarballs are available here:
https://kernel.org/pub/linux/utils/rteval/older


John Kacur (14):
  rteval: Fix "DMI WARNING" when not running as root
  rteval: Replace python-ethtool with inline code
  rteval: Don't attempt to get DMIinfo if there are dmi warnings
  rteval: rteval/__init__.py: Convert regular strings to f-strings
  rteval: rtevalReport.py: Convert regular strings to f-strings
  rteval: rtevalXMLRPC.py: Convert regular strings to f-strings
  rteval: rtevalConfig.py: Convert regular strings to f-strings
  rteval: xmlout.py: Convert to f-strings where possible
  rteval: Log.py: Convert to f-strings
  rteval: Catch failures in python-dmidecode
  rteval: Change the default kernel to compile to linux-6.1.8
  rteval: Use sysconfig instead of deprecated distutils
  rteval: setup: Remove distutils and clean-ups
  rteval: Update version number to v3.6

 Makefile                         |   2 +-
 rteval-cmd                       |   4 +-
 rteval.spec                      |   2 +-
 rteval/Log.py                    |   9 +-
 rteval/__init__.py               |  39 +++---
 rteval/modules/loads/kcompile.py |   4 +-
 rteval/rteval.conf               |   2 +-
 rteval/rtevalConfig.py           |  10 +-
 rteval/rtevalReport.py           |   6 +-
 rteval/rtevalXMLRPC.py           |  34 ++---
 rteval/sysinfo/__init__.py       |  11 +-
 rteval/sysinfo/dmi.py            |  87 +++++++-----
 rteval/sysinfo/network.py        | 117 ----------------
 rteval/sysinfo/newnet.py         | 225 +++++++++++++++++++++++++++++++
 rteval/version.py                |   2 +-
 rteval/xmlout.py                 |  10 +-
 setup.py                         |  27 ++--
 17 files changed, 359 insertions(+), 232 deletions(-)
 delete mode 100644 rteval/sysinfo/network.py
 create mode 100644 rteval/sysinfo/newnet.py

-- 
2.39.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 12/14] rteval: Use sysconfig instead of deprecated distutils
  2023-02-21 19:58 [ANNOUNCE] *** rteval-3.6 *** John Kacur
@ 2023-02-21 19:58 ` John Kacur
  2023-02-21 19:58 ` [PATCH 13/14] rteval: setup: Remove distutils and clean-ups John Kacur
  2023-02-21 19:58 ` [PATCH 14/14] rteval: Update version number to v3.6 John Kacur
  2 siblings, 0 replies; 4+ messages in thread
From: John Kacur @ 2023-02-21 19:58 UTC (permalink / raw)
  To: RT; +Cc: Clark Williams, Kate Carcia Poulin, John Kacur

Use sysconfig instead of deprecated distutils to add the
rteval directory to the module search path.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 rteval/__init__.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/rteval/__init__.py b/rteval/__init__.py
index d8127425febe..a245ef935568 100644
--- a/rteval/__init__.py
+++ b/rteval/__init__.py
@@ -37,7 +37,7 @@ import sys
 import threading
 import time
 from datetime import datetime
-from distutils import sysconfig
+import sysconfig
 from rteval.modules.loads import LoadModules
 from rteval.modules.measurement import MeasurementModules, MeasurementProfile
 from rteval.rtevalReport import rtevalReport
@@ -99,7 +99,12 @@ class RtEval(rtevalReport):
             raise RuntimeError(f"can't find XSL template ({self.__rtevcfg.xslt_report})!")
 
         # Add rteval directory into module search path
-        sys.path.insert(0, f'{sysconfig.get_python_lib()}/rteval')
+        scheme = 'rpm_prefix'
+        if scheme not in sysconfig.get_scheme_names():
+            scheme = 'posix_prefix'
+        pypath = f"{sysconfig.get_path('platlib', scheme)}/rteval"
+        sys.path.insert(0, pypath)
+        self.__logger.log(Log.DEBUG, f"Adding {pypath} to search path")
 
         # Initialise the report module
         rtevalReport.__init__(self, self.__version,
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 13/14] rteval: setup: Remove distutils and clean-ups
  2023-02-21 19:58 [ANNOUNCE] *** rteval-3.6 *** John Kacur
  2023-02-21 19:58 ` [PATCH 12/14] rteval: Use sysconfig instead of deprecated distutils John Kacur
@ 2023-02-21 19:58 ` John Kacur
  2023-02-21 19:58 ` [PATCH 14/14] rteval: Update version number to v3.6 John Kacur
  2 siblings, 0 replies; 4+ messages in thread
From: John Kacur @ 2023-02-21 19:58 UTC (permalink / raw)
  To: RT; +Cc: Clark Williams, Kate Carcia Poulin, John Kacur

Replace deprecated distutils with sysconfig and setuptools
Clean-up a few other things in the file at the same time, such as the
incorrect outdated git url.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 setup.py | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/setup.py b/setup.py
index 9a76ffbf89be..bcf7330553d4 100644
--- a/setup.py
+++ b/setup.py
@@ -1,12 +1,18 @@
 #!/usr/bin/python3
-from distutils.sysconfig import get_python_lib
-from distutils.core import setup
-from os.path import isfile, join
-import glob, os, shutil, gzip
+""" install rteval """
+import sysconfig
+from os.path import relpath
+import os
+import shutil
+import gzip
+from setuptools import setup
 
 
 # Get PYTHONLIB with no prefix so --prefix installs work.
-PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages')
+SCHEME = 'rpm_prefix'
+if SCHEME not in sysconfig.get_scheme_names():
+    SCHEME = 'posix_prefix'
+PYTHONLIB = relpath(sysconfig.get_path('platlib', SCHEME), '/usr')
 
 # Tiny hack to make rteval-cmd become a rteval when building/installing the package
 try:
@@ -28,19 +34,18 @@ 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', 'rb')
-mangz.writelines(man)
-man.close()
+with open('doc/rteval.8', 'rb') as man:
+    mangz.writelines(man)
 mangz.close()
 
 
-# Do the distutils stuff
+# Do the setup stuff
 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",
+      url = "https://git.kernel.org/pub/scm/utils/rteval/rteval.git",
       license = "GPLv2",
       long_description =
 """\
@@ -79,8 +84,6 @@ mean, variance and standard deviation) and a report is generated.
 os.unlink('dist/rteval')
 os.unlink('dist/rteval.8.gz')
 os.unlink('dist/__init__.py')
-# TODO FIX THIS, or at least find out why it was there
-#os.unlink('dist/__init__.pyc')
 
 if distcreated:
     try:
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 14/14] rteval: Update version number to v3.6
  2023-02-21 19:58 [ANNOUNCE] *** rteval-3.6 *** John Kacur
  2023-02-21 19:58 ` [PATCH 12/14] rteval: Use sysconfig instead of deprecated distutils John Kacur
  2023-02-21 19:58 ` [PATCH 13/14] rteval: setup: Remove distutils and clean-ups John Kacur
@ 2023-02-21 19:58 ` John Kacur
  2 siblings, 0 replies; 4+ messages in thread
From: John Kacur @ 2023-02-21 19:58 UTC (permalink / raw)
  To: RT; +Cc: Clark Williams, Kate Carcia Poulin, John Kacur

Update version number to v3.6

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 rteval.spec       | 2 +-
 rteval/version.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rteval.spec b/rteval.spec
index f6cacc878582..d1d9d10a461b 100644
--- a/rteval.spec
+++ b/rteval.spec
@@ -2,7 +2,7 @@
 %{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
 
 Name:		rteval
-Version:	3.5
+Version:	3.6
 Release:	1%{?dist}
 Summary:	Utility to evaluate system suitability for RT Linux
 
diff --git a/rteval/version.py b/rteval/version.py
index 3c352e16997b..bedec09c0bdf 100644
--- a/rteval/version.py
+++ b/rteval/version.py
@@ -23,4 +23,4 @@
 #   are deemed to be part of the source code.
 #
 
-RTEVAL_VERSION = '3.5'
+RTEVAL_VERSION = '3.6'
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-21 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-21 19:58 [ANNOUNCE] *** rteval-3.6 *** John Kacur
2023-02-21 19:58 ` [PATCH 12/14] rteval: Use sysconfig instead of deprecated distutils John Kacur
2023-02-21 19:58 ` [PATCH 13/14] rteval: setup: Remove distutils and clean-ups John Kacur
2023-02-21 19:58 ` [PATCH 14/14] rteval: Update version number to v3.6 John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).