[llvm] [Dexter] Add basic structured script parsing (PR #193710)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 07:53:43 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:
----------------
SLTozer wrote:
Correct, there's no risk here as I understand it - `packaging` doesn't invoke `pip` for anything AFAIUI, it's just for processing package requirements, and happens to be where some of the `distutils` utilities for inspecting available (i.e. installed, on-disk) packages ended up.
https://github.com/llvm/llvm-project/pull/193710
More information about the llvm-commits
mailing list