Update to 1.1 (bz 1468405).

All patches have been upstreamed; drop them all.
This commit is contained in:
Jerry James 2017-07-06 20:48:50 -06:00
parent 10ef511153
commit 981963318d
7 changed files with 21 additions and 127 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
/sympy-0.7.6.tar.gz
/sympy-0.7.6.1.tar.gz
/sympy-1.0.tar.gz
/sympy-1.1.tar.gz

View File

@ -1 +1 @@
9750339a54321e583a231a834f4476c3 sympy-1.0.tar.gz
SHA512 (sympy-1.1.tar.gz) = 1b44d1709eaacc3744f84ca60862e9db9470ff657aa65df3c7e498acb3fc4d10fe92f3dbea665662647174052fb0ae7c05e2bc7d8273f3a74d8fbfb938eadc08

View File

@ -1,20 +0,0 @@
--- sympy-sympy-1.0/sympy/plotting/plot.py.orig 2016-03-08 11:35:33.000000000 -0700
+++ sympy-sympy-1.0/sympy/plotting/plot.py 2017-01-16 17:27:38.093969621 -0700
@@ -383,7 +383,7 @@ class Line2DBaseSeries(BaseSeries):
np = import_module('numpy')
c = self.line_color
if hasattr(c, '__call__'):
- f = np.vectorize(c)
+ f = np.vectorize(c, [np.float64])
arity = len(getargspec(c)[0])
if arity == 1 and self.is_parametric:
x = self.get_parameter_points()
@@ -700,7 +700,7 @@ class SurfaceBaseSeries(BaseSeries):
np = import_module('numpy')
c = self.surface_color
if isinstance(c, Callable):
- f = np.vectorize(c)
+ f = np.vectorize(c, [np.float64])
arity = len(getargspec(c)[0])
if self.is_parametric:
variables = list(map(centers_of_faces, self.get_parameter_meshes()))

View File

@ -1,32 +0,0 @@
--- python3/sympy/plotting/tests/test_plot_implicit.py.orig 2016-03-08 11:35:33.000000000 -0700
+++ python3/sympy/plotting/tests/test_plot_implicit.py 2016-03-26 14:46:10.574521937 -0600
@@ -55,14 +55,12 @@ def plot_implicit_tests(name):
#Test plots which cannot be rendered using the adaptive algorithm
with warnings.catch_warnings(record=True) as w:
plot_and_save(Eq(y, re(cos(x) + I*sin(x))), name=name)
- assert len(w) == 1
- assert issubclass(w[-1].category, UserWarning)
+ assert issubclass(w[0].category, UserWarning)
assert "Adaptive meshing could not be applied" in str(w[0].message)
with warnings.catch_warnings(record=True) as w:
plot_and_save(x**2 - 1, legend='An implicit plot')
- assert len(w) == 1
- assert issubclass(w[-1].category, UserWarning)
+ assert issubclass(w[0].category, UserWarning)
assert 'No labelled objects found' in str(w[0].message)
def test_line_color():
--- python3/sympy/plotting/tests/test_plot.py.orig 2016-03-08 11:35:33.000000000 -0700
+++ python3/sympy/plotting/tests/test_plot.py 2016-07-23 11:00:00.754136915 -0600
@@ -243,10 +243,6 @@ def plot_and_save(name):
p = plot(i, (y, 1, 5))
p.save(tmp_file('%s_advanced_integral' % name))
p._backend.close()
- # Make sure no other warnings were raised
- assert len(w) == 1
- assert issubclass(w[-1].category, UserWarning)
- assert "The evaluation of the expression is problematic" in str(w[0].message)
s = Sum(1/x**y, (x, 1, oo))
p = plot(s, (y, 2, 10))

View File

@ -1,29 +0,0 @@
--- sympy-sympy-1.0/sympy/plotting/tests/test_plot.py~ 2017-01-12 11:12:16.000000000 -0500
+++ sympy-sympy-1.0/sympy/plotting/tests/test_plot.py 2017-01-13 11:40:18.754194629 -0500
@@ -199,7 +199,7 @@
cos(x) + 0.1*cos(x)*cos(7*x),
0.1*sin(7*x),
(x, 0, 2*pi))
- p[0].line_color = lambda a: sin(4*a)
+ p[0].line_color = lambda a: float(sin(4*a))
p.save(tmp_file('%s_colors_3d_line_arity1' % name))
p[0].line_color = lambda a, b: b
p.save(tmp_file('%s_colors_3d_line_arity2' % name))
@@ -214,7 +214,7 @@
p.save(tmp_file('%s_colors_surface_arity2' % name))
p[0].surface_color = lambda a, b, c: c
p.save(tmp_file('%s_colors_surface_arity3a' % name))
- p[0].surface_color = lambda a, b, c: sqrt((a - 3*pi)**2 + b**2)
+ p[0].surface_color = lambda a, b, c: float(sqrt((a - 3*pi)**2 + b**2))
p.save(tmp_file('%s_colors_surface_arity3b' % name))
p._backend.close()
@@ -224,7 +224,7 @@
p.save(tmp_file('%s_colors_param_surf_arity1' % name))
p[0].surface_color = lambda a, b: a*b
p.save(tmp_file('%s_colors_param_surf_arity2' % name))
- p[0].surface_color = lambda a, b, c: sqrt(a**2 + b**2 + c**2)
+ p[0].surface_color = lambda a, b, c: float(sqrt(a**2 + b**2 + c**2))
p.save(tmp_file('%s_colors_param_surf_arity3' % name))
p._backend.close()

