Update to 1.2 (bz 1599502).
Also: - Drop upstreamed -python3 patch. - Add -test-code-quality and -doc patches.
This commit is contained in:
parent
ea0405dcd2
commit
8e1b0e24f1
|
@ -1,4 +1 @@
|
|||
/sympy-0.7.6.1.tar.gz
|
||||
/sympy-1.0.tar.gz
|
||||
/sympy-1.1.tar.gz
|
||||
/sympy-1.1.1.tar.gz
|
||||
/sympy-*.tar.gz
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (sympy-1.1.1.tar.gz) = c571a5c6fd0abb59e60baec0f9c7b909ec2d133db52353c58288f7477ac2bc905219b308122761e41509d4bbdfc145375bdc6f76f608eb557e44163bb37b111a
|
||||
SHA512 (sympy-1.2.tar.gz) = e9b1089d6bc897436b1888d1a21324b5086c19cbf7d857514688e25b1a3c7fcf7c36a2ae9a7121d88acf73b6cb66e97c5591fe3e575089b41138a21086286328
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
--- sympy-sympy-1.2/README.rst.orig 2018-07-09 10:27:56.000000000 -0600
|
||||
+++ sympy-sympy-1.2/README.rst 2018-07-21 11:13:46.598313453 -0600
|
||||
@@ -138,7 +138,7 @@ To test pull requests, use `sympy-bot <h
|
||||
|
||||
Regenerate Experimental `\LaTeX` Parser/Lexer
|
||||
---------------------------------------------
|
||||
-The parser and lexer generated with the `ANTLR4 <http://antlr4.org`_ toolchain
|
||||
+The parser and lexer generated with the `ANTLR4 <http://antlr4.org>`_ toolchain
|
||||
in `sympy/parsing/latex/_antlr` and checked into the repo. Presently, most
|
||||
users should not need to regenerate these files, but if you plan to work on
|
||||
this feature, you will need the `antlr4` command line tool available. One way
|
||||
@@ -239,7 +239,7 @@ To cite SymPy in publications use
|
||||
|
||||
A BibTeX entry for LaTeX users is
|
||||
|
||||
-.. code-block:: none
|
||||
+.. code-block:: BibTeX
|
||||
|
||||
@article{10.7717/peerj-cs.103,
|
||||
title = {SymPy: symbolic computing in Python},
|
|
@ -1,6 +1,6 @@
|
|||
--- sympy-sympy-1.1.1/sympy/core/tests/test_sympify.py.orig 2017-07-26 16:46:51.000000000 -0600
|
||||
+++ sympy-sympy-1.1.1/sympy/core/tests/test_sympify.py 2018-06-27 08:19:06.815713759 -0600
|
||||
@@ -582,8 +582,6 @@ def test_numpy():
|
||||
--- sympy-sympy-1.2/sympy/core/tests/test_sympify.py.orig 2018-07-09 10:27:56.000000000 -0600
|
||||
+++ sympy-sympy-1.2/sympy/core/tests/test_sympify.py 2018-07-11 19:05:43.077799326 -0600
|
||||
@@ -583,8 +583,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))
|
||||
|
@ -9,7 +9,7 @@
|
|||
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))
|
||||
@@ -594,12 +592,6 @@ def test_numpy():
|
||||
@@ -595,12 +593,6 @@ def test_sympify_numpy():
|
||||
except AttributeError: #float96 does not exist on all platforms
|
||||
pass
|
||||
|
||||
|
|
|
@ -1,188 +0,0 @@
|
|||
--- python3/sympy/assumptions/sathandlers.py.orig 2017-07-26 16:46:12.000000000 -0600
|
||||
+++ python3/sympy/assumptions/sathandlers.py 2018-06-27 07:04:03.105607298 -0600
|
||||
@@ -1,6 +1,7 @@
|
||||
from __future__ import print_function, division
|
||||
|
||||
-from collections import MutableMapping, defaultdict
|
||||
+from collections import defaultdict
|
||||
+from collections.abc import MutableMapping
|
||||
|
||||
from sympy.core import (Add, Mul, Pow, Integer, Number, NumberSymbol,)
|
||||
from sympy.core.numbers import ImaginaryUnit
|
||||
--- python3/sympy/physics/mechanics/linearize.py.orig 2017-07-26 16:46:12.000000000 -0600
|
||||
+++ python3/sympy/physics/mechanics/linearize.py 2018-06-27 18:50:27.377496377 -0600
|
||||
@@ -8,6 +8,7 @@ from sympy.utilities.iterables import fl
|
||||
from sympy.physics.vector import dynamicsymbols
|
||||
from sympy.physics.mechanics.functions import msubs
|
||||
import collections
|
||||
+import collections.abc
|
||||
|
||||
|
||||
class Linearizer(object):
|
||||
@@ -262,7 +263,7 @@ class Linearizer(object):
|
||||
# Compose dict of operating conditions
|
||||
if isinstance(op_point, dict):
|
||||
op_point_dict = op_point
|
||||
- elif isinstance(op_point, collections.Iterable):
|
||||
+ elif isinstance(op_point, collections.abc.Iterable):
|
||||
op_point_dict = {}
|
||||
for op in op_point:
|
||||
op_point_dict.update(op)
|
||||
--- python3/sympy/physics/units/util.py.orig 2017-07-26 16:46:12.000000000 -0600
|
||||
+++ python3/sympy/physics/units/util.py 2018-06-27 18:48:35.345734211 -0600
|
||||
@@ -6,7 +6,7 @@ Several methods to simplify expressions
|
||||
|
||||
from __future__ import division
|
||||
|
||||
-import collections
|
||||
+import collections.abc
|
||||
|
||||
from sympy.physics.units.quantities import Quantity
|
||||
from sympy import Add, Mul, Pow, Function, Rational, Tuple, sympify
|
||||
@@ -110,7 +110,7 @@ def convert_to(expr, target_units):
|
||||
7.62950196312651e-20*gravitational_constant**(-0.5)*hbar**0.5*speed_of_light**0.5
|
||||
|
||||
"""
|
||||
- if not isinstance(target_units, (collections.Iterable, Tuple)):
|
||||
+ if not isinstance(target_units, (collections.abc.Iterable, Tuple)):
|
||||
target_units = [target_units]
|
||||
|
||||
if isinstance(expr, Add):
|
||||
--- python3/sympy/printing/conventions.py.orig 2017-07-26 16:46:12.000000000 -0600
|
||||
+++ python3/sympy/printing/conventions.py 2018-06-27 18:49:32.873611416 -0600
|
||||
@@ -5,7 +5,7 @@ A few practical conventions common to al
|
||||
from __future__ import print_function, division
|
||||
|
||||
import re
|
||||
-import collections
|
||||
+import collections.abc
|
||||
|
||||
|
||||
_name_with_digits_p = re.compile(r'^([a-zA-Z]+)([0-9]+)$')
|
||||
@@ -77,7 +77,7 @@ def requires_partial(expr):
|
||||
get the context of the expression.
|
||||
"""
|
||||
|
||||
- if not isinstance(expr.free_symbols, collections.Iterable):
|
||||
+ if not isinstance(expr.free_symbols, collections.abc.Iterable):
|
||||
return len(set(expr.variables)) > 1
|
||||
|
||||
return sum(not s.is_integer for s in expr.free_symbols) > 1
|
||||
--- python3/sympy/tensor/array/arrayop.py.orig 2017-07-26 16:46:12.000000000 -0600
|
||||
+++ python3/sympy/tensor/array/arrayop.py 2018-06-27 18:51:28.657367034 -0600
|
||||
@@ -1,6 +1,6 @@
|
||||
import itertools
|
||||
|
||||
-import collections
|
||||
+import collections.abc
|
||||
|
||||
from sympy import S, Tuple, diff
|
||||
|
||||
@@ -103,7 +103,7 @@ def tensorcontraction(array, *contractio
|
||||
# Verify contraction_axes:
|
||||
taken_dims = set([])
|
||||
for axes_group in contraction_axes:
|
||||
- if not isinstance(axes_group, collections.Iterable):
|
||||
+ if not isinstance(axes_group, collections.abc.Iterable):
|
||||
raise ValueError("collections of contraction axes expected")
|
||||
|
||||
dim = array.shape[axes_group[0]]
|
||||
@@ -190,7 +190,7 @@ def derive_by_array(expr, dx):
|
||||
|
||||
"""
|
||||
from sympy.matrices import MatrixBase
|
||||
- array_types = (collections.Iterable, MatrixBase, NDimArray)
|
||||
+ array_types = (collections.abc.Iterable, MatrixBase, NDimArray)
|
||||
|
||||
if isinstance(dx, array_types):
|
||||
dx = ImmutableDenseNDimArray(dx)
|
||||
--- python3/sympy/tensor/array/ndim_array.py.orig 2017-07-26 16:46:12.000000000 -0600
|
||||
+++ python3/sympy/tensor/array/ndim_array.py 2018-06-27 18:47:21.848896952 -0600
|
||||
@@ -1,5 +1,5 @@
|
||||
from __future__ import print_function, division
|
||||
-import collections
|
||||
+import collections.abc
|
||||
|
||||
from sympy import Basic
|
||||
|
||||
@@ -100,13 +100,13 @@ class NDimArray(object):
|
||||
|
||||
def _setter_iterable_check(self, value):
|
||||
from sympy.matrices.matrices import MatrixBase
|
||||
- if isinstance(value, (collections.Iterable, MatrixBase, NDimArray)):
|
||||
+ if isinstance(value, (collections.abc.Iterable, MatrixBase, NDimArray)):
|
||||
raise NotImplementedError
|
||||
|
||||
@classmethod
|
||||
def _scan_iterable_shape(cls, iterable):
|
||||
def f(pointer):
|
||||
- if not isinstance(pointer, collections.Iterable):
|
||||
+ if not isinstance(pointer, collections.abc.Iterable):
|
||||
return [pointer], ()
|
||||
|
||||
result = []
|
||||
@@ -131,7 +131,7 @@ class NDimArray(object):
|
||||
shape = iterable.shape
|
||||
iterable = list(iterable)
|
||||
# Construct N-dim array from an iterable (numpy arrays included):
|
||||
- elif shape is None and isinstance(iterable, collections.Iterable):
|
||||
+ elif shape is None and isinstance(iterable, collections.abc.Iterable):
|
||||
iterable, shape = cls._scan_iterable_shape(iterable)
|
||||
|
||||
# Construct N-dim array from a Matrix:
|
||||
@@ -310,7 +310,7 @@ class NDimArray(object):
|
||||
def __mul__(self, other):
|
||||
from sympy.matrices.matrices import MatrixBase
|
||||
|
||||
- if isinstance(other, (collections.Iterable,NDimArray, MatrixBase)):
|
||||
+ if isinstance(other, (collections.abc.Iterable,NDimArray, MatrixBase)):
|
||||
raise ValueError("scalar expected, use tensorproduct(...) for tensorial product")
|
||||
other = sympify(other)
|
||||
result_list = [i*other for i in self]
|
||||
@@ -319,7 +319,7 @@ class NDimArray(object):
|
||||
def __rmul__(self, other):
|
||||
from sympy.matrices.matrices import MatrixBase
|
||||
|
||||
- if isinstance(other, (collections.Iterable,NDimArray, MatrixBase)):
|
||||
+ if isinstance(other, (collections.abc.Iterable,NDimArray, MatrixBase)):
|
||||
raise ValueError("scalar expected, use tensorproduct(...) for tensorial product")
|
||||
other = sympify(other)
|
||||
result_list = [other*i for i in self]
|
||||
@@ -328,7 +328,7 @@ class NDimArray(object):
|
||||
def __div__(self, other):
|
||||
from sympy.matrices.matrices import MatrixBase
|
||||
|
||||
- if isinstance(other, (collections.Iterable,NDimArray, MatrixBase)):
|
||||
+ if isinstance(other, (collections.abc.Iterable,NDimArray, MatrixBase)):
|
||||
raise ValueError("scalar expected")
|
||||
other = sympify(other)
|
||||
result_list = [i/other for i in self]
|
||||
--- python3/sympy/tensor/indexed.py.orig 2017-07-26 16:46:12.000000000 -0600
|
||||
+++ python3/sympy/tensor/indexed.py 2018-06-27 18:48:03.513804692 -0600
|
||||
@@ -107,7 +107,7 @@ matrix element ``M[i, j]`` as in the fol
|
||||
|
||||
from __future__ import print_function, division
|
||||
|
||||
-import collections
|
||||
+import collections.abc
|
||||
|
||||
from sympy.core.sympify import _sympify
|
||||
from sympy.functions.special.tensor_functions import KroneckerDelta
|
||||
@@ -153,7 +153,7 @@ class Indexed(Expr):
|
||||
raise TypeError(filldedent("""
|
||||
Indexed expects string, Symbol, or IndexedBase as base."""))
|
||||
args = list(map(sympify, args))
|
||||
- if isinstance(base, (NDimArray, collections.Iterable, Tuple, MatrixBase)) and all([i.is_number for i in args]):
|
||||
+ if isinstance(base, (NDimArray, collections.abc.Iterable, Tuple, MatrixBase)) and all([i.is_number for i in args]):
|
||||
if len(args) == 1:
|
||||
return base[args[0]]
|
||||
else:
|
||||
@@ -376,7 +376,7 @@ class IndexedBase(Expr, NotIterable):
|
||||
pass
|
||||
elif isinstance(label, (MatrixBase, NDimArray)):
|
||||
return label
|
||||
- elif isinstance(label, collections.Iterable):
|
||||
+ elif isinstance(label, collections.abc.Iterable):
|
||||
return _sympify(label)
|
||||
else:
|
||||
label = _sympify(label)
|
|
@ -0,0 +1,11 @@
|
|||
--- sympy-sympy-1.2/sympy/utilities/tests/test_code_quality.py.orig 2018-07-09 10:27:56.000000000 -0600
|
||||
+++ sympy-sympy-1.2/sympy/utilities/tests/test_code_quality.py 2018-07-11 19:39:24.848490432 -0600
|
||||
@@ -227,6 +227,8 @@ def test_files():
|
||||
# these two are import timing tests:
|
||||
"%(sep)sbin%(sep)ssympy_time.py" % sepd,
|
||||
"%(sep)sbin%(sep)ssympy_time_cache.py" % sepd,
|
||||
+ # this is a glob in a comment
|
||||
+ "%(sep)sbin%(sep)stest_external_imports.py" % sepd,
|
||||
# Taken from Python stdlib:
|
||||
"%(sep)sparsing%(sep)ssympy_tokenize.py" % sepd,
|
||||
# this one should be fixed:
|
32
sympy.spec
32
sympy.spec
|
@ -1,14 +1,16 @@
|
|||
Name: sympy
|
||||
Version: 1.1.1
|
||||
Release: 6%{?dist}
|
||||
Version: 1.2
|
||||
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
|
||||
# Remove tests that fail on non-x86 architectures
|
||||
Patch0: %{name}-float.patch
|
||||
# Adapt to changes in python 3.7
|
||||
Patch1: %{name}-python3.patch
|
||||
# The code quality tester bogusly fails on a comment
|
||||
Patch1: %{name}-test-code-quality.patch
|
||||
# Fix a couple of documentation typos
|
||||
Patch2: %{name}-doc.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
@ -17,14 +19,15 @@ BuildRequires: gettext
|
|||
BuildRequires: graphviz
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: librsvg2-tools
|
||||
BuildRequires: python2-numpy python3-numpy
|
||||
BuildRequires: python2-numpy-f2py python3-numpy-f2py
|
||||
BuildRequires: python2-Cython python3-Cython
|
||||
BuildRequires: python2-devel python3-devel
|
||||
BuildRequires: python2-docutils
|
||||
BuildRequires: python3-docutils
|
||||
BuildRequires: python2-fastcache python3-fastcache
|
||||
BuildRequires: python2-gmpy2 python3-gmpy2
|
||||
BuildRequires: python2-matplotlib python3-matplotlib
|
||||
BuildRequires: python2-mpmath python3-mpmath
|
||||
BuildRequires: python2-numpy python3-numpy
|
||||
BuildRequires: python2-numpy-f2py python3-numpy-f2py
|
||||
BuildRequires: python2-scipy python3-scipy
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python2-theano python3-theano
|
||||
|
@ -106,6 +109,8 @@ HTML documentation for sympy.
|
|||
%prep
|
||||
%setup -q -c
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
|
||||
# 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)')
|
||||
|
@ -119,11 +124,6 @@ sed -i 's/StrictVersion/LooseVersion/g' %{sympydir}/sympy/external/importtools.p
|
|||
|
||||
# Make a copy for building the python3 version
|
||||
cp -a %{sympydir} python3
|
||||
%patch1
|
||||
|
||||
# One test gets an extra warning with python3
|
||||
sed -i '/Adaptive meshing could not be applied/d' \
|
||||
python3/sympy/plotting/tests/test_plot_implicit.py
|
||||
|
||||
# Do not depend on env
|
||||
for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" %{sympydir}); do
|
||||
|
@ -233,6 +233,7 @@ popd
|
|||
%doc %{sympydir}/AUTHORS %{sympydir}/CODE_OF_CONDUCT.md %{sympydir}/README.html
|
||||
%doc %{sympydir}/doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
|
||||
%license %{sympydir}/LICENSE
|
||||
%{python2_sitelib}/isympy.*
|
||||
%{python2_sitelib}/sympy/
|
||||
%{python2_sitelib}/sympy-%{version}-*.egg-info
|
||||
%{_bindir}/isympy
|
||||
|
@ -242,6 +243,8 @@ popd
|
|||
%doc python3/AUTHORS python3/CODE_OF_CONDUCT.md %{sympydir}/README.html
|
||||
%doc python3/doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
|
||||
%license python3/LICENSE
|
||||
%{python3_sitelib}/isympy.*
|
||||
%{python3_sitelib}/__pycache__/isympy.*
|
||||
%{python3_sitelib}/sympy/
|
||||
%{python3_sitelib}/sympy-%{version}-*.egg-info
|
||||
%{_bindir}/python3-isympy
|
||||
|
@ -260,6 +263,11 @@ popd
|
|||
%{_docdir}/%{name}-doc/html
|
||||
|
||||
%changelog
|
||||
* Sat Jul 21 2018 Jerry James <loganjerry@gmail.com> - 1.2-1
|
||||
- Update to 1.2 (bz 1599502)
|
||||
- Drop upstreamed -python3 patch
|
||||
- Add -test-code-quality and -doc patches
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue