Use supported attribute to check pillow version
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1789664
This commit is contained in:
parent
1f37c6ab3a
commit
8d98548134
27
0001-Use-supported-attribute-to-check-pillow-version.patch
Normal file
27
0001-Use-supported-attribute-to-check-pillow-version.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 3369e3bc24f98f430593a5d15d8e6d6deb14356e Mon Sep 17 00:00:00 2001
|
||||
From: Thomas A Caswell <tcaswell@gmail.com>
|
||||
Date: Fri, 3 Jan 2020 20:24:07 -0500
|
||||
Subject: [PATCH] FIX: use supported attribute to check pillow version
|
||||
|
||||
the PILLOW_VERSION attribute was deprecated in pillow 5.2 and removed
|
||||
in pillow 7.0. The __version__ attribute is present in the minimum
|
||||
version we check (3.4).
|
||||
|
||||
closes #16083
|
||||
---
|
||||
lib/matplotlib/backend_bases.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py
|
||||
index 5f73911670d..650446cbdb2 100644
|
||||
--- a/lib/matplotlib/backend_bases.py
|
||||
+++ b/lib/matplotlib/backend_bases.py
|
||||
@@ -54,7 +54,7 @@
|
||||
from matplotlib.path import Path
|
||||
|
||||
try:
|
||||
- from PIL import PILLOW_VERSION
|
||||
+ from PIL import __version__ as PILLOW_VERSION
|
||||
from distutils.version import LooseVersion
|
||||
if LooseVersion(PILLOW_VERSION) >= "3.4":
|
||||
_has_pil = True
|
@ -64,6 +64,9 @@ Patch0002: 0001-Use-packaged-jquery-and-jquery-ui.patch
|
||||
Patch0003: 0001-Fix-env-override-in-WebAgg-backend-test.patch
|
||||
# https://github.com/matplotlib/matplotlib/pull/15763
|
||||
Patch0004: 0001-Skip-webagg-test-if-tornado-is-not-available.patch
|
||||
# https://github.com/matplotlib/matplotlib/pull/16086
|
||||
Patch0005: 0001-Use-supported-attribute-to-check-pillow-version.patch
|
||||
|
||||
|
||||
# Fedora-specific patches; see:
|
||||
# https://github.com/fedora-python/matplotlib/tree/fedora-patches
|
||||
@ -270,6 +273,8 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||
|
||||
%patch0004 -p1
|
||||
|
||||
%patch0005 -p1
|
||||
|
||||
# Fedora-specific patches follow:
|
||||
%patch1001 -p1
|
||||
# Updated test images for new FreeType.
|
||||
|
Loading…
x
Reference in New Issue
Block a user