View File

@ -1,11 +0,0 @@
--- sympy-sympy-1.0/sympy/printing/tests/test_theanocode.py.orig 2016-03-08 11:35:33.000000000 -0700
+++ sympy-sympy-1.0/sympy/printing/tests/test_theanocode.py 2017-04-01 21:32:35.092097881 -0600
@@ -243,7 +243,7 @@ def test_DenseMatrix():
X = MatrixType([[sy.cos(t), -sy.sin(t)], [sy.sin(t), sy.cos(t)]])
tX = theano_code(X)
assert isinstance(tX, tt.TensorVariable)
- assert tX.owner.op == tt.join
+ assert tX.owner.op == tt.join_
def test_AppliedUndef():
t = sy.Symbol('t')

View File

@ -1,18 +1,10 @@
Name: sympy
Version: 1.0
Release: 7%{?dist}
Version: 1.1
Release: 1%{?dist}
Summary: A Python library for symbolic mathematics
License: BSD
URL: http://sympy.org/
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
# Fix two test failures with recent mpmath versions
Patch0: sympy-test.patch
# Adapt to changes in matplotlib 2.x
Patch1: sympy-matplotlib2.patch
# Fix for tests failing because numpy gets an array of Float objects
Patch2: sympy-test_args.patch
# Fix building with Theano 0.9
Patch3: sympy-theano.patch
BuildArch: noarch
@ -24,12 +16,13 @@ BuildRequires: librsvg2-tools
BuildRequires: numpy python3-numpy
BuildRequires: numpy-f2py python3-numpy-f2py
BuildRequires: python2-devel python3-devel
BuildRequires: python2-docutils
BuildRequires: python2-fastcache python3-fastcache
BuildRequires: python2-gmpy2 python3-gmpy2
BuildRequires: python2-matplotlib python3-matplotlib
BuildRequires: python-mpmath python3-mpmath
BuildRequires: python2-scipy python3-scipy
BuildRequires: python2-sphinx
BuildRequires: python3-sphinx
BuildRequires: python2-theano python3-theano
BuildRequires: tex(latex)
BuildRequires: tex-dvipng
@ -82,7 +75,7 @@ This package contains a TeXmacs plugin for sympy.
%package examples
Summary: Sympy examples
Requires: %{name} = %{version}-%{release}
# once rich dependencies are allowed, add "or python3-sympy = %{version}-%{release}"
# once rich dependencies are allowed, add "or python3-sympy = %%{version}-%%{release}"
%description examples
This package contains example input for sympy.
@ -107,9 +100,6 @@ for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" .); do
rm -f $fil.orig
done
# The classic sphinx theme is explicitly needed.
sed -i "/html_style/ahtml_theme = 'classic'" %{sympydir}/doc/src/conf.py
# If running on a 32-bit system, disable a test that requires 64-bit integers.
%global maxpyint %(python3 -c 'import sys;print("%x" % sys.maxsize)')
if [ "%{maxpyint}" = "7fffffff" ]; then
@ -117,27 +107,9 @@ if [ "%{maxpyint}" = "7fffffff" ]; then
%{sympydir}/sympy/polys/tests/test_rootoftools.py
fi
# Fix a test failure
%patch1
%patch2
%patch3
# Disable some broken tests
# https://github.com/sympy/sympy/issues/10788
sed -i -r 's/test_Singletons|test_functions/_disabled_\0/' \
sympy-sympy-1.0/sympy/utilities/tests/test_pickling.py
sed -i -r 's/test_gradient/_disabled_\0/' \
sympy-sympy-1.0/sympy/physics/vector/tests/test_fieldfunctions.py
# Make a copy for building the python3 version
cp -a %{sympydir} python3
%patch0
# Disable broken complex > int comparison on py3
sed -i -r 's/test_matplotlib/_disabled_\0/' \
python3/sympy/plotting/tests/test_plot.py
%build
# Build the python2 version
pushd %{sympydir}
@ -151,6 +123,7 @@ popd
# Build the documentation
pushd %{sympydir}/doc
sed -i 's/sphinx-build/&-%{python3_version}/' Makefile
make html SPHINXOPTS=%{?_smp_mflags}
make cheatsheet
popd
@ -201,6 +174,15 @@ popd
# Try to get rid of pyc files, which aren't useful for documentation
find %{sympydir}/examples/ -name '*.py[co]' -print -delete
# Fix some executable bits
chmod a+x \
%{buildroot}%{python2_sitelib}/sympy/benchmarks/bench_symbench.py \
%{buildroot}%{python2_sitelib}/sympy/physics/mechanics/models.py
%{buildroot}%{python2_sitelib}/sympy/utilities/tests/diagnose_imports.py \
%{buildroot}%{python3_sitelib}/sympy/benchmarks/bench_symbench.py \
%{buildroot}%{python3_sitelib}/sympy/physics/mechanics/models.py
%{buildroot}%{python3_sitelib}/sympy/utilities/tests/diagnose_imports.py
%check
let "dnum = $RANDOM % 90 + 10"
# Split into many small chunks to reduce waiting in the end-game
@ -251,6 +233,10 @@ popd
%{_docdir}/%{name}-doc/html
%changelog
* Fri Jul 7 2017 Jerry James <loganjerry@gmail.com> - 1.1-1
- Update to 1.1 (bz 1468405)
- All patches have been upstreamed; drop them all
* Sat Apr 1 2017 Jerry James <loganjerry@gmail.com> - 1.0-7
- Update theano test for theano 0.9