docs: no longer recommend recursive=True

This commit is contained in:
Harmen Stoppels 2024-11-11 12:56:26 +01:00
parent d20e3fbd84
commit b8c357556e

View File

@ -3234,7 +3234,7 @@ as a ``@property`` in the package's class:
@property @property
def libs(self): def libs(self):
# The library provided by Foo is libMyFoo.so # The library provided by Foo is libMyFoo.so
return find_libraries("libMyFoo", root=self.home, recursive=True) return find_libraries("libMyFoo", root=self.home)
A package may also provide a custom implementation of each attribute A package may also provide a custom implementation of each attribute
for the virtual packages it provides by implementing the for the virtual packages it provides by implementing the
@ -3288,22 +3288,22 @@ follows:
# Just the foo headers # Just the foo headers
@property @property
def headers(self): def headers(self):
return find_headers("foo", root=self.home.include, recursive=False) return find_headers("foo", root=self.home)
# Just the foo libraries # Just the foo libraries
@property @property
def libs(self): def libs(self):
return find_libraries("libFoo", root=self.home, recursive=True) return find_libraries("libFoo", root=self.home)
# The header provided by the bar virtual package # The header provided by the bar virtual package
@property @property
def bar_headers(self): def bar_headers(self):
return find_headers("bar/bar.h", root=self.home.include, recursive=False) return find_headers("bar", root=self.home)
# The library provided by the bar virtual package # The library provided by the bar virtual package
@property @property
def bar_libs(self): def bar_libs(self):
return find_libraries("libFooBar", root=self.home, recursive=True) return find_libraries("libFooBar", root=self.home)
# The baz virtual package home # The baz virtual package home
@property @property
@ -3313,12 +3313,12 @@ follows:
# The header provided by the baz virtual package # The header provided by the baz virtual package
@property @property
def baz_headers(self): def baz_headers(self):
return find_headers("baz/baz", root=self.baz_home.include, recursive=False) return find_headers("baz", root=self.baz_home)
# The library provided by the baz virtual package # The library provided by the baz virtual package
@property @property
def baz_libs(self): def baz_libs(self):
return find_libraries("libFooBaz", root=self.baz_home, recursive=True) return find_libraries("libFooBaz", root=self.baz_home)
Now consider another package, ``foo-app``, depending on all three: Now consider another package, ``foo-app``, depending on all three: