Fix preview of PNG images (bz 1906363).

Add missing Recommends needed to preview images (bz 1906363).
This commit is contained in:
Jerry James 2020-12-10 12:10:25 -07:00
parent ba1f67aa81
commit e7b9e8609f
2 changed files with 26 additions and 2 deletions

13
sympy-png-decoder.patch Normal file
View File

@ -0,0 +1,13 @@
--- sympy-sympy-1.7/sympy/printing/preview.py.orig 2020-11-29 04:02:22.000000000 -0700
+++ sympy-sympy-1.7/sympy/printing/preview.py 2020-12-10 10:55:53.290413553 -0700
@@ -32,8 +32,8 @@ def _run_pyglet(fname, fmt):
from pyglet.window import key
if fmt == "png":
- from pyglet.image.codecs.png import PNGImageDecoder
- img = image.load(fname, decoder=PNGImageDecoder())
+ from pyglet.image.codecs.pil import PILImageDecoder
+ img = image.load(fname, decoder=PILImageDecoder())
else:
raise ValueError("pyglet preview works only for 'png' files.")

View File

@ -1,6 +1,6 @@
Name: sympy
Version: 1.7
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A Python library for symbolic mathematics
License: BSD
URL: http://sympy.org/
@ -9,6 +9,8 @@ Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.ta
Patch0: %{name}-float.patch
# Default to python3 in the Cython backend
Patch1: %{name}-python3.patch
# Work around Fedora pyglet not including PNGImageDecoder
Patch2: %{name}-png-decoder.patch
BuildArch: noarch
@ -58,6 +60,12 @@ Requires: %{py3_dist gmpy2}
Requires: %{py3_dist matplotlib}
Requires: %{py3_dist pyglet}
Recommends: tex(latex)
Recommends: tex(amsfonts.sty)
Recommends: tex(amsmath.sty)
Recommends: tex(euler.sty)
Recommends: tex(eulervm.sty)
Recommends: tex(standalone.cls)
Recommends: %{py3_dist numexpr}
Recommends: %{py3_dist scipy}
Recommends: %{py3_dist theano}
@ -140,7 +148,6 @@ find examples/ -name '*.py[co]' -print -delete
# Do not run tests on 32-bit systems.
%global maxpyint %(python3 -c 'import sys;print("%x" % sys.maxsize)')
if [ "%{maxpyint}" != "7fffffff" ]; then
let "dnum = $RANDOM % 90 + 10"
# Split into many small chunks to reduce waiting in the end-game
jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3))
@ -174,6 +181,10 @@ fi
%{_docdir}/%{name}-doc/html
%changelog
* Thu Dec 10 2020 Jerry James <loganjerry@gmail.com> - 1.7-2
- Fix preview of PNG images (bz 1906363)
- Add missing Recommends needed to preview images (bz 1906363)
* Sat Nov 28 2020 Jerry James <loganjerry@gmail.com> - 1.7-1
- Version 1.7