From dd374ea0ef2193113f6d6c45201e3a482d20a3b1 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Thu, 23 May 2024 17:49:45 +0000 Subject: [PATCH] remove use of distutils package entirely to avoid future deprecation issues Signed-off-by: Karl W. Schulz [ROCm/rocprofiler-compute commit: 7a01f499d708f20dde539f2ea6ad10b5dc3948cf] --- projects/rocprofiler-compute/src/omniperf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/rocprofiler-compute/src/omniperf b/projects/rocprofiler-compute/src/omniperf index ccad599829..6977b54cb5 100755 --- a/projects/rocprofiler-compute/src/omniperf +++ b/projects/rocprofiler-compute/src/omniperf @@ -30,7 +30,6 @@ import sys from pip._internal.req import parse_requirements from pathlib import Path from importlib import import_module, metadata -from distutils import text_file import re try: @@ -65,9 +64,10 @@ def verify_deps(): for location in depsLocation: checkFile = os.path.join(bindir, location) if os.path.exists(checkFile): - dependencies = text_file.TextFile(checkFile).readlines() - error = False + with open(checkFile, "r") as file_in: + dependencies = file_in.read().splitlines() + error = False version_pattern = r"^([^=<>]+)([=<>]+)(.*)$" for dependency in dependencies: