From 38c8069ab42f44aa9f4779968937fc6842dc2109 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Mon, 4 Nov 2024 11:31:57 -0800 Subject: filesystem.py: add `max_depth` argument to `find` (#41945) * `find(..., max_depth=...)` can be used to control how many directories at most to descend into below the starting point * `find` now enters every unique (symlinked) directory once at the lowest depth * `find` is now repeatable: it traverses the directory tree in a deterministic order --- var/spack/repos/builtin.mock/packages/attributes-foo/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin.mock/packages/attributes-foo/package.py b/var/spack/repos/builtin.mock/packages/attributes-foo/package.py index 31c88f4b08..b882fc9b65 100644 --- a/var/spack/repos/builtin.mock/packages/attributes-foo/package.py +++ b/var/spack/repos/builtin.mock/packages/attributes-foo/package.py @@ -44,7 +44,7 @@ class AttributesFoo(BundlePackage): # Header provided by the bar virutal package @property def bar_headers(self): - return find_headers("bar/bar", root=self.home.include, recursive=False) + return find_headers("bar", root=self.home.include, recursive=True) # Libary provided by the bar virtual package @property @@ -59,7 +59,7 @@ class AttributesFoo(BundlePackage): # Header provided by the baz virtual package @property def baz_headers(self): - return find_headers("baz/baz", root=self.baz_home.include, recursive=False) + return find_headers("baz", root=self.baz_home.include, recursive=True) # Library provided by the baz virtual package @property -- cgit v1.2.3-70-g09d2