Update to 0.6.7-5.

This commit is contained in:
Jussi Lehtola 2010-10-25 11:43:21 +03:00
parent 11e8aa8785
commit 1f9e02c4be
2 changed files with 117 additions and 1 deletions

108
sympy-0.6.7-mpf.patch Normal file
View File

@ -0,0 +1,108 @@
Index: sympy-0.6.7/sympy/core/numbers.py
===================================================================
--- sympy-0.6.7.orig/sympy/core/numbers.py
+++ sympy-0.6.7/sympy/core/numbers.py
@@ -1040,6 +1040,7 @@ class Zero(Integer):
p = 0
q = 1
+ _mpf_ = (0, 0L, 0, 0)
is_positive = False
is_negative = False
is_finite = False
@@ -1082,6 +1083,7 @@ class One(Integer):
p = 1
q = 1
+ _mpf_ = (0, 1L, 0, 1)
is_prime = True
@@ -1110,6 +1112,7 @@ class NegativeOne(Integer):
p = -1
q = 1
+ _mpf_ = (1, 1L, 0, 1)
__slots__ = []
@@ -1150,6 +1153,7 @@ class Half(Rational):
p = 1
q = 2
+ _mpf_ = (0, 1L, -1, 1)
__slots__ = []
@@ -1163,6 +1167,7 @@ class Infinity(Rational):
p = 1
q = 0
+ _mpf_ = mpmath.inf._mpf_
__slots__ = []
@@ -1236,6 +1241,7 @@ class NegativeInfinity(Rational):
p = -1
q = 0
+ _mpf_ = mpmath.ninf._mpf_
__slots__ = []
@@ -1303,6 +1309,7 @@ class NaN(Rational):
p = 0
q = 0
+ _mpf_ = mpmath.nan._mpf_
is_commutative = True
is_real = None
@@ -1440,6 +1447,7 @@ class NumberSymbol(Atom):
class Exp1(NumberSymbol):
+ _mpf_ = mpmath.e._mpf_
is_real = True
is_positive = True
is_negative = False # XXX Forces is_negative/is_nonnegative
@@ -1469,6 +1477,7 @@ class Exp1(NumberSymbol):
class Pi(NumberSymbol):
+ _mpf_ = mpmath.pi._mpf_
is_real = True
is_positive = True
is_negative = False
@@ -1495,6 +1504,7 @@ class Pi(NumberSymbol):
class GoldenRatio(NumberSymbol):
+ _mpf_ = mpmath.phi._mpf_
is_real = True
is_positive = True
is_negative = False
@@ -1520,6 +1530,7 @@ class GoldenRatio(NumberSymbol):
class EulerGamma(NumberSymbol):
+ _mpf_ = mpmath.euler._mpf_
is_real = True
is_positive = True
is_negative = False
@@ -1543,6 +1554,7 @@ class EulerGamma(NumberSymbol):
class Catalan(NumberSymbol):
+ _mpf_ = mpmath.catalan._mpf_
is_real = True
is_positive = True
is_negative = False
@@ -1566,6 +1578,7 @@ class Catalan(NumberSymbol):
class ImaginaryUnit(Atom):
__metaclass__ = SingletonMeta
+ _mpc_ = mpmath.j._mpc_
is_commutative = True
is_imaginary = True
is_bounded = True

View File

@ -2,7 +2,7 @@
Name: sympy
Version: 0.6.7
Release: 4%{?dist}
Release: 5%{?dist}
Summary: A Python library for symbolic mathematics
Group: Development/Languages
License: BSD
@ -16,6 +16,9 @@ Patch0: sympy-0.6.7-strip-internal-mpmath.diff
# Not yet sent upstream:
Patch1: sympy-python27.patch
# Add mpf symbols
Patch2: sympy-0.6.7-mpf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -33,7 +36,9 @@ Python and does not require any external libraries.
%setup -q
%patch0 -p1 -b .mpmath
rm -rf sympy/mpmath doc/src/modules/mpmath
%patch1 -p1
%patch2 -p1
%build
python setup.py build
@ -59,6 +64,9 @@ rm -rf %{buildroot}
%{_mandir}/man1/isympy.1*
%changelog
* Mon Aug 30 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.6.7-5
- Patch around BZ #564504.
* Sat Jul 31 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.7-4
- fix a python 2.7 incompatibility