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 3f327dec4e
commit fd6694989d
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/
@ -11,6 +11,8 @@ Patch0: %{name}-float.patch
Patch1: %{name}-python3.patch
# Adapt to Theano-PyMC
Patch2: %{name}-theano-pymc.patch
# Work around Fedora pyglet not including PNGImageDecoder
Patch3: %{name}-png-decoder.patch
BuildArch: noarch
@ -61,6 +63,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-pymc}
@ -143,7 +151,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))
@ -177,6 +184,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