mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
avoid using pkg_resources in PIL.features.pilinfo
This commit is contained in:
parent
9a93f6ee45
commit
e65dd04a63
|
@ -224,8 +224,6 @@ def pilinfo(out=None, supported_formats=True):
|
||||||
If ``True``, a list of all supported image file formats will be printed.
|
If ``True``, a list of all supported image file formats will be printed.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from pkg_resources import parse_version
|
|
||||||
|
|
||||||
if out is None:
|
if out is None:
|
||||||
out = sys.stdout
|
out = sys.stdout
|
||||||
|
|
||||||
|
@ -273,7 +271,8 @@ def pilinfo(out=None, supported_formats=True):
|
||||||
if v is not None:
|
if v is not None:
|
||||||
version_static = name in ("pil", "jpg")
|
version_static = name in ("pil", "jpg")
|
||||||
if name == "littlecms2":
|
if name == "littlecms2":
|
||||||
version_static = parse_version(v) < parse_version("2.7.0")
|
# this check is also in src/_imagingcms.c:setup_module()
|
||||||
|
version_static = tuple(int(x) for x in v.split(".")) < (2, 7)
|
||||||
t = "compiled for" if version_static else "loaded"
|
t = "compiled for" if version_static else "loaded"
|
||||||
print("---", feature, "support ok,", t, v, file=out)
|
print("---", feature, "support ok,", t, v, file=out)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1512,6 +1512,7 @@ setup_module(PyObject* m) {
|
||||||
|
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
|
|
||||||
|
/* this check is also in PIL.features.pilinfo() */
|
||||||
#if LCMS_VERSION < 2070
|
#if LCMS_VERSION < 2070
|
||||||
vn = LCMS_VERSION;
|
vn = LCMS_VERSION;
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user