Search for libtiff library file first on Windows and macOS by radarhere · Pull Request #9034 · python-pillow/Pillow

libtiff takes priority over tiff on Windows and macOS

Pillow/setup.py

Lines 757 to 762 in 2954964

if _find_library_file(self, "tiff"):
feature.set("tiff", "tiff")
if sys.platform in ["win32", "darwin"] and _find_library_file(
self, "libtiff"
):
feature.set("tiff", "libtiff")

This rearranges the code so that if it is found, we skip searching for tiff.