Update to 0.7.5 (bz 1066951).

Binaries now default to using python3.
Use py3dir macro to simplify python3 build.
Add BRs for more comprehensive testing.
Workaround bz 1075826.
Add -test patch to fix Unicode problem in the tests.
This commit is contained in:
Jerry James 2014-03-14 17:03:02 -06:00
parent db28264a12
commit ff2f215e83
5 changed files with 291 additions and 154 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/sympy-0.7.4.tar.gz
/sympy-0.7.5.tar.gz

View File

@ -1 +1 @@
12432b35af31b31864a10993710f61a6 sympy-0.7.4.tar.gz
7de1adb49972a15a3dd975e879a2bea9 sympy-0.7.5.tar.gz

View File

@ -1,5 +1,5 @@
--- ./examples/advanced/autowrap_ufuncify.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./examples/advanced/autowrap_ufuncify.py 2013-12-09 12:00:00.000000000 -0700
--- ./examples/advanced/autowrap_ufuncify.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./examples/advanced/autowrap_ufuncify.py 2014-03-12 21:00:00.000000000 -0600
@@ -25,7 +25,7 @@ np = import_module('numpy')
if not np:
sys.exit("Cannot import numpy. Exiting.")
@ -9,8 +9,8 @@
from sympy.utilities.autowrap import ufuncify
from sympy.utilities.lambdify import implemented_function
from sympy import symbols, legendre, Plot, pprint
--- ./examples/advanced/pidigits.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./examples/advanced/pidigits.py 2013-12-09 12:00:00.000000000 -0700
--- ./examples/advanced/pidigits.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./examples/advanced/pidigits.py 2014-03-12 21:00:00.000000000 -0600
@@ -6,8 +6,8 @@ Example shows arbitrary precision using
computation of the digits of pi.
"""
@ -22,9 +22,9 @@
import math
from time import clock
--- ./setup.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./setup.py 2013-12-09 12:00:00.000000000 -0700
@@ -69,11 +69,6 @@ modules = [
--- ./setup.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./setup.py 2014-03-12 21:00:00.000000000 -0600
@@ -70,11 +70,6 @@ modules = [
'sympy.logic.utilities',
'sympy.matrices',
'sympy.matrices.expressions',
@ -36,7 +36,7 @@
'sympy.ntheory',
'sympy.parsing',
'sympy.physics',
@@ -237,7 +232,6 @@ tests = [
@@ -240,7 +235,6 @@ tests = [
'sympy.logic.tests',
'sympy.matrices.expressions.tests',
'sympy.matrices.tests',
@ -44,8 +44,8 @@
'sympy.ntheory.tests',
'sympy.parsing.tests',
'sympy.physics.hep.tests',
--- ./sympy/combinatorics/permutations.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/combinatorics/permutations.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/combinatorics/permutations.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/combinatorics/permutations.py 2014-03-12 21:00:00.000000000 -0600
@@ -9,7 +9,7 @@ from sympy.utilities.iterables import (f
has_dups, runs)
from sympy.polys.polytools import lcm
@ -55,8 +55,8 @@
def _af_rmul(a, b):
--- ./sympy/core/evalf.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/core/evalf.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/core/evalf.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/evalf.py 2014-03-12 21:00:00.000000000 -0600
@@ -6,19 +6,19 @@ from __future__ import print_function, d
import math
@ -86,8 +86,8 @@
from .compatibility import SYMPY_INTS
from .sympify import sympify
--- ./sympy/core/expr.py.orig 2013-12-09 11:33:19.370881936 -0700
+++ ./sympy/core/expr.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/core/expr.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/expr.py 2014-03-12 21:00:00.000000000 -0600
@@ -8,7 +8,7 @@ from .evalf import EvalfMixin, pure_comp
from .decorators import _sympifyit, call_highest_priority
from .cache import cacheit
@ -97,9 +97,9 @@
from collections import defaultdict
--- ./sympy/core/function.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/core/function.py 2013-12-09 12:00:00.000000000 -0700
@@ -51,8 +51,8 @@ from sympy.core.compatibility import str
--- ./sympy/core/function.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/function.py 2014-03-12 21:00:00.000000000 -0600
@@ -50,8 +50,8 @@ from sympy.core.compatibility import str
from sympy.utilities import default_sort_key
from sympy.utilities.iterables import uniq
@ -108,9 +108,9 @@
+import mpmath
+import mpmath.libmp as mlib
import inspect
def _coeff_isneg(a):
@@ -366,7 +366,7 @@ class Function(Application, Expr):
@@ -453,7 +453,7 @@ class Function(Application, Expr):
try:
args = [arg._to_mpmath(prec + 5) for arg in self.args]
def bad(m):
@ -119,7 +119,7 @@
# the precision of an mpf value is the last element
# if that is 1 (and m[1] is not 1 which would indicate a
# power of 2), then the eval failed; so check that none of
@@ -1130,7 +1130,7 @@ class Derivative(Expr):
@@ -1234,7 +1234,7 @@ class Derivative(Expr):
When we can represent derivatives at a point, this should be folded
into the normal evalf. For now, we need a special method.
"""
@ -128,9 +128,9 @@
from sympy.core.expr import Expr
if len(self.free_symbols) != 1 or len(self.variables) != 1:
raise NotImplementedError('partials and higher order derivatives')
--- ./sympy/core/numbers.py.orig 2013-12-09 11:33:19.373881932 -0700
+++ ./sympy/core/numbers.py 2013-12-09 12:00:00.000000000 -0700
@@ -15,11 +15,11 @@ from .cache import cacheit, clear_cache
--- ./sympy/core/numbers.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/numbers.py 2014-03-12 21:00:00.000000000 -0600
@@ -16,11 +16,11 @@ from .cache import cacheit, clear_cache
from sympy.core.compatibility import (
as_int, integer_types, long, string_types, with_metaclass, HAS_GMPY,
SYMPY_INTS)
@ -147,8 +147,8 @@
finf as _mpf_inf, fninf as _mpf_ninf,
fnan as _mpf_nan, fzero as _mpf_zero, _normalize as mpf_normalize,
prec_to_dps)
--- ./sympy/core/power.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/core/power.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/core/power.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/power.py 2014-03-12 21:00:00.000000000 -0600
@@ -13,7 +13,7 @@ from sympy.core.function import (_coeff_
from sympy.core.logic import fuzzy_bool
from sympy.core.compatibility import as_int, xrange
@ -158,19 +158,19 @@
from sympy.utilities.iterables import sift
--- ./sympy/core/sets.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/core/sets.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/core/sets.py.orig 2014-03-12 21:00:00.000000000 -0600
+++ ./sympy/core/sets.py 2014-03-12 21:00:00.000000000 -0600
@@ -9,7 +9,7 @@ from sympy.core.evalf import EvalfMixin
from sympy.core.numbers import Float
from sympy.core.compatibility import iterable, with_metaclass
-from sympy.mpmath import mpi, mpf
+from mpmath import mpi, mpf
from sympy.assumptions import ask
from sympy.logic.boolalg import And, Or, true, false
--- ./sympy/core/tests/test_evalf.py.orig 2013-12-09 11:33:19.375881929 -0700
+++ ./sympy/core/tests/test_evalf.py 2013-12-09 12:00:00.000000000 -0700
from sympy.utilities import default_sort_key
--- ./sympy/core/tests/test_evalf.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/tests/test_evalf.py 2014-03-12 21:00:00.000000000 -0600
@@ -3,9 +3,9 @@ from sympy import (Add, ceiling, cos, E,
sin, sqrt, sstr, Sum, sympify, S, integrate, atan, product)
from sympy.core.evalf import complex_accuracy, PrecisionExhausted, scaled_zero
@ -183,8 +183,8 @@
from sympy.utilities.pytest import raises, XFAIL
--- ./sympy/core/tests/test_numbers.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/core/tests/test_numbers.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/core/tests/test_numbers.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/tests/test_numbers.py 2014-03-12 21:00:00.000000000 -0600
@@ -6,9 +6,9 @@ from sympy.core.basic import _aresame
from sympy.core.compatibility import long, u
from sympy.core.power import integer_nthroot
@ -197,7 +197,7 @@
def test_integers_cache():
@@ -1319,8 +1319,8 @@ def test_issue_1073():
@@ -1347,8 +1347,8 @@ def test_issue_1073():
@XFAIL
def test_mpmath_issues():
@ -208,7 +208,7 @@
rnd = mlib.round_nearest
mpf = (0, long(0), -123, -1, 53, rnd) # nan
assert _normalize(mpf, 53) != (0, long(0), 0, 0)
@@ -1329,7 +1329,7 @@ def test_mpmath_issues():
@@ -1357,7 +1357,7 @@ def test_mpmath_issues():
mpf = (1, long(0), -789, -3, 53, rnd) # -inf
assert _normalize(mpf, 53) != (0, long(0), 0, 0)
@ -217,7 +217,7 @@
assert mlib.mpf_eq(fnan, fnan)
@@ -1360,7 +1360,7 @@ def test_int_NumberSymbols():
@@ -1388,7 +1388,7 @@ def test_int_NumberSymbols():
def test_3541():
@ -226,19 +226,19 @@
_normalize as mpf_normalize, finf, fninf, fzero)
# fnan is not included because Float no longer returns fnan,
# but otherwise, the same sort of test could apply
--- ./sympy/core/tests/test_sets.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/core/tests/test_sets.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/core/tests/test_sets.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/tests/test_sets.py 2014-03-12 21:00:00.000000000 -0600
@@ -2,7 +2,7 @@ from sympy import (Symbol, Set, Union, I
GreaterThan, LessThan, Max, Min, And, Or, Eq, Ge, Le, Gt, Lt, Float,
FiniteSet, Intersection, imageset, I, true, false
FiniteSet, Intersection, imageset, I, true, false, ProductSet, E
)
-from sympy.mpmath import mpi
+from mpmath import mpi
from sympy.utilities.pytest import raises
from sympy.utilities.pytest import raises, XFAIL
--- ./sympy/core/tests/test_sympify.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/core/tests/test_sympify.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/core/tests/test_sympify.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/tests/test_sympify.py 2014-03-12 21:00:00.000000000 -0600
@@ -11,7 +11,7 @@ from sympy.functions.combinatorial.facto
from sympy.abc import _clash, _clash1, _clash2
from sympy.core.compatibility import exec_, HAS_GMPY
@ -248,8 +248,8 @@
def test_439():
--- ./sympy/core/tests/test_wester.py.orig 2013-12-09 11:33:19.380881923 -0700
+++ ./sympy/core/tests/test_wester.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/core/tests/test_wester.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/core/tests/test_wester.py 2014-03-12 21:00:00.000000000 -0600
@@ -6,6 +6,7 @@ See also http://math.unm.edu/~wester/cas
each tested system.
"""
@ -276,8 +276,8 @@
from sympy.matrices import Matrix, GramSchmidt, eye
from sympy.matrices.expressions.blockmatrix import BlockMatrix, block_collapse
from sympy.matrices.expressions import MatrixSymbol, ZeroMatrix
--- ./sympy/external/tests/test_numpy.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/external/tests/test_numpy.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/external/tests/test_numpy.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/external/tests/test_numpy.py 2014-03-12 21:00:00.000000000 -0600
@@ -27,7 +27,7 @@ from sympy import (Rational, Symbol, lis
symarray, symbols, Integer)
import sympy
@ -287,8 +287,8 @@
from sympy.abc import x, y, z
from sympy.utilities.decorator import conserve_mpmath_dps
--- ./sympy/functions/combinatorial/numbers.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/functions/combinatorial/numbers.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/functions/combinatorial/numbers.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/functions/combinatorial/numbers.py 2014-03-12 21:00:00.000000000 -0600
@@ -15,8 +15,8 @@ from sympy.core.compatibility import as_
from sympy.core.cache import cacheit
from sympy.functions.combinatorial.factorials import factorial
@ -300,7 +300,7 @@
def _product(a, b):
@@ -635,7 +635,7 @@ class euler(Function):
@@ -631,7 +631,7 @@ class euler(Function):
if m.is_odd:
return S.Zero
if m.is_Integer and m.is_nonnegative:
@ -309,7 +309,7 @@
m = m._to_mpmath(mp.prec)
res = mp.eulernum(m, exact=True)
return Integer(res)
@@ -654,7 +654,7 @@ class euler(Function):
@@ -650,7 +650,7 @@ class euler(Function):
m = self.args[0]
if m.is_Integer and m.is_nonnegative:
@ -318,9 +318,9 @@
from sympy import Expr
m = m._to_mpmath(prec)
oprec = mp.prec
--- ./sympy/functions/special/bessel.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/functions/special/bessel.py 2013-12-09 12:00:00.000000000 -0700
@@ -708,8 +708,8 @@ def jn_zeros(n, k, method="sympy", dps=1
--- ./sympy/functions/special/bessel.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/functions/special/bessel.py 2014-03-12 21:00:00.000000000 -0600
@@ -706,8 +706,8 @@ def jn_zeros(n, k, method="sympy", dps=1
from math import pi
if method == "sympy":
@ -331,9 +331,27 @@
from sympy import Expr
prec = dps_to_prec(dps)
return [Expr._from_mpmath(besseljzero(S(n + 0.5)._to_mpmath(prec),
--- ./sympy/functions/special/error_functions.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/functions/special/error_functions.py 2013-12-09 12:00:00.000000000 -0700
@@ -1323,7 +1323,7 @@ class li(Function):
@@ -1209,7 +1209,7 @@ class airyaiprime(AiryBase):
raise ArgumentIndexError(self, argindex)
def _eval_evalf(self, prec):
- from sympy.mpmath import mp
+ from mpmath import mp
from sympy import Expr
z = self.args[0]._to_mpmath(prec)
oprec = mp.prec
@@ -1367,7 +1367,7 @@ class airybiprime(AiryBase):
raise ArgumentIndexError(self, argindex)
def _eval_evalf(self, prec):
- from sympy.mpmath import mp
+ from mpmath import mp
from sympy import Expr
z = self.args[0]._to_mpmath(prec)
oprec = mp.prec
--- ./sympy/functions/special/error_functions.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/functions/special/error_functions.py 2014-03-12 21:00:00.000000000 -0600
@@ -1339,7 +1339,7 @@ class li(Function):
We can even compute Soldner's constant by the help of mpmath:
@ -342,9 +360,9 @@
>>> findroot(li, 2)
1.45136923488338
--- ./sympy/functions/special/gamma_functions.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/functions/special/gamma_functions.py 2013-12-09 12:00:00.000000000 -0700
@@ -228,7 +228,7 @@ class lowergamma(Function):
--- ./sympy/functions/special/gamma_functions.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/functions/special/gamma_functions.py 2014-03-12 21:00:00.000000000 -0600
@@ -296,7 +296,7 @@ class lowergamma(Function):
return (cls(a + 1, x) + x**a * C.exp(-x))/a
def _eval_evalf(self, prec):
@ -353,7 +371,7 @@
from sympy import Expr
a = self.args[0]._to_mpmath(prec)
z = self.args[1]._to_mpmath(prec)
@@ -320,7 +320,7 @@ class uppergamma(Function):
@@ -397,7 +397,7 @@ class uppergamma(Function):
raise ArgumentIndexError(self, argindex)
def _eval_evalf(self, prec):
@ -362,9 +380,9 @@
from sympy import Expr
a = self.args[0]._to_mpmath(prec)
z = self.args[1]._to_mpmath(prec)
--- ./sympy/functions/special/hyper.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/functions/special/hyper.py 2013-12-09 12:00:00.000000000 -0700
@@ -602,7 +602,8 @@ class meijerg(TupleParametersBase):
--- ./sympy/functions/special/hyper.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/functions/special/hyper.py 2014-03-12 21:00:00.000000000 -0600
@@ -600,7 +600,8 @@ class meijerg(TupleParametersBase):
# (carefully so as not to loose the branch information), and evaluate
# G(z'**(1/r)) = G(z'**n) = G(z).
from sympy.functions import exp_polar, ceiling
@ -374,9 +392,9 @@
z = self.argument
znum = self.argument._eval_evalf(prec)
if znum.has(exp_polar):
--- ./sympy/functions/special/spherical_harmonics.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/functions/special/spherical_harmonics.py 2013-12-09 12:00:00.000000000 -0700
@@ -219,7 +219,7 @@ class Ynm(Function):
--- ./sympy/functions/special/spherical_harmonics.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/functions/special/spherical_harmonics.py 2014-03-12 21:00:00.000000000 -0600
@@ -217,7 +217,7 @@ class Ynm(Function):
# Note: works without this function by just calling
# mpmath for Legendre polynomials. But using
# the dedicated function directly is cleaner.
@ -385,8 +403,19 @@
from sympy import Expr
n = self.args[0]._to_mpmath(prec)
m = self.args[1]._to_mpmath(prec)
--- ./sympy/liealgebras/weyl_group.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/liealgebras/weyl_group.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/geometry/ellipse.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/geometry/ellipse.py 2014-03-12 21:00:00.000000000 -0600
@@ -24,7 +24,7 @@ from .entity import GeometryEntity
from .point import Point
from .line import LinearEntity, Line
from .util import _symbol, idiff
-from sympy.mpmath import findroot as nroot
+from mpmath import findroot as nroot
import random
--- ./sympy/liealgebras/weyl_group.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/liealgebras/weyl_group.py 2014-03-12 21:00:00.000000000 -0600
@@ -3,7 +3,7 @@
from sympy.core import Basic, Rational
from sympy.core.numbers import igcd
@ -396,9 +425,9 @@
from operator import itemgetter
from itertools import groupby
from sympy.matrices import Matrix, eye
--- ./sympy/matrices/matrices.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/matrices/matrices.py 2013-12-09 12:00:00.000000000 -0700
@@ -1259,7 +1259,7 @@ class MatrixBase(object):
--- ./sympy/matrices/matrices.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/matrices/matrices.py 2014-03-12 21:00:00.000000000 -0600
@@ -1214,7 +1214,7 @@ class MatrixBase(object):
"""Solve the linear system Ax = rhs for x where A = self.
This is for symbolic matrices, for real or complex ones use
@ -407,7 +436,7 @@
See Also
========
@@ -1636,7 +1636,7 @@ class MatrixBase(object):
@@ -1591,7 +1591,7 @@ class MatrixBase(object):
to use QRsolve.
This is mainly for educational purposes and symbolic matrices, for real
@ -416,8 +445,8 @@
See Also
========
--- ./sympy/ntheory/partitions_.py.orig 2013-12-09 11:33:19.386881915 -0700
+++ ./sympy/ntheory/partitions_.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/ntheory/partitions_.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/ntheory/partitions_.py 2014-03-12 21:00:00.000000000 -0600
@@ -1,6 +1,6 @@
from __future__ import print_function, division
@ -426,8 +455,8 @@
from_man_exp, from_int, from_rational,
fone, fhalf, bitcount, to_int, to_str, mpf_mul, mpf_div, mpf_sub,
mpf_add, mpf_sqrt, mpf_pi, mpf_cosh_sinh, pi_fixed, mpf_cos)
--- ./sympy/physics/quantum/constants.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/physics/quantum/constants.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/physics/quantum/constants.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/physics/quantum/constants.py 2014-03-12 21:00:00.000000000 -0600
@@ -6,7 +6,7 @@ from sympy.core.numbers import NumberSym
from sympy.core.singleton import Singleton
from sympy.core.compatibility import u, with_metaclass
@ -437,8 +466,8 @@
#-----------------------------------------------------------------------------
# Constants
--- ./sympy/physics/quantum/qubit.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/physics/quantum/qubit.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/physics/quantum/qubit.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/physics/quantum/qubit.py 2014-03-12 21:00:00.000000000 -0600
@@ -24,7 +24,7 @@ from sympy.physics.quantum.represent imp
from sympy.physics.quantum.matrixutils import (
numpy_ndarray, scipy_sparse_matrix
@ -448,8 +477,8 @@
__all__ = [
'Qubit',
--- ./sympy/polys/domains/groundtypes.py.orig 2013-12-09 11:33:19.387881913 -0700
+++ ./sympy/polys/domains/groundtypes.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/polys/domains/groundtypes.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/polys/domains/groundtypes.py 2014-03-12 21:00:00.000000000 -0600
@@ -69,7 +69,7 @@ else:
gmpy_qdiv = None
@ -459,8 +488,8 @@
def python_sqrt(n):
--- ./sympy/polys/domains/mpelements.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/polys/domains/mpelements.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/polys/domains/mpelements.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/polys/domains/mpelements.py 2014-03-12 21:00:00.000000000 -0600
@@ -4,11 +4,11 @@ from __future__ import print_function, d
from sympy.polys.domains.domainelement import DomainElement
@ -476,8 +505,8 @@
from sympy.utilities import public
--- ./sympy/polys/modulargcd.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/polys/modulargcd.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/polys/modulargcd.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/polys/modulargcd.py 2014-03-12 21:00:00.000000000 -0600
@@ -7,7 +7,7 @@ from sympy.polys.polyerrors import Modul
from sympy.polys.domains import PolynomialRing
@ -487,8 +516,8 @@
from sympy import Dummy
import random
--- ./sympy/polys/numberfields.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/polys/numberfields.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/polys/numberfields.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/polys/numberfields.py 2014-03-12 21:00:00.000000000 -0600
@@ -43,7 +43,7 @@ from sympy.core.exprtools import Factors
from sympy.simplify.simplify import _mexpand, _is_sum_surds
from sympy.ntheory import sieve
@ -498,8 +527,8 @@
from sympy.core.compatibility import reduce
from sympy.core.compatibility import xrange
--- ./sympy/polys/polytools.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/polys/polytools.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/polys/polytools.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/polys/polytools.py 2014-03-12 21:00:00.000000000 -0600
@@ -47,7 +47,7 @@ from sympy.polys.polyerrors import (
from sympy.utilities import group, sift, public
@ -509,7 +538,7 @@
from sympy.polys.domains import FF, QQ
from sympy.polys.constructor import construct_domain
@@ -3220,17 +3220,17 @@ class Poly(Expr):
@@ -3370,17 +3370,17 @@ class Poly(Expr):
coeffs = [coeff.evalf(n=n).as_real_imag()
for coeff in f.all_coeffs()]
@ -531,7 +560,7 @@
coeffs, maxsteps=maxsteps, cleanup=cleanup, error=error)
if error:
@@ -3240,7 +3240,7 @@ class Poly(Expr):
@@ -3390,7 +3390,7 @@ class Poly(Expr):
roots = list(map(sympify, sorted(roots, key=lambda r: (r.real, r.imag))))
finally:
@ -540,8 +569,8 @@
if error is not None:
return roots, sympify(error)
--- ./sympy/polys/rootoftools.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/polys/rootoftools.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/polys/rootoftools.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/polys/rootoftools.py 2014-03-12 21:00:00.000000000 -0600
@@ -25,8 +25,8 @@ from sympy.polys.polyerrors import (
from sympy.polys.domains import QQ
@ -553,8 +582,8 @@
from sympy.utilities import lambdify, public
--- ./sympy/printing/latex.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/printing/latex.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/printing/latex.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/printing/latex.py 2014-03-12 21:00:00.000000000 -0600
@@ -15,8 +15,8 @@ from .printer import Printer
from .conventions import split_super_sub, requires_partial
from .precedence import precedence, PRECEDENCE
@ -566,8 +595,8 @@
from sympy.core.compatibility import default_sort_key, xrange
from sympy.utilities.iterables import has_variety
--- ./sympy/printing/repr.py.orig 2013-12-09 11:33:19.393881905 -0700
+++ ./sympy/printing/repr.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/printing/repr.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/printing/repr.py 2014-03-12 21:00:00.000000000 -0600
@@ -9,8 +9,8 @@ from __future__ import print_function, d
from sympy.core.function import AppliedUndef
@ -579,8 +608,8 @@
class ReprPrinter(Printer):
--- ./sympy/printing/str.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/printing/str.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/printing/str.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/printing/str.py 2014-03-12 21:00:00.000000000 -0600
@@ -10,8 +10,8 @@ from sympy.core.numbers import Integer
from .printer import Printer
from sympy.printing.precedence import precedence, PRECEDENCE
@ -592,8 +621,8 @@
from sympy.utilities import default_sort_key
--- ./sympy/simplify/simplify.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/simplify/simplify.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/simplify/simplify.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/simplify/simplify.py 2014-03-12 21:00:00.000000000 -0600
@@ -33,7 +33,7 @@ from sympy.ntheory.factor_ import multip
from sympy.polys import (Poly, together, reduced, cancel, factor,
ComputationFailed, lcm, gcd)
@ -603,18 +632,18 @@
def _mexpand(expr):
--- ./sympy/solvers/solvers.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/solvers/solvers.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/solvers/solvers.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/solvers/solvers.py 2014-03-12 21:00:00.000000000 -0600
@@ -47,7 +47,7 @@ from sympy.utilities.lambdify import lam
from sympy.utilities.misc import filldedent
from sympy.utilities.iterables import uniq
from sympy.utilities.iterables import uniq, generate_bell, flatten
-from sympy.mpmath import findroot
+from mpmath import findroot
from sympy.solvers.polysys import solve_poly_system
from sympy.solvers.inequalities import reduce_inequalities
@@ -2283,8 +2283,8 @@ def nsolve(*args, **kwargs):
@@ -2399,8 +2399,8 @@ def nsolve(*args, **kwargs):
Overdetermined systems are supported.
>>> from sympy import Symbol, nsolve
@ -625,8 +654,8 @@
>>> x1 = Symbol('x1')
>>> x2 = Symbol('x2')
>>> f1 = 3 * x1**2 - 2 * x2**2 - 1
--- ./sympy/solvers/tests/test_numeric.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/solvers/tests/test_numeric.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/solvers/tests/test_numeric.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/solvers/tests/test_numeric.py 2014-03-12 21:00:00.000000000 -0600
@@ -1,5 +1,5 @@
from sympy import Eq, Matrix, pi, sin, sqrt, Symbol, Integral, Piecewise, symbols
-from sympy.mpmath import mnorm, mpf
@ -634,9 +663,9 @@
from sympy.solvers import nsolve
from sympy.utilities.lambdify import lambdify
from sympy.utilities.pytest import raises, XFAIL
--- ./sympy/statistics/distributions.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/statistics/distributions.py 2013-12-09 12:00:00.000000000 -0700
@@ -212,7 +212,7 @@ class Normal(ContinuousProbability):
--- ./sympy/statistics/distributions.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/statistics/distributions.py 2014-03-12 21:00:00.000000000 -0600
@@ -213,7 +213,7 @@ class Normal(ContinuousProbability):
# error function is not yet implemented in SymPy but can easily be
# computed numerically
@ -645,8 +674,8 @@
# calculate y = ierf(p) by solving erf(y) - p = 0
y = erfinv(mpf(p))
--- ./sympy/statistics/tests/test_statistics.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/statistics/tests/test_statistics.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/statistics/tests/test_statistics.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/statistics/tests/test_statistics.py 2014-03-12 21:00:00.000000000 -0600
@@ -3,7 +3,7 @@ from sympy.functions import erf
from operator import abs
@ -656,8 +685,8 @@
from sympy.utilities.tests.test_pickling import check
--- ./sympy/utilities/decorator.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/utilities/decorator.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/utilities/decorator.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/utilities/decorator.py 2014-03-12 21:00:00.000000000 -0600
@@ -81,7 +81,7 @@ def conserve_mpmath_dps(func):
"""After the function finishes, resets the value of mpmath.mp.dps to
the value it had before the function was run."""
@ -667,9 +696,9 @@
def func_wrapper():
dps = mpmath.mp.dps
--- ./sympy/utilities/lambdify.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/utilities/lambdify.py 2013-12-09 12:00:00.000000000 -0700
@@ -86,7 +86,7 @@ NUMPY_TRANSLATIONS = {
--- ./sympy/utilities/lambdify.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/utilities/lambdify.py 2014-03-12 21:00:00.000000000 -0600
@@ -87,7 +87,7 @@ NUMPY_TRANSLATIONS = {
# Available modules:
MODULES = {
"math": (MATH, MATH_DEFAULT, MATH_TRANSLATIONS, ("from math import *",)),
@ -678,9 +707,9 @@
"numpy": (NUMPY, NUMPY_DEFAULT, NUMPY_TRANSLATIONS, ("import_module('numpy')",)),
"sympy": (SYMPY, SYMPY_DEFAULT, {}, (
"from sympy.functions import *",
--- ./sympy/utilities/runtests.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/utilities/runtests.py 2013-12-09 12:00:00.000000000 -0700
@@ -571,7 +571,7 @@ def _doctest(*paths, **kwargs):
--- ./sympy/utilities/runtests.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/utilities/runtests.py 2014-03-12 21:00:00.000000000 -0600
@@ -552,7 +552,7 @@ def _doctest(*paths, **kwargs):
split = kwargs.get('split', None)
blacklist.extend([
"doc/src/modules/mpmath", # needs to be fixed upstream
@ -689,8 +718,8 @@
"doc/src/modules/plotting.rst", # generates live plots
"sympy/statistics", # prints a deprecation
"doc/src/modules/statistics.rst", # warning (the module is deprecated)
--- ./sympy/utilities/tests/diagnose_imports.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/utilities/tests/diagnose_imports.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/utilities/tests/diagnose_imports.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/utilities/tests/diagnose_imports.py 2014-03-12 21:00:00.000000000 -0600
@@ -117,7 +117,7 @@ if __name__ == "__main__":
"""Is module relevant for import checking?
@ -700,8 +729,8 @@
sorted_messages = []
--- ./sympy/utilities/tests/test_lambdify.py.orig 2013-12-08 17:31:28.000000000 -0700
+++ ./sympy/utilities/tests/test_lambdify.py 2013-12-09 12:00:00.000000000 -0700
--- ./sympy/utilities/tests/test_lambdify.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/utilities/tests/test_lambdify.py 2014-03-12 21:00:00.000000000 -0600
@@ -3,7 +3,7 @@ from sympy import (
symbols, lambdify, sqrt, sin, cos, pi, atan, Rational, Float,
Matrix, Lambda, exp, Integral, oo, I, Abs, Function, true, false)

86
sympy-test.patch Normal file
View File

@ -0,0 +1,86 @@
--- ./sympy/physics/vector/tests/test_printing.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/physics/vector/tests/test_printing.py 2014-03-14 15:34:37.122395476 -0600
@@ -1,4 +1,4 @@
-from sympy import symbols, sin, cos, sqrt, Function
+from sympy import symbols, sin, cos, sqrt, Function, pprint_use_unicode
from sympy.core.compatibility import u
from sympy.physics.vector import ReferenceFrame, dynamicsymbols
from sympy.physics.vector.printing import (VectorPrettyPrinter,
@@ -35,16 +35,26 @@ def test_vector_pretty_print():
pp = VectorPrettyPrinter()
- expected = u(' 2\na \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m + b \x1b[94m'
- '\x1b[1mn_y\x1b[0;0m\x1b[0;0m + c\u22c5sin(\u03b1) \x1b[9'
- '4m\x1b[1mn_z\x1b[0;0m\x1b[0;0m')
+ if (pprint_use_unicode()):
+ expected = u(' 2\na \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m + b \x1b[94m'
+ '\x1b[1mn_y\x1b[0;0m\x1b[0;0m + c\u22c5sin(\u03b1) \x1b[9'
+ '4m\x1b[1mn_z\x1b[0;0m\x1b[0;0m')
+ else:
+ expected = u(' 2\na \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m + b \x1b[94m'
+ '\x1b[1mn_y\x1b[0;0m\x1b[0;0m + c*sin(alpha) \x1b[9'
+ '4m\x1b[1mn_z\x1b[0;0m\x1b[0;0m')
assert expected == pp.doprint(v)
assert expected == v._pretty().render()
- expected = u('\u03b1 \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m + sin(\u03c9'
- ') \x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m + \u03b1\u22c5'
- '\u03b2 \x1b[94m\x1b[1mn_z\x1b[0;0m\x1b[0;0m')
+ if (pprint_use_unicode()):
+ expected = u('\u03b1 \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m + sin(\u03c9'
+ ') \x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m + \u03b1\u22c5'
+ '\u03b2 \x1b[94m\x1b[1mn_z\x1b[0;0m\x1b[0;0m')
+ else:
+ expected = u('alpha \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m + sin(omega'
+ ') \x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m + alpha*'
+ 'beta \x1b[94m\x1b[1mn_z\x1b[0;0m\x1b[0;0m')
assert expected == pp.doprint(w)
assert expected == w._pretty().render()
@@ -128,20 +138,34 @@ def test_vector_latex_with_functions():
def test_dyadic_pretty_print():
- expected = u(' 2\na \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m\u2297\x1b[94'
- 'm\x1b[1mn_y\x1b[0;0m\x1b[0;0m + b \x1b[94m\x1b[1mn_y\x1b'
- '[0;0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m'
- ' + c\u22c5sin(\u03b1) \x1b[94m\x1b[1mn_z\x1b[0;0m\x1b[0;'
- '0m\u2297\x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m')
+ if (pprint_use_unicode()):
+ expected = u(' 2\na \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m\u2297\x1b[94'
+ 'm\x1b[1mn_y\x1b[0;0m\x1b[0;0m + b \x1b[94m\x1b[1mn_y\x1b'
+ '[0;0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m'
+ ' + c\u22c5sin(\u03b1) \x1b[94m\x1b[1mn_z\x1b[0;0m\x1b[0;'
+ '0m\u2297\x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m')
+ else:
+ expected = u(' 2\na \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m\u2297\x1b[94'
+ 'm\x1b[1mn_y\x1b[0;0m\x1b[0;0m + b \x1b[94m\x1b[1mn_y\x1b'
+ '[0;0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m'
+ ' + c*sin(alpha) \x1b[94m\x1b[1mn_z\x1b[0;0m\x1b[0;'
+ '0m\u2297\x1b[94m\x1b[1mn_y\x1b[0;0m\x1b[0;0m')
result = y._pretty().render()
assert expected == result
- expected = u('\u03b1 \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m\u2297\x1b[94'
- 'm\x1b[1mn_x\x1b[0;0m\x1b[0;0m + sin(\u03c9) \x1b[94m\x1b'
- '[1mn_y\x1b[0;0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_z\x1b[0;0'
- 'm\x1b[0;0m + \u03b1\u22c5\u03b2 \x1b[94m\x1b[1mn_z\x1b[0'
- ';0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m')
+ if (pprint_use_unicode()):
+ expected = u('\u03b1 \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m\u2297\x1b[94'
+ 'm\x1b[1mn_x\x1b[0;0m\x1b[0;0m + sin(\u03c9) \x1b[94m\x1b'
+ '[1mn_y\x1b[0;0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_z\x1b[0;0'
+ 'm\x1b[0;0m + \u03b1\u22c5\u03b2 \x1b[94m\x1b[1mn_z\x1b[0'
+ ';0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m')
+ else:
+ expected = u('alpha \x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m\u2297\x1b[94'
+ 'm\x1b[1mn_x\x1b[0;0m\x1b[0;0m + sin(omega) \x1b[94m\x1b'
+ '[1mn_y\x1b[0;0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_z\x1b[0;0'
+ 'm\x1b[0;0m + alpha*beta \x1b[94m\x1b[1mn_z\x1b[0'
+ ';0m\x1b[0;0m\u2297\x1b[94m\x1b[1mn_x\x1b[0;0m\x1b[0;0m')
result = x._pretty().render()

View File

@ -1,5 +1,5 @@
Name: sympy
Version: 0.7.4
Version: 0.7.5
Release: 1%{?dist}
Summary: A Python library for symbolic mathematics
License: BSD
@ -7,17 +7,29 @@ URL: http://sympy.org/
Source0: https://github.com/%{name}/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
# Upstream tried to graft in another project as a private copy; we rip
# it out (rhbz# 551576):
Patch0: %{name}-0.7.4-strip-internal-mpmath.patch
Patch0: %{name}-0.7.5-strip-internal-mpmath.patch
# The test driver disables Unicode output, but the printing test expects to
# see Unicode output. Until upstream fixes this, patch the test so that it
# expects Unicode output if Unicode output is active, otherwise ASCII output.
Patch1: %{name}-0.7.5-test.patch
BuildArch: noarch
BuildRequires: gcc-gfortran
BuildRequires: gettext
BuildRequires: graphviz
BuildRequires: ImageMagick
BuildRequires: librsvg2-tools
BuildRequires: numpy python3-numpy
BuildRequires: numpy-f2py python3-numpy-f2py
BuildRequires: python2-devel python3-devel
BuildRequires: python-matplotlib python3-matplotlib
BuildRequires: python-mpmath python3-mpmath
BuildRequires: python-sphinx
BuildRequires: scipy python3-scipy
BuildRequires: tex(latex)
BuildRequires: tex-dvipng
BuildRequires: xorg-x11-fonts-Type1
BuildRequires: xorg-x11-server-Xvfb
Requires: python-matplotlib
Requires: python-mpmath
@ -65,51 +77,52 @@ HTML documentation for sympy.
%prep
%setup -q
%patch0 -b .mpmath
%patch1
rm -rf sympy/mpmath doc/src/modules/mpmath
rm -rf %{name}-%{version}/sympy/mpmath %{name}-%{version}/doc/src/module/mpmath
# Help the dependency generator
sed 's/env python/python2/' bin/isympy > bin/isympy.new
touch -r bin/isympy bin/isympy.new
mv -f bin/isympy.new bin/isympy
# Make a copy for building the python3 version
cp -a . ../foo
mv ../foo sympy-0.7.4
cp -a . %{py3dir}
# Workaround for bz 1075826. Remove this when that bug is resolved.
mkdir -p doc/_build/html
cp -p doc/src/_static/sympylogo.png doc
%build
# Build the python2 version
python2 setup.py build
# Build the python3 version
cd %{name}-%{version}
pushd %{py3dir}
python3 setup.py build
popd
# Build the documentation
cd ../doc
cd doc
make html
make cheatsheet
cd ../%{name}-%{version}/doc
pushd %{py3dir}/doc
make cheatsheet
popd
%install
# Install the python3 version
cd %{name}-%{version}
python3 setup.py install -O1 --skip-build --root %{buildroot}
sed 's/python2/python3/' %{buildroot}%{_bindir}/isympy > \
%{buildroot}%{_bindir}/isympy3
touch -r %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/isympy3
rm -f %{buildroot}%{_bindir}/isympy
cd ..
# Install the python2 version
python2 setup.py install -O1 --skip-build --root %{buildroot}
# Install the python3 version
pushd %{py3dir}
python3 setup.py install -O1 --skip-build --root %{buildroot}
sed -i 's/env python/python3/' %{buildroot}%{_bindir}/isympy
touch -r bin/isympy %{buildroot}%{_bindir}/isympy
popd
## Remove extra files
rm -f %{buildroot}%{_bindir}/{,doc}test
## Install the TeXmacs integration
cp -p data/TeXmacs/bin/tm_sympy %{buildroot}%{_bindir}
sed 's/python/python3/' data/TeXmacs/bin/tm_sympy > \
%{buildroot}%{_bindir}/tm_sympy
touch -r data/TeXmacs/bin/tm_sympy %{buildroot}%{_bindir}/tm_sympy
mkdir -p %{buildroot}%{_datadir}/TeXmacs/plugins/sympy
cp -a data/TeXmacs/progs %{buildroot}%{_datadir}/TeXmacs/plugins/sympy
@ -125,24 +138,25 @@ rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n
%check
# The python3 tests fail with Unicode errors without this
export LC_ALL=en_US.UTF-8
python2 setup.py test
cd %{name}-%{version}
python3 setup.py test
let "dnum = $RANDOM % 90 + 10"
xvfb-run -n $dnum python2 setup.py test
pushd %{py3dir}
xvfb-run -n $dnum python3 setup.py test
popd
%files
%doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
%{python2_sitelib}/sympy/
%{python2_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/isympy
%{_mandir}/man1/isympy.1*
%files -n python3-%{name}
%doc %{name}-%{version}/AUTHORS %{name}-%{version}/LICENSE
%doc %{name}-%{version}/PKG-INFO
%doc %{name}-%{version}/doc/_build/cheatsheet/cheatsheet.pdf
%doc %{py3dir}/AUTHORS %{py3dir}/LICENSE %{py3dir}/PKG-INFO
%doc %{py3dir}/doc/_build/cheatsheet/cheatsheet.pdf
%{python3_sitelib}/sympy/
%{python3_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/isympy3
%{_bindir}/isympy
%{_mandir}/man1/isympy.1*
%files texmacs
%doc data/TeXmacs/LICENSE
@ -157,6 +171,14 @@ python3 setup.py test
%{_docdir}/%{name}-doc/html
%changelog
* Thu Mar 13 2014 Jerry James <loganjerry@gmail.com> - 0.7.5-1
- Update to 0.7.5 (bz 1066951)
- Binaries now default to using python3
- Use py3dir macro to simplify python3 build
- Add BRs for more comprehensive testing
- Workaround bz 1075826
- Add -test patch to fix Unicode problem in the tests
* Mon Dec 9 2013 Jerry James <loganjerry@gmail.com> - 0.7.4-1
- Update to 0.7.4
- Python 2 and 3 sources are now in the same tarball