Version 1.10.

Drop upstreamed patches: -python3, -png-decoder, -gmpy2-mpq, and
-rational-exponent.
This commit is contained in:
Jerry James 2022-03-17 15:51:37 -06:00
parent a5f1a8356c
commit 3018ce1e1b
7 changed files with 20 additions and 130 deletions

View File

@ -1 +1 @@
SHA512 (sympy-1.9.tar.gz) = 139712219ba6bf420ba89b3f8d086ab8883c5ab965e9308ba9ee665ac3ac69a9b16fa30c6f5dfbc77dd34873ff3ff95c0d058954d7f9d853f5e9537efc24dd3c
SHA512 (sympy-1.10.tar.gz) = 0107c68b38809fbcec597339447fa830a9cb3c55863799c41dfb5d122ac7564fdf7c685fe2eedaaa3b8d5c9160b196ef2484fff4c7e99aa17a5a562f3fb73be5

View File

@ -1,11 +0,0 @@
--- a/sympy/external/tests/test_pythonmpq.py 2021-09-30 16:23:28.000000000 -0600
+++ b/sympy/external/tests/test_pythonmpq.py 2021-10-08 11:06:59.453830335 -0600
@@ -42,7 +42,7 @@ def test_PythonMPQ():
assert check_Q(Q(Q(3, 5))) == (3, 5)
assert check_Q(Q(0.5)) == (1, 2)
assert check_Q(Q('0.5')) == (1, 2)
- assert check_Q(Q(Decimal('0.6'))) == (3, 5)
+ assert check_Q(Q(str(Decimal('0.6')))) == (3, 5)
assert check_Q(Q(Fraction(3, 5))) == (3, 5)
# Invalid types

View File

@ -1,22 +0,0 @@
diff --git a/sympy/printing/preview.py b/sympy/printing/preview.py
index 52085e5e19..f9b1d2dd5c 100644
--- a/sympy/printing/preview.py
+++ b/sympy/printing/preview.py
@@ -27,12 +27,12 @@ def _check_output_no_window(*args, **kwargs):
def _run_pyglet(fname, fmt):
from pyglet import window, image, gl
from pyglet.window import key
+ from pyglet.image.codecs import ImageDecodeException
- if fmt == "png":
- from pyglet.image.codecs.png import PNGImageDecoder
- img = image.load(fname, decoder=PNGImageDecoder())
- else:
- raise ValueError("pyglet preview works only for 'png' files.")
+ try:
+ img = image.load(fname)
+ except ImageDecodeException:
+ raise ValueError("pyglet preview does not work for '{}' files.".format(fmt))
offset = 25

View File

