From b5ea392f79205b20c8ecf794fe67d23311a4e225 Mon Sep 17 00:00:00 2001 From: Jesse Nusbaumer Date: Mon, 16 Oct 2023 14:36:50 -0600 Subject: [PATCH] Remove deprecated 'distutils' package from ParamGen. --- CIME/ParamGen/paramgen.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CIME/ParamGen/paramgen.py b/CIME/ParamGen/paramgen.py index 4fa6221f06e..188b954bd31 100644 --- a/CIME/ParamGen/paramgen.py +++ b/CIME/ParamGen/paramgen.py @@ -4,6 +4,7 @@ from copy import deepcopy import logging import subprocess +import shutil try: from paramgen_utils import is_logical_expr, is_formula, has_unexpanded_var @@ -136,9 +137,7 @@ def from_xml_nml(cls, input_path, match="last", no_duplicates=False): """ # First check whether the given xml file conforms to the entry_id_pg.xsd schema - from distutils.spawn import find_executable - - xmllint = find_executable("xmllint") + xmllint = shutil.which("xmllint") if xmllint is None: logger.warning("Couldn't find xmllint. Skipping schema check") else: