Skip to content

Commit

Permalink
Merge pull request #7270 from heitbaum/libtiff
Browse files Browse the repository at this point in the history
Fix missing symbols as libtiff can depend on libjpeg
  • Loading branch information
radarhere authored Jul 9, 2023
2 parents f089c2d + d17947e commit e96f217
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,15 @@ def build_extensions(self):

libs = self.add_imaging_libs.split()
defs = []
if feature.tiff:
libs.append(feature.tiff)
defs.append(("HAVE_LIBTIFF", None))
if sys.platform == "win32":
# This define needs to be defined if-and-only-if it was defined
# when compiling LibTIFF. LibTIFF doesn't expose it in `tiffconf.h`,
# so we have to guess; by default it is defined in all Windows builds.
# See #4237, #5243, #5359 for more information.
defs.append(("USE_WIN32_FILEIO", None))
if feature.jpeg:
libs.append(feature.jpeg)
defs.append(("HAVE_LIBJPEG", None))
Expand All @@ -830,15 +839,6 @@ def build_extensions(self):
if feature.imagequant:
libs.append(feature.imagequant)
defs.append(("HAVE_LIBIMAGEQUANT", None))
if feature.tiff:
libs.append(feature.tiff)
defs.append(("HAVE_LIBTIFF", None))
if sys.platform == "win32":
# This define needs to be defined if-and-only-if it was defined
# when compiling LibTIFF. LibTIFF doesn't expose it in `tiffconf.h`,
# so we have to guess; by default it is defined in all Windows builds.
# See #4237, #5243, #5359 for more information.
defs.append(("USE_WIN32_FILEIO", None))
if feature.xcb:
libs.append(feature.xcb)
defs.append(("HAVE_XCB", None))
Expand Down

0 comments on commit e96f217

Please sign in to comment.