@ -1,51 +0,0 @@
--- sympy-sympy-1.4/sympy/utilities/autowrap.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/utilities/autowrap.py 2019-04-17 14:34:26.580374579 -0600
@@ -229,6 +229,8 @@ except ImportError:
from distutils.extension import Extension
from Cython.Build import cythonize
cy_opts = {cythonize_options}
+if 'language_level' not in cy_opts or cy_opts['language_level'] == None:
+ cy_opts['language_level'] = 3
{np_import}
ext_mods = [Extension(
{ext_args},
--- sympy-sympy-1.4/sympy/utilities/_compilation/compilation.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/utilities/_compilation/compilation.py 2019-04-17 14:34:26.581374576 -0600
@@ -291,6 +291,8 @@ def simple_cythonize(src, destdir=None,
try:
cy_options = CompilationOptions(default_options)
cy_options.__dict__.update(cy_kwargs)
+ if cy_options.__dict__['language_level'] == None:
+ cy_options.__dict__['language_level'] = 3
cy_result = cy_compile([src], cy_options)
if cy_result.num_errors > 0:
raise ValueError("Cython compilation failed.")
--- sympy-sympy-1.4/sympy/utilities/tests/test_autowrap.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/utilities/tests/test_autowrap.py 2019-04-17 14:34:26.581374576 -0600
@@ -100,6 +100,8 @@ except ImportError:
from distutils.extension import Extension
from Cython.Build import cythonize
cy_opts = {}
+if 'language_level' not in cy_opts or cy_opts['language_level'] == None:
+ cy_opts['language_level'] = 3
ext_mods = [Extension(
'wrapper_module_%(num)s', ['wrapper_module_%(num)s.pyx', 'wrapped_code_%(num)s.c'],
@@ -138,6 +140,8 @@ except ImportError:
from distutils.extension import Extension
from Cython.Build import cythonize
cy_opts = {'compiler_directives': {'boundscheck': False}}
+if 'language_level' not in cy_opts or cy_opts['language_level'] == None:
+ cy_opts['language_level'] = 3
ext_mods = [Extension(
'wrapper_module_%(num)s', ['wrapper_module_%(num)s.pyx', 'wrapped_code_%(num)s.c'],
@@ -164,6 +168,8 @@ except ImportError:
from distutils.extension import Extension
from Cython.Build import cythonize
cy_opts = {'compiler_directives': {'boundscheck': False}}
+if 'language_level' not in cy_opts or cy_opts['language_level'] == None:
+ cy_opts['language_level'] = 3
import numpy as np
ext_mods = [Extension(

View File

@ -1,14 +0,0 @@
--- a/sympy/polys/ring_series.py 2021-09-30 16:23:28.000000000 -0600
+++ b/sympy/polys/ring_series.py 2021-10-08 13:43:30.746068783 -0600
@@ -989,6 +989,11 @@ def rs_nth_root(p, n, x, prec):
except ValueError: # as exponent
raise DomainError("The given series can't be expanded in "
"this domain.")
+ except TypeError:
+ try:
+ const = R(c**QQ(1, n))
+ except ValueError:
+ raise DomainError("The given series can't be expanded in this domain.")
res = rs_nth_root(p/c, n, x, prec)*const
else:
res = _nth_root1(p, n, x, prec)

View File

@ -1,12 +0,0 @@
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
# This file is empty on purpose
addFilter(r'E: zero-length .*sympy/strategies/tests/test_strat\.py')
# There really is no documentation for the TeXmacs plugin
addFilter(r'sympy-texmacs\.noarch: W: no-documentation')
addFilter(r'sympy-texmacs\.noarch: W: no-manual-page-for-binary tm_sympy')
# We use the versions of jquery and js-underscore that sphinx gives us
addFilter(r'W: unversioned-explicit-provides bundled\((jquery|js-underscore)\)')

View File

@ -3,27 +3,18 @@
# use it instead.
Name: sympy
Version: 1.9
Release: 2%{?dist}
Version: 1.10
Release: 1%{?dist}
Summary: A Python library for symbolic mathematics
License: BSD
URL: https://sympy.org/
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
# Skip tests that require a display
Patch0: %{name}-circuitplot.patch
# Default to python3 in the Cython backend
Patch1: %{name}-python3.patch
# Work around Fedora pyglet not including PNGImageDecoder
# https://github.com/sympy/sympy/pull/20600
Patch2: %{name}-png-decoder.patch
# Account for possible rounding error in some physics tests
Patch3: %{name}-tests.patch
Patch1: %{name}-tests.patch
# Don't let deprecation warnings from distutils cause test failures
Patch4: %{name}-distutils.patch
# gmpy2 2.1.0 no longer converts Decimal directly to mpq
Patch5: %{name}-gmpy2-mpq.patch
# gmpy2 2.1.0 no longer accepts Rational as an exponent
Patch6: %{name}-rational-exponent.patch
Patch2: %{name}-distutils.patch
BuildArch: noarch
@ -43,9 +34,11 @@ BuildRequires: %{py3_dist fastcache}
BuildRequires: %{py3_dist gmpy2}
BuildRequires: %{py3_dist matplotlib}
BuildRequires: %{py3_dist mpmath}
BuildRequires: %{py3_dist myst-parser}
BuildRequires: %{py3_dist numexpr}
BuildRequires: %{py3_dist numpy}
BuildRequires: python3-numpy-f2py
BuildRequires: %{py3_dist numpydoc}
BuildRequires: %{py3_dist pip}
BuildRequires: %{py3_dist scipy}
BuildRequires: %{py3_dist setuptools}
@ -118,6 +111,12 @@ for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" .); do
rm -f $fil.orig
done
# Fedora does not have this Sphinx extension
sed -i "s/ 'sphinx_reredirects',//" doc/src/conf.py
# Fedora does not have linkify
sed -i 's/, "linkify"//' doc/src/conf.py
%build
%pyproject_wheel
@ -129,6 +128,7 @@ popd
%install
%pyproject_install
%pyproject_save_files isympy sympy
## Remove extra files
rm -f %{buildroot}%{_bindir}/{,doc}test
@ -163,14 +163,9 @@ if [ "$(uname -p)" = "x86_64" ]; then
::: $(bash -c "echo {1..$jobs}")
fi
%files -n python3-%{name}
%files -n python3-%{name} -f %{pyproject_files}
%doc AUTHORS README.md
%doc doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
%license LICENSE
%{python3_sitelib}/isympy.*
%{python3_sitelib}/__pycache__/isympy.*
%{python3_sitelib}/sympy/
%{python3_sitelib}/sympy-%{version}.dist-info
%{_bindir}/isympy
%{_mandir}/man1/isympy.1*
@ -182,6 +177,11 @@ fi
%{_docdir}/%{name}-doc/html
%changelog
* Thu Mar 17 2022 Jerry James <loganjerry@gmail.com> - 1.10-1
- Version 1.10
- Drop upstreamed patches: -python3, -png-decoder, -gmpy2-mpq,
and -rational-exponent
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild