mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
allowing for libwebp* library names
This commit is contained in:
parent
f6dd5d3dbb
commit
aa105bf89d
11
setup.py
11
setup.py
|
@ -490,6 +490,8 @@ class pil_build_ext(build_ext):
|
|||
# In Google's precompiled zip it is call "libwebp":
|
||||
if _find_library_file(self, "webp"):
|
||||
feature.webp = "webp"
|
||||
elif _find_library_file(self, "libwebp"):
|
||||
feature.webp = "libwebp"
|
||||
|
||||
if feature.want('webpmux'):
|
||||
if (_find_include_file(self, "webp/mux.h") and
|
||||
|
@ -497,6 +499,9 @@ class pil_build_ext(build_ext):
|
|||
if (_find_library_file(self, "webpmux") and
|
||||
_find_library_file(self, "webpdemux")):
|
||||
feature.webpmux = "webpmux"
|
||||
if (_find_library_file(self, "libwebpmux") and
|
||||
_find_library_file(self, "libwebpdemux")):
|
||||
feature.webpmux = "libwebpmux"
|
||||
|
||||
for f in feature:
|
||||
if not getattr(feature, f) and feature.require(f):
|
||||
|
@ -562,13 +567,13 @@ class pil_build_ext(build_ext):
|
|||
libraries=[feature.lcms] + extra))
|
||||
|
||||
if os.path.isfile("_webp.c") and feature.webp:
|
||||
libs = ["webp"]
|
||||
libs = [feature.webp]
|
||||
defs = []
|
||||
|
||||
if feature.webpmux:
|
||||
defs.append(("HAVE_WEBPMUX", None))
|
||||
libs.append("webpmux")
|
||||
libs.append("webpdemux")
|
||||
libs.append(feature.webpmux)
|
||||
libs.append(feature.webpmux.replace('pmux','pdemux'))
|
||||
|
||||
exts.append(Extension(
|
||||
"PIL._webp", ["_webp.c"], libraries=libs, define_macros=defs))
|
||||
|
|
Loading…
Reference in New Issue
Block a user