From a3dbbae86166743125f15b89629eb140470ca15f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 7 Nov 2024 17:46:37 +0100 Subject: [PATCH] Use .lower() when checking whether the current dir is a typical include or lib dir --- lib/spack/llnl/util/filesystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 9f1591541bc..98953c5a95f 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -2177,7 +2177,7 @@ def find_headers( if max_depth is None: max_depth = 2 - if os.path.basename(root) != "include": + if os.path.basename(root).lower() != "include": root = os.path.join(root, "include") max_depth -= 1 @@ -2437,7 +2437,7 @@ def find_libraries( else: common_lib_dirs = ("lib", "lib64") - if os.path.basename(root) not in common_lib_dirs: + if os.path.basename(root).lower() not in common_lib_dirs: # search root and its direct library subdirectories non-recursively non_recursive = [root, *(os.path.join(root, libdir) for libdir in common_lib_dirs)] # avoid the expensive recursive search of the root directory