Version 1.8.
- Drop the -float patch and only run tests on x86_64. - Add -circuitplot patch to skip tests that fail with no display. - Drop the -texmacs subpackage; the TeXmacs package ships its own sympy plugin.
This commit is contained in:
parent
1d0d8a3bc2
commit
39a9cfc04c
2
sources
2
sources
|
@ -1 +1 @@
|
||||||
SHA512 (sympy-1.7.1.tar.gz) = eb9387bb9c632203af650279f896427556725b7496c00d8dfe97b7476beedbbee5714659f7fb44b4fa986c9567cdcaefcc19401d63e1ca0e9a6c7317855440ea
|
SHA512 (sympy-1.8.tar.gz) = 61141e1d0a6105e725fb415edbdf981b3aa95debcfe73f9da5ca36afc7a70e91b5c28ed45454054c1b9a8d45e42bfe724e5b20da717746c301fd095da17f4db7
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
--- sympy-sympy-1.8/sympy/physics/quantum/tests/test_circuitplot.py.orig 2021-04-09 16:29:50.000000000 -0600
|
||||||
|
+++ sympy-sympy-1.8/sympy/physics/quantum/tests/test_circuitplot.py 2021-04-12 13:27:55.241417177 -0600
|
||||||
|
@@ -4,7 +4,9 @@ from sympy.physics.quantum.gate import C
|
||||||
|
from sympy.external import import_module
|
||||||
|
from sympy.testing.pytest import skip
|
||||||
|
|
||||||
|
-mpl = import_module('matplotlib')
|
||||||
|
+mpl = import_module(
|
||||||
|
+ 'matplotlib', import_kwargs={'fromlist': ['pyplot']},
|
||||||
|
+ catch=(RuntimeError,)) # This is raised in environments that have no display.
|
||||||
|
|
||||||
|
def test_render_label():
|
||||||
|
assert render_label('q0') == r'$\left|q0\right\rangle$'
|
|
@ -1,36 +0,0 @@
|
||||||
--- sympy-sympy-1.5/sympy/core/tests/test_numbers.py.orig 2020-01-02 11:38:59.879596198 -0700
|
|
||||||
+++ sympy-sympy-1.5/sympy/core/tests/test_numbers.py 2020-01-02 11:39:41.195632401 -0700
|
|
||||||
@@ -1981,11 +1981,6 @@ def test_numpy_to_float():
|
|
||||||
check_prec_and_relerr(np.float16(2.0/3), Rational(2, 3))
|
|
||||||
check_prec_and_relerr(np.float32(2.0/3), Rational(2, 3))
|
|
||||||
check_prec_and_relerr(np.float64(2.0/3), Rational(2, 3))
|
|
||||||
- # extended precision, on some arch/compilers:
|
|
||||||
- x = np.longdouble(2)/3
|
|
||||||
- check_prec_and_relerr(x, Rational(2, 3))
|
|
||||||
- y = Float(x, precision=10)
|
|
||||||
- assert same_and_same_prec(y, Float(Rational(2, 3), precision=10))
|
|
||||||
|
|
||||||
raises(TypeError, lambda: Float(np.complex64(1+2j)))
|
|
||||||
raises(TypeError, lambda: Float(np.complex128(1+2j)))
|
|
||||||
--- sympy-sympy-1.5/sympy/core/tests/test_sympify.py.orig 2019-12-07 19:06:10.000000000 -0700
|
|
||||||
+++ sympy-sympy-1.5/sympy/core/tests/test_sympify.py 2020-01-02 11:38:59.881596200 -0700
|
|
||||||
@@ -602,8 +602,6 @@ def test_sympify_numpy():
|
|
||||||
assert equal(sympify(np.float32(1.123456)), Float(1.123456, precision=24))
|
|
||||||
assert equal(sympify(np.float64(1.1234567891234)),
|
|
||||||
Float(1.1234567891234, precision=53))
|
|
||||||
- assert equal(sympify(np.longdouble(1.123456789)),
|
|
||||||
- Float(1.123456789, precision=80))
|
|
||||||
assert equal(sympify(np.complex64(1 + 2j)), S(1.0 + 2.0*I))
|
|
||||||
assert equal(sympify(np.complex128(1 + 2j)), S(1.0 + 2.0*I))
|
|
||||||
assert equal(sympify(np.longcomplex(1 + 2j)), S(1.0 + 2.0*I))
|
|
||||||
@@ -612,10 +610,6 @@ def test_sympify_numpy():
|
|
||||||
if hasattr(np, 'float96'):
|
|
||||||
assert equal(sympify(np.float96(1.123456789)),
|
|
||||||
Float(1.123456789, precision=80))
|
|
||||||
- #float128 does not exist on all platforms
|
|
||||||
- if hasattr(np, 'float128'):
|
|
||||||
- assert equal(sympify(np.float128(1.123456789123)),
|
|
||||||
- Float(1.123456789123, precision=80))
|
|
||||||
|
|
||||||
|
|
||||||
@XFAIL
|
|
|
@ -1,12 +1,22 @@
|
||||||
--- sympy-sympy-1.7/sympy/printing/preview.py.orig 2020-11-29 04:02:22.000000000 -0700
|
diff --git a/sympy/printing/preview.py b/sympy/printing/preview.py
|
||||||
+++ sympy-sympy-1.7/sympy/printing/preview.py 2020-12-10 10:55:53.290413553 -0700
|
index 52085e5e19..f9b1d2dd5c 100644
|
||||||
@@ -32,8 +32,7 @@ def _run_pyglet(fname, fmt):
|
--- 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.window import key
|
||||||
|
+ from pyglet.image.codecs import ImageDecodeException
|
||||||
|
|
||||||
if fmt == "png":
|
- if fmt == "png":
|
||||||
- from pyglet.image.codecs.png import PNGImageDecoder
|
- from pyglet.image.codecs.png import PNGImageDecoder
|
||||||
- img = image.load(fname, decoder=PNGImageDecoder())
|
- img = image.load(fname, decoder=PNGImageDecoder())
|
||||||
|
- else:
|
||||||
|
- raise ValueError("pyglet preview works only for 'png' files.")
|
||||||
|
+ try:
|
||||||
+ img = image.load(fname)
|
+ img = image.load(fname)
|
||||||
else:
|
+ except ImageDecodeException:
|
||||||
raise ValueError("pyglet preview works only for 'png' files.")
|
+ raise ValueError("pyglet preview does not work for '{}' files.".format(fmt))
|
||||||
|
|
||||||
|
offset = 25
|
||||||
|
|
||||||
|
|
49
sympy.spec
49
sympy.spec
|
@ -1,17 +1,18 @@
|
||||||
Name: sympy
|
Name: sympy
|
||||||
Version: 1.7.1
|
Version: 1.8
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A Python library for symbolic mathematics
|
Summary: A Python library for symbolic mathematics
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://sympy.org/
|
URL: http://sympy.org/
|
||||||
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
|
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
|
||||||
# Remove tests that fail on non-x86 architectures
|
# Skip tests that require a display
|
||||||
Patch0: %{name}-float.patch
|
Patch0: %{name}-circuitplot.patch
|
||||||
# Default to python3 in the Cython backend
|
# Default to python3 in the Cython backend
|
||||||
Patch1: %{name}-python3.patch
|
Patch1: %{name}-python3.patch
|
||||||
# Adapt to Theano-PyMC
|
# Adapt to Theano-PyMC
|
||||||
Patch2: %{name}-theano-pymc.patch
|
Patch2: %{name}-theano-pymc.patch
|
||||||
# Work around Fedora pyglet not including PNGImageDecoder
|
# Work around Fedora pyglet not including PNGImageDecoder
|
||||||
|
# https://github.com/sympy/sympy/pull/20600
|
||||||
Patch3: %{name}-png-decoder.patch
|
Patch3: %{name}-png-decoder.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
@ -73,20 +74,15 @@ Recommends: %{py3_dist numexpr}
|
||||||
Recommends: %{py3_dist scipy}
|
Recommends: %{py3_dist scipy}
|
||||||
Recommends: %{py3_dist theano-pymc}
|
Recommends: %{py3_dist theano-pymc}
|
||||||
|
|
||||||
|
# This can be removed when F38 reaches EOL
|
||||||
|
Obsoletes: sympy-texmacs < 1.8
|
||||||
|
|
||||||
%description -n python3-%{name}
|
%description -n python3-%{name}
|
||||||
SymPy aims to become a full-featured computer algebra system (CAS)
|
SymPy aims to become a full-featured computer algebra system (CAS)
|
||||||
while keeping the code as simple as possible in order to be
|
while keeping the code as simple as possible in order to be
|
||||||
comprehensible and easily extensible. SymPy is written entirely in
|
comprehensible and easily extensible. SymPy is written entirely in
|
||||||
Python and does not require any external libraries.
|
Python and does not require any external libraries.
|
||||||
|
|
||||||
%package texmacs
|
|
||||||
Summary: TeXmacs integration for sympy
|
|
||||||
Requires: python3-%{name} = %{version}-%{release}
|
|
||||||
Requires: texmacs
|
|
||||||
|
|
||||||
%description texmacs
|
|
||||||
This package contains a TeXmacs plugin for sympy.
|
|
||||||
|
|
||||||
%package examples
|
%package examples
|
||||||
Summary: Sympy examples
|
Summary: Sympy examples
|
||||||
Requires: python3-%{name} = %{version}-%{release}
|
Requires: python3-%{name} = %{version}-%{release}
|
||||||
|
@ -127,13 +123,6 @@ popd
|
||||||
## Remove extra files
|
## Remove extra files
|
||||||
rm -f %{buildroot}%{_bindir}/{,doc}test
|
rm -f %{buildroot}%{_bindir}/{,doc}test
|
||||||
|
|
||||||
## Install the TeXmacs integration
|
|
||||||
cp -p data/TeXmacs/bin/tm_sympy %{buildroot}%{_bindir}/tm_sympy
|
|
||||||
chmod a+x %{buildroot}%{_bindir}/tm_sympy
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/TeXmacs/plugins/sympy
|
|
||||||
cp -a data/TeXmacs/progs %{buildroot}%{_datadir}/TeXmacs/plugins/sympy
|
|
||||||
chmod a-x %{buildroot}%{_datadir}/TeXmacs/plugins/sympy/progs/*.scm
|
|
||||||
|
|
||||||
# Don't let an executable script go into the documentation
|
# Don't let an executable script go into the documentation
|
||||||
chmod -R a-x+X examples
|
chmod -R a-x+X examples
|
||||||
|
|
||||||
|
@ -147,10 +136,13 @@ rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n
|
||||||
find examples/ -name '*.py[co]' -print -delete
|
find examples/ -name '*.py[co]' -print -delete
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Too many tests now assume that native 64-bit integers are available.
|
# Many tests assume they are running on an x86_64 machine. Some assume that
|
||||||
# Do not run tests on 32-bit systems.
|
# native 64-bit integers are available. Some assume that 80-bit floating point
|
||||||
%global maxpyint %(python3 -c 'import sys;print("%x" % sys.maxsize)')
|
# numbers are available. Some assume that certain operations always produce
|
||||||
if [ "%{maxpyint}" != "7fffffff" ]; then
|
# numpy float64 values (but produce float32 values on some architectures). I
|
||||||
|
# used to try to keep the test suite working on all architectures, but it has
|
||||||
|
# become too much of a burden. Only run tests if we happen to build on x86_64.
|
||||||
|
if [ "$(uname -p)" = "x86_64" ]; then
|
||||||
# Split into many small chunks to reduce waiting in the end-game
|
# Split into many small chunks to reduce waiting in the end-game
|
||||||
jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3))
|
jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3))
|
||||||
|
|
||||||
|
@ -171,11 +163,6 @@ fi
|
||||||
%{_bindir}/isympy
|
%{_bindir}/isympy
|
||||||
%{_mandir}/man1/isympy.1*
|
%{_mandir}/man1/isympy.1*
|
||||||
|
|
||||||
%files texmacs
|
|
||||||
%license data/TeXmacs/LICENSE
|
|
||||||
%{_bindir}/tm_sympy
|
|
||||||
%{_datadir}/TeXmacs/plugins/sympy/
|
|
||||||
|
|
||||||
%files examples
|
%files examples
|
||||||
%doc examples/*
|
%doc examples/*
|
||||||
|
|
||||||
|
@ -184,6 +171,12 @@ fi
|
||||||
%{_docdir}/%{name}-doc/html
|
%{_docdir}/%{name}-doc/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 12 2021 Jerry James <loganjerry@gmail.com> - 1.8-1
|
||||||
|
- Version 1.8
|
||||||
|
- Drop the -float patch and only run tests on x86_64
|
||||||
|
- Add -circuitplot patch to skip tests that fail with no display
|
||||||
|
- Drop the -texmacs subpackage; the TeXmacs package ships its own sympy plugin
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue