mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-10 00:20:57 +03:00
Merge pull request #7270 from heitbaum/libtiff
Fix missing symbols as libtiff can depend on libjpeg
This commit is contained in:
commit
e96f217c60
18
setup.py
18
setup.py
|
@ -816,6 +816,15 @@ class pil_build_ext(build_ext):
|
||||||
|
|
||||||
libs = self.add_imaging_libs.split()
|
libs = self.add_imaging_libs.split()
|
||||||
defs = []
|
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:
|
if feature.jpeg:
|
||||||
libs.append(feature.jpeg)
|
libs.append(feature.jpeg)
|
||||||
defs.append(("HAVE_LIBJPEG", None))
|
defs.append(("HAVE_LIBJPEG", None))
|
||||||
|
@ -830,15 +839,6 @@ class pil_build_ext(build_ext):
|
||||||
if feature.imagequant:
|
if feature.imagequant:
|
||||||
libs.append(feature.imagequant)
|
libs.append(feature.imagequant)
|
||||||
defs.append(("HAVE_LIBIMAGEQUANT", None))
|
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:
|
if feature.xcb:
|
||||||
libs.append(feature.xcb)
|
libs.append(feature.xcb)
|
||||||
defs.append(("HAVE_XCB", None))
|
defs.append(("HAVE_XCB", None))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user