diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2024-11-04 11:31:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-04 20:31:57 +0100 |
commit | 38c8069ab42f44aa9f4779968937fc6842dc2109 (patch) | |
tree | f43ac7f5f02f36d05e4163b6994b481de8309697 /var | |
parent | 5cc07522abef9fa169cfa341e431c030dbbff7fe (diff) | |
download | spack-38c8069ab42f44aa9f4779968937fc6842dc2109.tar.gz spack-38c8069ab42f44aa9f4779968937fc6842dc2109.tar.bz2 spack-38c8069ab42f44aa9f4779968937fc6842dc2109.tar.xz spack-38c8069ab42f44aa9f4779968937fc6842dc2109.zip |
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
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin.mock/packages/attributes-foo/package.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |