[llvm] [Dexter] Add basic structured script parsing (PR #193710)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 07:31:37 PDT 2026


================
@@ -110,6 +110,49 @@ def get_required_attr(config, attr_name):
     config.available_features.add("llvm-ar")
 
 
+def check_dexter_requirements():
+    # Determine whether Dexter's dependencies are available, and disable Dexter tests if not.
+    dexter_requirements_path = os.path.join(
+        config.cross_project_tests_src_root,
+        "debuginfo-tests",
+        "dexter",
+        "requirements.txt",
+    )
+    if not os.path.isfile(dexter_requirements_path):
+        print(
+            f"Couldn't find Dexter requirements path at existed path: {dexter_requirements_path}"
+        )
+        return False
+    with open(dexter_requirements_path) as req:
+        requirements_list = [
+            req_str
+            for req_line in req
+            if (req_str := req_line.strip()) and not req_str.startswith("#")
+        ]
+    try:
+        from packaging.requirements import Requirement
+        from importlib.metadata import version
+    except Exception as e:
----------------
jmorse wrote:

Also an area I'm not familiar with, so stupid question: this has no risk of causing some kind of side-effect on the machine, right? Such as opening a connection, or otherwise causing the python package manager to do something other that list packages.

https://github.com/llvm/llvm-project/pull/193710


More information about the llvm-commits mailing list