diff --git a/.gitignore b/.gitignore index 50667b0..dd417bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /sympy-0.7.3.tar.gz +/sympy-0.7.3-py3.3.tar.gz diff --git a/sources b/sources index 11d1184..80a1360 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 91e3dc58c0af063bc64b17674296cb35 sympy-0.7.3.tar.gz +c6343a8eb1ab9a9741b3a3bba02a0eeb sympy-0.7.3-py3.3.tar.gz diff --git a/sympy-0.7.3-strip-internal-mpmath.patch b/sympy-0.7.3-strip-internal-mpmath.patch index 1bfe1bf..e106814 100644 --- a/sympy-0.7.3-strip-internal-mpmath.patch +++ b/sympy-0.7.3-strip-internal-mpmath.patch @@ -1,5 +1,16 @@ +--- ./examples/advanced/autowrap_ufuncify.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./examples/advanced/autowrap_ufuncify.py 2013-08-01 17:00:00.000000000 -0600 +@@ -25,7 +25,7 @@ np = import_module('numpy') + if not np: + sys.exit("Cannot import numpy. Exiting.") + +-import sympy.mpmath as mpmath ++import mpmath + 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-07-13 11:50:18.000000000 -0600 -+++ ./examples/advanced/pidigits.py 2013-08-01 16:28:29.854067872 -0600 ++++ ./examples/advanced/pidigits.py 2013-08-01 17:00:00.000000000 -0600 @@ -6,8 +6,8 @@ Example shows arbitrary precision using computation of the digits of pi. """ @@ -11,17 +22,6 @@ import math from time import clock ---- ./examples/advanced/autowrap_ufuncify.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./examples/advanced/autowrap_ufuncify.py 2013-08-01 16:28:29.854067872 -0600 -@@ -25,7 +25,7 @@ np = import_module('numpy') - if not np: - sys.exit("Cannot import numpy. Exiting.") - --import sympy.mpmath as mpmath -+import mpmath - from sympy.utilities.autowrap import ufuncify - from sympy.utilities.lambdify import implemented_function - from sympy import symbols, legendre, Plot, pprint --- ./setup.py.orig 2013-07-13 11:50:19.000000000 -0600 +++ ./setup.py 2013-08-01 16:28:29.855067871 -0600 @@ -65,11 +65,6 @@ modules = [ @@ -44,152 +44,8 @@ 'sympy.ntheory.tests', 'sympy.parsing.tests', 'sympy.physics.mechanics.tests', ---- ./sympy/utilities/tests/test_lambdify.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/utilities/tests/test_lambdify.py 2013-08-01 16:28:29.855067871 -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) - from sympy.printing.lambdarepr import LambdaPrinter --from sympy import mpmath -+import mpmath - from sympy.utilities.lambdify import implemented_function - from sympy.utilities.pytest import skip - from sympy.utilities.decorator import conserve_mpmath_dps ---- ./sympy/utilities/decorator.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/utilities/decorator.py 2013-08-01 16:28:29.855067871 -0600 -@@ -76,7 +76,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.""" - import functools -- from sympy import mpmath -+ import mpmath - - def func_wrapper(): - dps = mpmath.mp.dps ---- ./sympy/utilities/lambdify.py.orig 2013-08-01 16:28:29.856067870 -0600 -+++ ./sympy/utilities/lambdify.py 2013-08-01 16:29:52.997978107 -0600 -@@ -85,7 +85,7 @@ NUMPY_TRANSLATIONS = { - # Available modules: - MODULES = { - "math": (MATH, MATH_DEFAULT, MATH_TRANSLATIONS, ("from math import *",)), -- "mpmath": (MPMATH, MPMATH_DEFAULT, MPMATH_TRANSLATIONS, ("from sympy.mpmath import *",)), -+ "mpmath": (MPMATH, MPMATH_DEFAULT, MPMATH_TRANSLATIONS, ("from mpmath import *",)), - "numpy": (NUMPY, NUMPY_DEFAULT, NUMPY_TRANSLATIONS, ("import_module('numpy')",)), - "sympy": (SYMPY, SYMPY_DEFAULT, {}, ( - "from sympy.functions import *", ---- ./sympy/utilities/runtests.py.orig 2013-08-01 16:28:29.857067870 -0600 -+++ ./sympy/utilities/runtests.py 2013-08-01 16:30:54.253874248 -0600 -@@ -547,7 +547,7 @@ def _doctest(*paths, **kwargs): - blacklist = kwargs.get("blacklist", []) - blacklist.extend([ - "doc/src/modules/mpmath", # needs to be fixed upstream -- "sympy/mpmath", # needs to be fixed upstream -+ "mpmath", # needs to be fixed upstream - "doc/src/modules/plotting.rst", # generates live plots - "sympy/statistics", # prints a deprecation - "doc/src/modules/statistics.rst", # warning (the module is deprecated) ---- ./sympy/solvers/tests/test_numeric.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/solvers/tests/test_numeric.py 2013-08-01 16:28:29.858067870 -0600 -@@ -1,5 +1,5 @@ - from sympy import Eq, Matrix, pi, sin, sqrt, Symbol, Integral, Piecewise, symbols --from sympy.mpmath import mnorm, mpf -+from mpmath import mnorm, mpf - from sympy.solvers import nsolve - from sympy.utilities.lambdify import lambdify - from sympy.utilities.pytest import raises, XFAIL ---- ./sympy/solvers/solvers.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/solvers/solvers.py 2013-08-01 16:31:49.453816983 -0600 -@@ -45,7 +45,7 @@ from sympy.utilities.lambdify import lam - from sympy.utilities.misc import filldedent - from sympy.utilities.iterables import uniq - --from sympy.mpmath import findroot -+from mpmath import findroot - - from sympy.solvers.polysys import solve_poly_system - from sympy.solvers.inequalities import reduce_inequalities -@@ -2266,8 +2266,8 @@ def nsolve(*args, **kwargs): - Overdetermined systems are supported. - - >>> from sympy import Symbol, nsolve -- >>> import sympy -- >>> sympy.mpmath.mp.dps = 15 -+ >>> import mpmath, sympy -+ >>> mpmath.mp.dps = 15 - >>> x1 = Symbol('x1') - >>> x2 = Symbol('x2') - >>> f1 = 3 * x1**2 - 2 * x2**2 - 1 ---- ./sympy/ntheory/partitions_.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/ntheory/partitions_.py 2013-08-01 16:28:29.861067867 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath.libmp import (fzero, -+from mpmath.libmp import (fzero, - 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/statistics/tests/test_statistics.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/statistics/tests/test_statistics.py 2013-08-01 16:28:29.861067867 -0600 -@@ -3,7 +3,7 @@ from sympy.functions import erf - - from operator import abs - --from sympy.mpmath import mp -+from mpmath import mp - - from sympy.utilities.tests.test_pickling import check - ---- ./sympy/statistics/distributions.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/statistics/distributions.py 2013-08-01 16:28:29.861067867 -0600 -@@ -207,7 +207,7 @@ class Normal(ContinuousProbability): - # error function is not yet implemented in SymPy but can easily be - # computed numerically - -- from sympy.mpmath import mpf, erfinv -+ from mpmath import mpf, erfinv - - # calculate y = ierf(p) by solving erf(y) - p = 0 - y = erfinv(mpf(p)) ---- ./sympy/printing/repr.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/printing/repr.py 2013-08-01 16:28:29.862067866 -0600 -@@ -7,8 +7,8 @@ relation eval(srepr(expr))=expr holds in - - from sympy.core.function import AppliedUndef - from printer import Printer --import sympy.mpmath.libmp as mlib --from sympy.mpmath.libmp import prec_to_dps, repr_dps -+import mpmath.libmp as mlib -+from mpmath.libmp import prec_to_dps, repr_dps - - - class ReprPrinter(Printer): ---- ./sympy/printing/str.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/printing/str.py 2013-08-01 16:28:29.862067866 -0600 -@@ -8,8 +8,8 @@ from sympy.core.numbers import Integer - from printer import Printer - from sympy.printing.precedence import precedence, PRECEDENCE - --import sympy.mpmath.libmp as mlib --from sympy.mpmath.libmp import prec_to_dps -+import mpmath.libmp as mlib -+from mpmath.libmp import prec_to_dps - - from sympy.utilities import default_sort_key - ---- ./sympy/printing/latex.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/printing/latex.py 2013-08-01 16:28:29.863067865 -0600 -@@ -10,8 +10,8 @@ from printer import Printer - from conventions import split_super_sub, requires_partial - from precedence import precedence, PRECEDENCE - --import sympy.mpmath.libmp as mlib --from sympy.mpmath.libmp import prec_to_dps -+import mpmath.libmp as mlib -+from mpmath.libmp import prec_to_dps - - from sympy.core.compatibility import default_sort_key - from sympy.utilities.iterables import has_variety --- ./sympy/combinatorics/permutations.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/combinatorics/permutations.py 2013-08-01 16:28:29.864067864 -0600 ++++ ./sympy/combinatorics/permutations.py 2013-08-01 17:00:00.000000000 -0600 @@ -7,7 +7,7 @@ from sympy.utilities.iterables import (f has_dups, runs) from sympy.polys.polytools import lcm @@ -199,8 +55,122 @@ def _af_rmul(a, b): +--- ./sympy/core/evalf.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./sympy/core/evalf.py 2013-08-01 17:00:00.000000000 -0600 +@@ -4,19 +4,19 @@ for mathematical functions. + """ + import math + +-import sympy.mpmath.libmp as libmp +-from sympy.mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc +-from sympy.mpmath import inf as mpmath_inf +-from sympy.mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf, ++import mpmath.libmp as libmp ++from mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc ++from mpmath import inf as mpmath_inf ++from mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf, + fnan, fnone, fone, fzero, mpf_abs, mpf_add, + mpf_atan, mpf_atan2, mpf_cmp, mpf_cos, mpf_e, mpf_exp, mpf_log, mpf_lt, + mpf_mul, mpf_neg, mpf_pi, mpf_pow, mpf_pow_int, mpf_shift, mpf_sin, + mpf_sqrt, normalize, round_nearest, to_int, to_str) +-from sympy.mpmath.libmp import bitcount as mpmath_bitcount +-from sympy.mpmath.libmp.backend import MPZ +-from sympy.mpmath.libmp.libmpc import _infs_nan +-from sympy.mpmath.libmp.libmpf import dps_to_prec +-from sympy.mpmath.libmp.gammazeta import mpf_bernoulli ++from mpmath.libmp import bitcount as mpmath_bitcount ++from mpmath.libmp.backend import MPZ ++from mpmath.libmp.libmpc import _infs_nan ++from mpmath.libmp.libmpf import dps_to_prec ++from mpmath.libmp.gammazeta import mpf_bernoulli + + from sympy.core.compatibility import SYMPY_INTS + from sympify import sympify +--- ./sympy/core/expr.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/core/expr.py 2013-08-01 17:00:00.000000000 -0600 +@@ -6,7 +6,7 @@ from evalf import EvalfMixin, pure_compl + from decorators import _sympifyit, call_highest_priority + from cache import cacheit + from compatibility import reduce, as_int, default_sort_key +-from sympy.mpmath.libmp import mpf_log, prec_to_dps ++from mpmath.libmp import mpf_log, prec_to_dps + + from collections import defaultdict + from inspect import getmro +--- ./sympy/core/function.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/core/function.py 2013-08-01 17:00:00.000000000 -0600 +@@ -48,8 +48,8 @@ from sympy.core.logic import fuzzy_and + from sympy.utilities import default_sort_key + from sympy.utilities.iterables import uniq + +-from sympy import mpmath +-import sympy.mpmath.libmp as mlib ++import mpmath ++import mpmath.libmp as mlib + + + def _coeff_isneg(a): +@@ -366,7 +366,7 @@ class Function(Application, Expr): + try: + args = [arg._to_mpmath(prec + 5) for arg in self.args] + def bad(m): +- from sympy.mpmath import mpf, mpc ++ from mpmath import mpf, mpc + # 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): + When we can represent derivatives at a point, this should be folded + into the normal evalf. For now, we need a special method. + """ +- from sympy import mpmath ++ import mpmath + 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-07-13 11:50:19.000000000 -0600 ++++ ./sympy/core/numbers.py 2013-08-01 17:00:00.000000000 -0600 +@@ -10,11 +10,11 @@ from expr import Expr, AtomicExpr + from decorators import _sympifyit, deprecated + from cache import cacheit, clear_cache + from sympy.core.compatibility import as_int, HAS_GMPY, SYMPY_INTS +-import sympy.mpmath as mpmath +-import sympy.mpmath.libmp as mlib +-from sympy.mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed +-from sympy.mpmath.ctx_mp import mpnumeric +-from sympy.mpmath.libmp.libmpf import ( ++import mpmath ++import mpmath.libmp as mlib ++from mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed ++from mpmath.ctx_mp import mpnumeric ++from mpmath.libmp.libmpf import ( + 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-07-13 11:50:18.000000000 -0600 ++++ ./sympy/core/power.py 2013-08-01 17:00:00.000000000 -0600 +@@ -11,7 +11,7 @@ from sympy.core.function import (_coeff_ + from sympy.core.logic import fuzzy_bool + from sympy.core.compatibility import as_int + +-from sympy.mpmath.libmp import sqrtrem as mpmath_sqrtrem ++from mpmath.libmp import sqrtrem as mpmath_sqrtrem + from sympy.utilities.iterables import sift + + +--- ./sympy/core/sets.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/core/sets.py 2013-08-01 17:00:00.000000000 -0600 +@@ -5,7 +5,7 @@ from sympy.core.evalf import EvalfMixin + from sympy.core.numbers import Float + from sympy.core.compatibility import iterable + +-from sympy.mpmath import mpi, mpf ++from mpmath import mpi, mpf + from sympy.assumptions import ask + from sympy.logic.boolalg import And, Or + --- ./sympy/core/tests/test_evalf.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/core/tests/test_evalf.py 2013-08-01 16:28:29.866067862 -0600 ++++ ./sympy/core/tests/test_evalf.py 2013-08-01 17:00:00.000000000 -0600 @@ -2,9 +2,9 @@ from sympy import (Add, ceiling, cos, E, Function, GoldenRatio, I, log, Mul, oo, pi, Pow, Rational, sin, sqrt, sstr, Sum, sympify, S, integrate, atan, product) @@ -213,44 +183,8 @@ from sympy.utilities.pytest import raises, XFAIL ---- ./sympy/core/tests/test_wester.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/core/tests/test_wester.py 2013-08-01 16:41:26.980107263 -0600 -@@ -6,19 +6,20 @@ See also http://math.unm.edu/~wester/cas - tested system. - """ - -+import mpmath - from sympy import (Rational, symbols, factorial, sqrt, log, exp, oo, product, - binomial, rf, pi, gamma, igcd, factorint, nsimplify, radsimp, combsimp, - npartitions, totient, primerange, factor, simplify, gcd, resultant, expand, - I, trigsimp, tan, sin, cos, diff, nan, limit, EulerGamma, polygamma, - bernoulli, assoc_legendre, Function, re, im, DiracDelta, chebyshevt, atan, - sinh, cosh, floor, ceiling, solve, asinh, LambertW, N, apart, sqrtdenest, -- factorial2, powdenest, Mul, S, mpmath, ZZ, Poly, expand_func) -+ factorial2, powdenest, Mul, S, ZZ, Poly, expand_func) - - from sympy.functions.combinatorial.numbers import stirling - from sympy.integrals.deltafunctions import deltaintegrate - from sympy.utilities.pytest import XFAIL, slow - from sympy.utilities.iterables import partitions --from sympy.mpmath import mpi, mpc -+from mpmath import mpi, mpc - from sympy.physics.quantum import Commutator - - R = Rational ---- ./sympy/core/tests/test_sympify.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/core/tests/test_sympify.py 2013-08-01 16:28:29.866067862 -0600 -@@ -11,7 +11,7 @@ from sympy.functions.combinatorial.facto - from sympy.abc import _clash, _clash1, _clash2 - from sympy.core.compatibility import HAS_GMPY - --from sympy import mpmath -+import mpmath - - - def test_439(): --- ./sympy/core/tests/test_numbers.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/core/tests/test_numbers.py 2013-08-01 16:33:40.205713928 -0600 ++++ ./sympy/core/tests/test_numbers.py 2013-08-01 17:00:00.000000000 -0600 @@ -6,9 +6,9 @@ from sympy import (Rational, Symbol, Flo from sympy.core.basic import _aresame from sympy.core.power import integer_nthroot @@ -293,7 +227,7 @@ # 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-07-13 11:50:18.000000000 -0600 -+++ ./sympy/core/tests/test_sets.py 2013-08-01 16:28:29.867067862 -0600 ++++ ./sympy/core/tests/test_sets.py 2013-08-01 17:00:00.000000000 -0600 @@ -3,7 +3,7 @@ from sympy import ( GreaterThan, LessThan, Max, Min, And, Or, Eq, Ge, Le, Gt, Lt, Float, FiniteSet, Intersection @@ -303,122 +237,44 @@ from sympy.utilities.pytest import raises from sympy.utilities.pytest import raises, XFAIL ---- ./sympy/core/function.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/core/function.py 2013-08-01 16:41:56.908067692 -0600 -@@ -48,8 +48,8 @@ from sympy.core.logic import fuzzy_and - from sympy.utilities import default_sort_key - from sympy.utilities.iterables import uniq +--- ./sympy/core/tests/test_sympify.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/core/tests/test_sympify.py 2013-08-01 17: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 HAS_GMPY -from sympy import mpmath --import sympy.mpmath.libmp as mlib +import mpmath -+import mpmath.libmp as mlib - def _coeff_isneg(a): -@@ -366,7 +366,7 @@ class Function(Application, Expr): - try: - args = [arg._to_mpmath(prec + 5) for arg in self.args] - def bad(m): -- from sympy.mpmath import mpf, mpc -+ from mpmath import mpf, mpc - # 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): - When we can represent derivatives at a point, this should be folded - into the normal evalf. For now, we need a special method. - """ -- from sympy import mpmath -+ import mpmath - 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/sets.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/core/sets.py 2013-08-01 16:28:29.869067860 -0600 -@@ -5,7 +5,7 @@ from sympy.core.evalf import EvalfMixin - from sympy.core.numbers import Float - from sympy.core.compatibility import iterable - --from sympy.mpmath import mpi, mpf -+from mpmath import mpi, mpf - from sympy.assumptions import ask - from sympy.logic.boolalg import And, Or - ---- ./sympy/core/power.py.orig 2013-08-01 16:28:29.870067858 -0600 -+++ ./sympy/core/power.py 2013-08-01 16:34:20.981676449 -0600 -@@ -11,7 +11,7 @@ from sympy.core.function import (_coeff_ - from sympy.core.logic import fuzzy_bool - from sympy.core.compatibility import as_int - --from sympy.mpmath.libmp import sqrtrem as mpmath_sqrtrem -+from mpmath.libmp import sqrtrem as mpmath_sqrtrem - from sympy.utilities.iterables import sift - - ---- ./sympy/core/expr.py.orig 2013-08-01 16:28:29.872067857 -0600 -+++ ./sympy/core/expr.py 2013-08-01 16:34:59.437641121 -0600 -@@ -6,7 +6,7 @@ from evalf import EvalfMixin, pure_compl - from decorators import _sympifyit, call_highest_priority - from cache import cacheit - from compatibility import reduce, as_int, default_sort_key --from sympy.mpmath.libmp import mpf_log, prec_to_dps -+from mpmath.libmp import mpf_log, prec_to_dps - - from collections import defaultdict - from inspect import getmro ---- ./sympy/core/evalf.py.orig 2013-08-01 16:28:29.873067856 -0600 -+++ ./sympy/core/evalf.py 2013-08-01 16:36:00.749584806 -0600 -@@ -4,19 +4,19 @@ for mathematical functions. + def test_439(): +--- ./sympy/core/tests/test_wester.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/core/tests/test_wester.py 2013-08-01 17:00:00.000000000 -0600 +@@ -6,19 +6,20 @@ See also http://math.unm.edu/~wester/cas + tested system. """ - import math --import sympy.mpmath.libmp as libmp --from sympy.mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc --from sympy.mpmath import inf as mpmath_inf --from sympy.mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf, -+import mpmath.libmp as libmp -+from mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc -+from mpmath import inf as mpmath_inf -+from mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf, - fnan, fnone, fone, fzero, mpf_abs, mpf_add, - mpf_atan, mpf_atan2, mpf_cmp, mpf_cos, mpf_e, mpf_exp, mpf_log, mpf_lt, - mpf_mul, mpf_neg, mpf_pi, mpf_pow, mpf_pow_int, mpf_shift, mpf_sin, - mpf_sqrt, normalize, round_nearest, to_int, to_str) --from sympy.mpmath.libmp import bitcount as mpmath_bitcount --from sympy.mpmath.libmp.backend import MPZ --from sympy.mpmath.libmp.libmpc import _infs_nan --from sympy.mpmath.libmp.libmpf import dps_to_prec --from sympy.mpmath.libmp.gammazeta import mpf_bernoulli -+from mpmath.libmp import bitcount as mpmath_bitcount -+from mpmath.libmp.backend import MPZ -+from mpmath.libmp.libmpc import _infs_nan -+from mpmath.libmp.libmpf import dps_to_prec -+from mpmath.libmp.gammazeta import mpf_bernoulli - - from sympy.core.compatibility import SYMPY_INTS - from sympify import sympify ---- ./sympy/core/numbers.py.orig 2013-08-01 16:28:29.875067854 -0600 -+++ ./sympy/core/numbers.py 2013-08-01 16:36:55.261534740 -0600 -@@ -10,11 +10,11 @@ from expr import Expr, AtomicExpr - from decorators import _sympifyit, deprecated - from cache import cacheit, clear_cache - from sympy.core.compatibility import as_int, HAS_GMPY, SYMPY_INTS --import sympy.mpmath as mpmath --import sympy.mpmath.libmp as mlib --from sympy.mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed --from sympy.mpmath.ctx_mp import mpnumeric --from sympy.mpmath.libmp.libmpf import ( +import mpmath -+import mpmath.libmp as mlib -+from mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed -+from mpmath.ctx_mp import mpnumeric -+from mpmath.libmp.libmpf import ( - finf as _mpf_inf, fninf as _mpf_ninf, - fnan as _mpf_nan, fzero as _mpf_zero, _normalize as mpf_normalize, - prec_to_dps) ---- ./sympy/external/tests/test_numpy.py.orig 2013-08-01 16:28:29.876067853 -0600 -+++ ./sympy/external/tests/test_numpy.py 2013-08-01 16:37:36.605496767 -0600 + from sympy import (Rational, symbols, factorial, sqrt, log, exp, oo, product, + binomial, rf, pi, gamma, igcd, factorint, nsimplify, radsimp, combsimp, + npartitions, totient, primerange, factor, simplify, gcd, resultant, expand, + I, trigsimp, tan, sin, cos, diff, nan, limit, EulerGamma, polygamma, + bernoulli, assoc_legendre, Function, re, im, DiracDelta, chebyshevt, atan, + sinh, cosh, floor, ceiling, solve, asinh, LambertW, N, apart, sqrtdenest, +- factorial2, powdenest, Mul, S, mpmath, ZZ, Poly, expand_func) ++ factorial2, powdenest, Mul, S, ZZ, Poly, expand_func) + + from sympy.functions.combinatorial.numbers import stirling + from sympy.integrals.deltafunctions import deltaintegrate + from sympy.utilities.pytest import XFAIL, slow + from sympy.utilities.iterables import partitions +-from sympy.mpmath import mpi, mpc ++from mpmath import mpi, mpc + from sympy.physics.quantum import Commutator + + R = Rational +--- ./sympy/external/tests/test_numpy.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./sympy/external/tests/test_numpy.py 2013-08-01 17:00:00.000000000 -0600 @@ -27,7 +27,7 @@ from sympy import (Rational, Symbol, lis symarray, symbols, Integer) import sympy @@ -428,8 +284,156 @@ from sympy.abc import x, y, z from sympy.utilities.decorator import conserve_mpmath_dps ---- ./sympy/polys/domains/groundtypes.py.orig 2013-08-01 16:28:29.876067853 -0600 -+++ ./sympy/polys/domains/groundtypes.py 2013-08-01 16:38:15.365461171 -0600 +--- ./sympy/functions/combinatorial/numbers.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./sympy/functions/combinatorial/numbers.py 2013-08-01 17:00:00.000000000 -0600 +@@ -13,8 +13,8 @@ from sympy.core.compatibility import as_ + from sympy.core.cache import cacheit + from sympy.functions.combinatorial.factorials import factorial + +-from sympy.mpmath import bernfrac +-from sympy.mpmath.libmp import ifib as _ifib ++from mpmath import bernfrac ++from mpmath.libmp import ifib as _ifib + + + def _product(a, b): +@@ -633,7 +633,7 @@ class euler(Function): + if m.is_odd: + return S.Zero + if m.is_Integer and m.is_nonnegative: +- from sympy.mpmath import mp ++ from mpmath import mp + m = m._to_mpmath(mp.prec) + res = mp.eulernum(m, exact=True) + return Integer(res) +@@ -652,7 +652,7 @@ class euler(Function): + m = self.args[0] + + if m.is_Integer and m.is_nonnegative: +- from sympy.mpmath import mp ++ from mpmath import mp + from sympy import Expr + m = m._to_mpmath(prec) + oprec = mp.prec +--- ./sympy/functions/special/bessel.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./sympy/functions/special/bessel.py 2013-08-01 17:00:00.000000000 -0600 +@@ -682,8 +682,8 @@ def jn_zeros(n, k, method="sympy", dps=1 + from math import pi + + if method == "sympy": +- from sympy.mpmath import besseljzero +- from sympy.mpmath.libmp.libmpf import dps_to_prec ++ from mpmath import besseljzero ++ from mpmath.libmp.libmpf import dps_to_prec + 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-07-13 11:50:18.000000000 -0600 ++++ ./sympy/functions/special/error_functions.py 2013-08-01 17:00:00.000000000 -0600 +@@ -1312,7 +1312,7 @@ class li(Function): + + We can even compute Soldner's constant by the help of mpmath: + +- >>> from sympy.mpmath import findroot ++ >>> from mpmath import findroot + >>> findroot(li, 2) + 1.45136923488338 + +--- ./sympy/functions/special/gamma_functions.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/functions/special/gamma_functions.py 2013-08-01 17:00:00.000000000 -0600 +@@ -211,7 +211,7 @@ class lowergamma(Function): + return (cls(a + 1, x) + x**a * C.exp(-x))/a + + def _eval_evalf(self, prec): +- from sympy.mpmath import mp ++ from mpmath import mp + from sympy import Expr + a = self.args[0]._to_mpmath(prec) + z = self.args[1]._to_mpmath(prec) +@@ -300,7 +300,7 @@ class uppergamma(Function): + raise ArgumentIndexError(self, argindex) + + def _eval_evalf(self, prec): +- from sympy.mpmath import mp ++ from mpmath import mp + 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-07-13 11:50:18.000000000 -0600 ++++ ./sympy/functions/special/hyper.py 2013-08-01 17:00:00.000000000 -0600 +@@ -595,7 +595,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 +- from sympy import mpmath, Expr ++ from sympy import Expr ++ import mpmath + z = self.argument + znum = self.argument._eval_evalf(prec) + if znum.has(exp_polar): +--- ./sympy/functions/special/spherical_harmonics.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./sympy/functions/special/spherical_harmonics.py 2013-08-01 17: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. +- from sympy.mpmath import mp ++ from mpmath import mp + from sympy import Expr + n = self.args[0]._to_mpmath(prec) + m = self.args[1]._to_mpmath(prec) +--- ./sympy/matrices/matrices.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/matrices/matrices.py 2013-08-01 17:00:00.000000000 -0600 +@@ -1183,7 +1183,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 +- sympy.mpmath.lu_solve or sympy.mpmath.qr_solve. ++ mpmath.lu_solve or mpmath.qr_solve. + + See Also + ======== +@@ -1559,7 +1559,7 @@ class MatrixBase(object): + to use QRsolve. + + This is mainly for educational purposes and symbolic matrices, for real +- (or complex) matrices use sympy.mpmath.qr_solve. ++ (or complex) matrices use mpmath.qr_solve. + + See Also + ======== +--- ./sympy/ntheory/partitions_.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./sympy/ntheory/partitions_.py 2013-08-01 17:00:00.000000000 -0600 +@@ -1,4 +1,4 @@ +-from sympy.mpmath.libmp import (fzero, ++from mpmath.libmp import (fzero, + 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-07-13 11:50:18.000000000 -0600 ++++ ./sympy/physics/quantum/constants.py 2013-08-01 17:00:00.000000000 -0600 +@@ -3,7 +3,7 @@ + from sympy.core.numbers import NumberSymbol + from sympy.core.singleton import Singleton + from sympy.printing.pretty.stringpict import prettyForm +-import sympy.mpmath.libmp as mlib ++import mpmath.libmp as mlib + + #----------------------------------------------------------------------------- + # Constants +--- ./sympy/physics/quantum/qubit.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./sympy/physics/quantum/qubit.py 2013-08-01 17:00:00.000000000 -0600 +@@ -22,7 +22,7 @@ from sympy.physics.quantum.represent imp + from sympy.physics.quantum.matrixutils import ( + numpy_ndarray, scipy_sparse_matrix + ) +-from sympy.mpmath.libmp.libintmath import bitcount ++from mpmath.libmp.libintmath import bitcount + + __all__ = [ + 'Qubit', +--- ./sympy/polys/domains/groundtypes.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/polys/domains/groundtypes.py 2013-08-01 17:00:00.000000000 -0600 @@ -71,13 +71,13 @@ else: gmpy_sqrt = None gmpy_qdiv = None @@ -446,21 +450,8 @@ def python_sqrt(n): ---- ./sympy/polys/rootoftools.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/polys/rootoftools.py 2013-08-01 16:28:29.877067852 -0600 -@@ -23,8 +23,8 @@ from sympy.polys.polyerrors import ( - - from sympy.polys.domains import QQ - --from sympy.mpmath import mp, mpf, mpc, findroot --from sympy.mpmath.libmp.libmpf import prec_to_dps -+from mpmath import mp, mpf, mpc, findroot -+from mpmath.libmp.libmpf import prec_to_dps - - from sympy.utilities import lambdify - ---- ./sympy/polys/numberfields.py.orig 2013-08-01 16:28:29.878067851 -0600 -+++ ./sympy/polys/numberfields.py 2013-08-01 16:38:54.453376166 -0600 +--- ./sympy/polys/numberfields.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/polys/numberfields.py 2013-08-01 17:00:00.000000000 -0600 @@ -39,7 +39,7 @@ from sympy.utilities import ( from sympy.simplify.simplify import _mexpand, _is_sum_surds from sympy.ntheory import sieve @@ -471,7 +462,7 @@ def _choose_factor(factors, x, v, prec=200): --- ./sympy/polys/polytools.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/polys/polytools.py 2013-08-01 16:39:38.630282027 -0600 ++++ ./sympy/polys/polytools.py 2013-08-01 17:00:00.000000000 -0600 @@ -56,7 +56,7 @@ from sympy.polys.polyerrors import ( from sympy.utilities import group @@ -512,8 +503,454 @@ if error is not None: return roots, sympify(error) ---- ./sympy/functions/combinatorial/numbers.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/functions/combinatorial/numbers.py 2013-08-01 16:28:29.882067848 -0600 +--- ./sympy/polys/rootoftools.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/polys/rootoftools.py 2013-08-01 17:00:00.000000000 -0600 +@@ -23,8 +23,8 @@ from sympy.polys.polyerrors import ( + + from sympy.polys.domains import QQ + +-from sympy.mpmath import mp, mpf, mpc, findroot +-from sympy.mpmath.libmp.libmpf import prec_to_dps ++from mpmath import mp, mpf, mpc, findroot ++from mpmath.libmp.libmpf import prec_to_dps + + from sympy.utilities import lambdify + +--- ./sympy/printing/latex.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/printing/latex.py 2013-08-01 17:00:00.000000000 -0600 +@@ -10,8 +10,8 @@ from printer import Printer + from conventions import split_super_sub, requires_partial + from precedence import precedence, PRECEDENCE + +-import sympy.mpmath.libmp as mlib +-from sympy.mpmath.libmp import prec_to_dps ++import mpmath.libmp as mlib ++from mpmath.libmp import prec_to_dps + + from sympy.core.compatibility import default_sort_key + from sympy.utilities.iterables import has_variety +--- ./sympy/printing/repr.py.orig 2013-07-13 11:50:18.000000000 -0600 ++++ ./sympy/printing/repr.py 2013-08-01 17:00:00.000000000 -0600 +@@ -7,8 +7,8 @@ relation eval(srepr(expr))=expr holds in + + from sympy.core.function import AppliedUndef + from printer import Printer +-import sympy.mpmath.libmp as mlib +-from sympy.mpmath.libmp import prec_to_dps, repr_dps ++import mpmath.libmp as mlib ++from mpmath.libmp import prec_to_dps, repr_dps + + + class ReprPrinter(Printer): +--- ./sympy/printing/str.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/printing/str.py 2013-08-01 17:00:00.000000000 -0600 +@@ -8,8 +8,8 @@ from sympy.core.numbers import Integer + from printer import Printer + from sympy.printing.precedence import precedence, PRECEDENCE + +-import sympy.mpmath.libmp as mlib +-from sympy.mpmath.libmp import prec_to_dps ++import mpmath.libmp as mlib ++from mpmath.libmp import prec_to_dps + + from sympy.utilities import default_sort_key + +--- ./sympy/simplify/simplify.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/simplify/simplify.py 2013-08-01 17:00:00.000000000 -0600 +@@ -31,7 +31,7 @@ from sympy.ntheory.factor_ import multip + from sympy.polys import (Poly, together, reduced, cancel, factor, + ComputationFailed, lcm, gcd) + +-import sympy.mpmath as mpmath ++import mpmath + + + def _mexpand(expr): +--- ./sympy/solvers/solvers.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/solvers/solvers.py 2013-08-01 17:00:00.000000000 -0600 +@@ -45,7 +45,7 @@ from sympy.utilities.lambdify import lam + from sympy.utilities.misc import filldedent + from sympy.utilities.iterables import uniq + +-from sympy.mpmath import findroot ++from mpmath import findroot + + from sympy.solvers.polysys import solve_poly_system + from sympy.solvers.inequalities import reduce_inequalities +@@ -2266,8 +2266,8 @@ def nsolve(*args, **kwargs): + Overdetermined systems are supported. + + >>> from sympy import Symbol, nsolve +- >>> import sympy +- >>> sympy.mpmath.mp.dps = 15 ++ >>> import mpmath, sympy ++ >>> mpmath.mp.dps = 15 + >>> x1 = Symbol('x1') + >>> x2 = Symbol('x2') + >>> f1 = 3 * x1**2 - 2 * x2**2 - 1 +--- ./sympy/solvers/tests/test_numeric.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/solvers/tests/test_numeric.py 2013-08-01 17: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 ++from mpmath import mnorm, mpf + from sympy.solvers import nsolve + from sympy.utilities.lambdify import lambdify + from sympy.utilities.pytest import raises, XFAIL +--- ./sympy/statistics/distributions.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/statistics/distributions.py 2013-08-01 17:00:00.000000000 -0600 +@@ -207,7 +207,7 @@ class Normal(ContinuousProbability): + # error function is not yet implemented in SymPy but can easily be + # computed numerically + +- from sympy.mpmath import mpf, erfinv ++ from mpmath import mpf, erfinv + + # calculate y = ierf(p) by solving erf(y) - p = 0 + y = erfinv(mpf(p)) +--- ./sympy/statistics/tests/test_statistics.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/statistics/tests/test_statistics.py 2013-08-01 17:00:00.000000000 -0600 +@@ -3,7 +3,7 @@ from sympy.functions import erf + + from operator import abs + +-from sympy.mpmath import mp ++from mpmath import mp + + from sympy.utilities.tests.test_pickling import check + +--- ./sympy/utilities/decorator.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/utilities/decorator.py 2013-08-01 17:00:00.000000000 -0600 +@@ -76,7 +76,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.""" + import functools +- from sympy import mpmath ++ import mpmath + + def func_wrapper(): + dps = mpmath.mp.dps +--- ./sympy/utilities/lambdify.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/utilities/lambdify.py 2013-08-01 17:00:00.000000000 -0600 +@@ -85,7 +85,7 @@ NUMPY_TRANSLATIONS = { + # Available modules: + MODULES = { + "math": (MATH, MATH_DEFAULT, MATH_TRANSLATIONS, ("from math import *",)), +- "mpmath": (MPMATH, MPMATH_DEFAULT, MPMATH_TRANSLATIONS, ("from sympy.mpmath import *",)), ++ "mpmath": (MPMATH, MPMATH_DEFAULT, MPMATH_TRANSLATIONS, ("from mpmath import *",)), + "numpy": (NUMPY, NUMPY_DEFAULT, NUMPY_TRANSLATIONS, ("import_module('numpy')",)), + "sympy": (SYMPY, SYMPY_DEFAULT, {}, ( + "from sympy.functions import *", +--- ./sympy/utilities/runtests.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/utilities/runtests.py 2013-08-01 17:00:00.000000000 -0600 +@@ -547,7 +547,7 @@ def _doctest(*paths, **kwargs): + blacklist = kwargs.get("blacklist", []) + blacklist.extend([ + "doc/src/modules/mpmath", # needs to be fixed upstream +- "sympy/mpmath", # needs to be fixed upstream ++ "mpmath", # needs to be fixed upstream + "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/test_lambdify.py.orig 2013-07-13 11:50:19.000000000 -0600 ++++ ./sympy/utilities/tests/test_lambdify.py 2013-08-01 17: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) + from sympy.printing.lambdarepr import LambdaPrinter +-from sympy import mpmath ++import mpmath + from sympy.utilities.lambdify import implemented_function + from sympy.utilities.pytest import skip + from sympy.utilities.decorator import conserve_mpmath_dps +--- ./sympy-0.7.3/examples/advanced/autowrap_ufuncify.py.orig 2013-07-13 11:53:31.000000000 -0600 ++++ ./sympy-0.7.3/examples/advanced/autowrap_ufuncify.py 2013-10-17 20:00:00.000000000 -0600 +@@ -25,7 +25,7 @@ np = import_module('numpy') + if not np: + sys.exit("Cannot import numpy. Exiting.") + +-import sympy.mpmath as mpmath ++import mpmath + from sympy.utilities.autowrap import ufuncify + from sympy.utilities.lambdify import implemented_function + from sympy import symbols, legendre, Plot, pprint +--- ./sympy-0.7.3/examples/advanced/pidigits.py.orig 2013-07-13 11:53:31.000000000 -0600 ++++ ./sympy-0.7.3/examples/advanced/pidigits.py 2013-10-17 20:00:00.000000000 -0600 +@@ -6,8 +6,8 @@ Example shows arbitrary precision using + computation of the digits of pi. + """ + +-from sympy.mpmath import libmp, pi +-from sympy.mpmath import functions as mpf_funs ++from mpmath import libmp, pi ++from mpmath import functions as mpf_funs + + import math + from time import clock +--- ./sympy-0.7.3/setup.py.orig 2013-07-13 11:53:31.000000000 -0600 ++++ ./sympy-0.7.3/setup.py 2013-10-17 20:00:00.000000000 -0600 +@@ -65,11 +65,6 @@ modules = [ + 'sympy.logic.utilities', + 'sympy.matrices', + 'sympy.matrices.expressions', +- 'sympy.mpmath', +- 'sympy.mpmath.calculus', +- 'sympy.mpmath.functions', +- 'sympy.mpmath.libmp', +- 'sympy.mpmath.matrices', + 'sympy.ntheory', + 'sympy.parsing', + 'sympy.physics', +@@ -226,7 +221,6 @@ tests = [ + 'sympy.logic.tests', + 'sympy.matrices.expressions.tests', + 'sympy.matrices.tests', +- 'sympy.mpmath.tests', + 'sympy.ntheory.tests', + 'sympy.parsing.tests', + 'sympy.physics.mechanics.tests', +--- ./sympy-0.7.3/sympy/combinatorics/permutations.py.orig 2013-10-17 16:31:19.532651252 -0600 ++++ ./sympy-0.7.3/sympy/combinatorics/permutations.py 2013-10-17 20:00:00.000000000 -0600 +@@ -7,7 +7,7 @@ from sympy.utilities.iterables import (f + has_dups, runs) + from sympy.polys.polytools import lcm + from sympy.matrices import zeros +-from sympy.mpmath.libmp.libintmath import ifac ++from mpmath.libmp.libintmath import ifac + from functools import reduce + + +--- ./sympy-0.7.3/sympy/core/evalf.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/evalf.py 2013-10-17 20:00:00.000000000 -0600 +@@ -4,19 +4,19 @@ for mathematical functions. + """ + import math + +-import sympy.mpmath.libmp as libmp +-from sympy.mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc +-from sympy.mpmath import inf as mpmath_inf +-from sympy.mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf, ++import mpmath.libmp as libmp ++from mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc ++from mpmath import inf as mpmath_inf ++from mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf, + fnan, fnone, fone, fzero, mpf_abs, mpf_add, + mpf_atan, mpf_atan2, mpf_cmp, mpf_cos, mpf_e, mpf_exp, mpf_log, mpf_lt, + mpf_mul, mpf_neg, mpf_pi, mpf_pow, mpf_pow_int, mpf_shift, mpf_sin, + mpf_sqrt, normalize, round_nearest, to_int, to_str) +-from sympy.mpmath.libmp import bitcount as mpmath_bitcount +-from sympy.mpmath.libmp.backend import MPZ +-from sympy.mpmath.libmp.libmpc import _infs_nan +-from sympy.mpmath.libmp.libmpf import dps_to_prec +-from sympy.mpmath.libmp.gammazeta import mpf_bernoulli ++from mpmath.libmp import bitcount as mpmath_bitcount ++from mpmath.libmp.backend import MPZ ++from mpmath.libmp.libmpc import _infs_nan ++from mpmath.libmp.libmpf import dps_to_prec ++from mpmath.libmp.gammazeta import mpf_bernoulli + + from sympy.core.compatibility import SYMPY_INTS + from .sympify import sympify +--- ./sympy-0.7.3/sympy/core/expr.py.orig 2013-10-17 16:31:19.537651249 -0600 ++++ ./sympy-0.7.3/sympy/core/expr.py 2013-10-17 20:00:00.000000000 -0600 +@@ -6,7 +6,7 @@ from .evalf import EvalfMixin, pure_comp + from .decorators import _sympifyit, call_highest_priority + from .cache import cacheit + from .compatibility import reduce, as_int, default_sort_key +-from sympy.mpmath.libmp import mpf_log, prec_to_dps ++from mpmath.libmp import mpf_log, prec_to_dps + + from collections import defaultdict + from inspect import getmro +--- ./sympy-0.7.3/sympy/core/function.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/function.py 2013-10-17 20:00:00.000000000 -0600 +@@ -48,8 +48,8 @@ from sympy.core.logic import fuzzy_and + from sympy.utilities import default_sort_key + from sympy.utilities.iterables import uniq + +-from sympy import mpmath +-import sympy.mpmath.libmp as mlib ++import mpmath ++import mpmath.libmp as mlib + + + def _coeff_isneg(a): +@@ -364,7 +364,7 @@ class Function(Application, Expr): + try: + args = [arg._to_mpmath(prec + 5) for arg in self.args] + def bad(m): +- from sympy.mpmath import mpf, mpc ++ from mpmath import mpf, mpc + # 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 +@@ -1128,7 +1128,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. + """ +- from sympy import mpmath ++ import mpmath + 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-0.7.3/sympy/core/numbers.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/numbers.py 2013-10-17 20:00:00.000000000 -0600 +@@ -10,11 +10,11 @@ from .expr import Expr, AtomicExpr + from .decorators import _sympifyit, deprecated + from .cache import cacheit, clear_cache + from sympy.core.compatibility import as_int, HAS_GMPY, SYMPY_INTS +-import sympy.mpmath as mpmath +-import sympy.mpmath.libmp as mlib +-from sympy.mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed +-from sympy.mpmath.ctx_mp import mpnumeric +-from sympy.mpmath.libmp.libmpf import ( ++import mpmath ++import mpmath.libmp as mlib ++from mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed ++from mpmath.ctx_mp import mpnumeric ++from mpmath.libmp.libmpf import ( + finf as _mpf_inf, fninf as _mpf_ninf, + fnan as _mpf_nan, fzero as _mpf_zero, _normalize as mpf_normalize, + prec_to_dps) +--- ./sympy-0.7.3/sympy/core/power.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/power.py 2013-10-17 20:00:00.000000000 -0600 +@@ -11,7 +11,7 @@ from sympy.core.function import (_coeff_ + from sympy.core.logic import fuzzy_bool + from sympy.core.compatibility import as_int + +-from sympy.mpmath.libmp import sqrtrem as mpmath_sqrtrem ++from mpmath.libmp import sqrtrem as mpmath_sqrtrem + from sympy.utilities.iterables import sift + + +--- ./sympy-0.7.3/sympy/core/sets.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/sets.py 2013-10-17 20:00:00.000000000 -0600 +@@ -5,7 +5,7 @@ from sympy.core.evalf import EvalfMixin + from sympy.core.numbers import Float + from sympy.core.compatibility import iterable + +-from sympy.mpmath import mpi, mpf ++from mpmath import mpi, mpf + from sympy.assumptions import ask + from sympy.logic.boolalg import And, Or + +--- ./sympy-0.7.3/sympy/core/tests/test_evalf.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/tests/test_evalf.py 2013-10-17 20:00:00.000000000 -0600 +@@ -2,9 +2,9 @@ from sympy import (Add, ceiling, cos, E, + Function, GoldenRatio, I, log, Mul, oo, pi, Pow, Rational, + sin, sqrt, sstr, Sum, sympify, S, integrate, atan, product) + from sympy.core.evalf import complex_accuracy, PrecisionExhausted, scaled_zero +-from sympy.mpmath import inf, ninf, nan ++from mpmath import inf, ninf, nan + from sympy.abc import n, x, y +-from sympy.mpmath.libmp.libmpf import from_float ++from mpmath.libmp.libmpf import from_float + from sympy.utilities.pytest import raises, XFAIL + + +--- ./sympy-0.7.3/sympy/core/tests/test_numbers.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/tests/test_numbers.py 2013-10-17 20:00:00.000000000 -0600 +@@ -6,9 +6,9 @@ from sympy import (Rational, Symbol, Flo + from sympy.core.basic import _aresame + from sympy.core.power import integer_nthroot + from sympy.core.numbers import igcd, ilcm, igcdex, seterr, _intcache, mpf_norm +-from sympy.mpmath import mpf ++from mpmath import mpf + from sympy.utilities.pytest import XFAIL, slow, raises +-from sympy import mpmath ++import mpmath + + + def test_integers_cache(): +@@ -1320,8 +1320,8 @@ def test_issue_1073(): + + @XFAIL + def test_mpmath_issues(): +- from sympy.mpmath.libmp.libmpf import _normalize +- import sympy.mpmath.libmp as mlib ++ from mpmath.libmp.libmpf import _normalize ++ import mpmath.libmp as mlib + rnd = mlib.round_nearest + mpf = (0, 0, -123, -1, 53, rnd) # nan + assert _normalize(mpf, 53) != (0, 0, 0, 0) +@@ -1330,7 +1330,7 @@ def test_mpmath_issues(): + mpf = (1, 0, -789, -3, 53, rnd) # -inf + assert _normalize(mpf, 53) != (0, 0, 0, 0) + +- from sympy.mpmath.libmp.libmpf import fnan ++ from mpmath.libmp.libmpf import fnan + assert mlib.mpf_eq(fnan, fnan) + + +@@ -1361,7 +1361,7 @@ def test_int_NumberSymbols(): + + + def test_3541(): +- from sympy.mpmath.libmp.libmpf import ( ++ from mpmath.libmp.libmpf import ( + _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-0.7.3/sympy/core/tests/test_sets.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/tests/test_sets.py 2013-10-17 20:00:00.000000000 -0600 +@@ -3,7 +3,7 @@ from sympy import ( + GreaterThan, LessThan, Max, Min, And, Or, Eq, Ge, Le, Gt, Lt, Float, + FiniteSet, Intersection + ) +-from sympy.mpmath import mpi ++from mpmath import mpi + + from sympy.utilities.pytest import raises + from sympy.utilities.pytest import raises, XFAIL +--- ./sympy-0.7.3/sympy/core/tests/test_sympify.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/tests/test_sympify.py 2013-10-17 20: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 HAS_GMPY + +-from sympy import mpmath ++import mpmath + + + def test_439(): +--- ./sympy-0.7.3/sympy/core/tests/test_wester.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/core/tests/test_wester.py 2013-10-17 20:00:00.000000000 -0600 +@@ -6,19 +6,20 @@ See also http://math.unm.edu/~wester/cas + tested system. + """ + ++import mpmath + from sympy import (Rational, symbols, factorial, sqrt, log, exp, oo, product, + binomial, rf, pi, gamma, igcd, factorint, nsimplify, radsimp, combsimp, + npartitions, totient, primerange, factor, simplify, gcd, resultant, expand, + I, trigsimp, tan, sin, cos, diff, nan, limit, EulerGamma, polygamma, + bernoulli, assoc_legendre, Function, re, im, DiracDelta, chebyshevt, atan, + sinh, cosh, floor, ceiling, solve, asinh, LambertW, N, apart, sqrtdenest, +- factorial2, powdenest, Mul, S, mpmath, ZZ, Poly, expand_func) ++ factorial2, powdenest, Mul, S, ZZ, Poly, expand_func) + + from sympy.functions.combinatorial.numbers import stirling + from sympy.integrals.deltafunctions import deltaintegrate + from sympy.utilities.pytest import XFAIL, slow + from sympy.utilities.iterables import partitions +-from sympy.mpmath import mpi, mpc ++from mpmath import mpi, mpc + from sympy.physics.quantum import Commutator + + R = Rational +--- ./sympy-0.7.3/sympy/external/tests/test_numpy.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/external/tests/test_numpy.py 2013-10-17 20:00:00.000000000 -0600 +@@ -27,7 +27,7 @@ from sympy import (Rational, Symbol, lis + symarray, symbols, Integer) + import sympy + +-from sympy import mpmath ++import mpmath + from sympy.abc import x, y, z + from sympy.utilities.decorator import conserve_mpmath_dps + +--- ./sympy-0.7.3/sympy/functions/combinatorial/numbers.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/functions/combinatorial/numbers.py 2013-10-17 20:00:00.000000000 -0600 @@ -13,8 +13,8 @@ from sympy.core.compatibility import as_ from sympy.core.cache import cacheit from sympy.functions.combinatorial.factorials import factorial @@ -543,8 +980,8 @@ from sympy import Expr m = m._to_mpmath(prec) oprec = mp.prec ---- ./sympy/functions/special/bessel.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/functions/special/bessel.py 2013-08-01 16:28:29.882067848 -0600 +--- ./sympy-0.7.3/sympy/functions/special/bessel.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/functions/special/bessel.py 2013-10-17 20:00:00.000000000 -0600 @@ -682,8 +682,8 @@ def jn_zeros(n, k, method="sympy", dps=1 from math import pi @@ -556,31 +993,8 @@ from sympy import Expr prec = dps_to_prec(dps) return [Expr._from_mpmath(besseljzero(S(n + 0.5)._to_mpmath(prec), ---- ./sympy/functions/special/hyper.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/functions/special/hyper.py 2013-08-01 16:28:29.883067847 -0600 -@@ -595,7 +595,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 -- from sympy import mpmath, Expr -+ from sympy import Expr -+ import mpmath - z = self.argument - znum = self.argument._eval_evalf(prec) - if znum.has(exp_polar): ---- ./sympy/functions/special/spherical_harmonics.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/functions/special/spherical_harmonics.py 2013-08-01 16:42:35.300020329 -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. -- from sympy.mpmath import mp -+ from mpmath import mp - from sympy import Expr - n = self.args[0]._to_mpmath(prec) - m = self.args[1]._to_mpmath(prec) ---- ./sympy/functions/special/error_functions.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/functions/special/error_functions.py 2013-08-01 16:42:54.084669748 -0600 +--- ./sympy-0.7.3/sympy/functions/special/error_functions.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/functions/special/error_functions.py 2013-10-17 20:00:00.000000000 -0600 @@ -1312,7 +1312,7 @@ class li(Function): We can even compute Soldner's constant by the help of mpmath: @@ -590,8 +1004,8 @@ >>> findroot(li, 2) 1.45136923488338 ---- ./sympy/functions/special/gamma_functions.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/functions/special/gamma_functions.py 2013-08-01 16:28:29.884067846 -0600 +--- ./sympy-0.7.3/sympy/functions/special/gamma_functions.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/functions/special/gamma_functions.py 2013-10-17 20:00:00.000000000 -0600 @@ -211,7 +211,7 @@ class lowergamma(Function): return (cls(a + 1, x) + x**a * C.exp(-x))/a @@ -610,319 +1024,59 @@ from sympy import Expr a = self.args[0]._to_mpmath(prec) z = self.args[1]._to_mpmath(prec) ---- ./sympy/mpmath/tests/test_functions.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_functions.py 2013-08-01 16:28:29.884067846 -0600 -@@ -1,5 +1,5 @@ --from sympy.mpmath.libmp import * --from sympy.mpmath import * -+from mpmath.libmp import * -+from mpmath import * - import random - import time - import math ---- ./sympy/mpmath/tests/test_interval.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_interval.py 2013-08-01 16:28:29.885067845 -0600 +--- ./sympy-0.7.3/sympy/functions/special/hyper.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/functions/special/hyper.py 2013-10-17 20:00:00.000000000 -0600 +@@ -596,7 +596,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 +- from sympy import mpmath, Expr ++ from sympy import Expr ++ import mpmath + z = self.argument + znum = self.argument._eval_evalf(prec) + if znum.has(exp_polar): +--- ./sympy-0.7.3/sympy/functions/special/spherical_harmonics.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/functions/special/spherical_harmonics.py 2013-10-17 20: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. +- from sympy.mpmath import mp ++ from mpmath import mp + from sympy import Expr + n = self.args[0]._to_mpmath(prec) + m = self.args[1]._to_mpmath(prec) +--- ./sympy-0.7.3/sympy/matrices/matrices.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/matrices/matrices.py 2013-10-17 20:00:00.000000000 -0600 +@@ -1185,7 +1185,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 +- sympy.mpmath.lu_solve or sympy.mpmath.qr_solve. ++ mpmath.lu_solve or mpmath.qr_solve. + + See Also + ======== +@@ -1561,7 +1561,7 @@ class MatrixBase(object): + to use QRsolve. + + This is mainly for educational purposes and symbolic matrices, for real +- (or complex) matrices use sympy.mpmath.qr_solve. ++ (or complex) matrices use mpmath.qr_solve. + + See Also + ======== +--- ./sympy-0.7.3/sympy/ntheory/partitions_.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/ntheory/partitions_.py 2013-10-17 20:00:00.000000000 -0600 @@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - - def test_interval_identity(): - iv.dps = 15 ---- ./sympy/mpmath/tests/test_gammazeta.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_gammazeta.py 2013-08-01 16:28:29.885067845 -0600 -@@ -1,5 +1,5 @@ --from sympy.mpmath import * --from sympy.mpmath.libmp import round_up, from_float, mpf_zeta_int -+from mpmath import * -+from mpmath.libmp import round_up, from_float, mpf_zeta_int - - from sympy.utilities.pytest import XFAIL - ---- ./sympy/mpmath/tests/test_compatibility.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_compatibility.py 2013-08-01 16:28:29.886067845 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - from random import seed, randint, random - import math - ---- ./sympy/mpmath/tests/test_mpmath.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_mpmath.py 2013-08-01 16:28:29.886067845 -0600 -@@ -1,3 +1,3 @@ --from sympy.mpmath.libmp import * --from sympy.mpmath import * -+from mpmath.libmp import * -+from mpmath import * - import random ---- ./sympy/mpmath/tests/test_ode.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_ode.py 2013-08-01 16:28:29.886067845 -0600 -@@ -1,5 +1,5 @@ --#from sympy.mpmath.calculus import ODE_step_euler, ODE_step_rk4, odeint, arange --from sympy.mpmath import odefun, cos, sin, mpf, sinc, mp -+#from mpmath.calculus import ODE_step_euler, ODE_step_rk4, odeint, arange -+from mpmath import odefun, cos, sin, mpf, sinc, mp - - ''' - solvers = [ODE_step_euler, ODE_step_rk4] ---- ./sympy/mpmath/tests/test_bitwise.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_bitwise.py 2013-08-01 16:28:29.887067844 -0600 -@@ -2,8 +2,8 @@ - Test bit-level integer and mpf operations - """ - --from sympy.mpmath import * --from sympy.mpmath.libmp import * -+from mpmath import * -+from mpmath.libmp import * - - def test_bitcount(): - assert bitcount(0) == 0 ---- ./sympy/mpmath/tests/test_summation.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_summation.py 2013-08-01 16:28:29.887067844 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - - def test_sumem(): - mp.dps = 15 ---- ./sympy/mpmath/tests/test_linalg.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_linalg.py 2013-08-01 16:28:29.887067844 -0600 -@@ -2,7 +2,7 @@ - - from __future__ import division - --from sympy.mpmath import * -+from mpmath import * - - # XXX: these shouldn't be visible(?) - LU_decomp = mp.LU_decomp ---- ./sympy/mpmath/tests/test_identify.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_identify.py 2013-08-01 16:28:29.889067842 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - - def test_pslq(): - mp.dps = 15 ---- ./sympy/mpmath/tests/test_convert.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_convert.py 2013-08-01 16:28:29.889067842 -0600 -@@ -1,6 +1,6 @@ - import random --from sympy.mpmath import * --from sympy.mpmath.libmp import * -+from mpmath import * -+from mpmath.libmp import * - - - def test_basic_string(): ---- ./sympy/mpmath/tests/test_power.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_power.py 2013-08-01 16:28:29.889067842 -0600 -@@ -1,5 +1,5 @@ --from sympy.mpmath import * --from sympy.mpmath.libmp import * -+from mpmath import * -+from mpmath.libmp import * - - import random - ---- ./sympy/mpmath/tests/test_division.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_division.py 2013-08-01 16:28:29.889067842 -0600 -@@ -1,5 +1,5 @@ --from sympy.mpmath.libmp import * --from sympy.mpmath import mpf, mp -+from mpmath.libmp import * -+from mpmath import mpf, mp - - from random import randint, choice, seed - ---- ./sympy/mpmath/tests/test_elliptic.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_elliptic.py 2013-08-01 16:28:29.890067841 -0600 -@@ -13,10 +13,10 @@ References: - - """ - --import sympy.mpmath -+import mpmath - import random - --from sympy.mpmath import * -+from mpmath import * - - def mpc_ae(a, b, eps=eps): - res = True ---- ./sympy/mpmath/tests/test_matrices.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_matrices.py 2013-08-01 16:28:29.890067841 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - - def test_matrix_basic(): - A1 = matrix(3) ---- ./sympy/mpmath/tests/test_special.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_special.py 2013-08-01 16:28:29.890067841 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - - def test_special(): - assert inf == inf ---- ./sympy/mpmath/tests/test_basic_ops.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_basic_ops.py 2013-08-01 16:28:29.891067840 -0600 -@@ -1,6 +1,6 @@ --import sympy.mpmath --from sympy.mpmath import * --from sympy.mpmath.libmp import * -+import mpmath -+from mpmath import * -+from mpmath.libmp import * - import random - import sys - -@@ -140,7 +140,7 @@ def test_hash(): - # Check that overflow doesn't assign equal hashes to large numbers - assert hash(mpf('1e1000')) != hash('1e10000') - assert hash(mpc(100,'1e1000')) != hash(mpc(200,'1e1000')) -- from sympy.mpmath.rational import mpq -+ from mpmath.rational import mpq - assert hash(mp.mpq(1,3)) - assert hash(mp.mpq(0,1)) == 0 - assert hash(mp.mpq(-1,1)) == hash(-1) -@@ -341,7 +341,7 @@ def test_floor_ceil_nint_frac(): - assert frac(3.25+4.75j) == 0.25+0.75j - - def test_isnan_etc(): -- from sympy.mpmath.rational import mpq -+ from mpmath.rational import mpq - assert isnan(nan) == True - assert isnan(3) == False - assert isnan(mpf(3)) == False ---- ./sympy/mpmath/tests/test_hp.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_hp.py 2013-08-01 16:28:29.891067840 -0600 -@@ -5,7 +5,7 @@ verified with Mathematica. - """ - - import time --from sympy.mpmath import * -+from mpmath import * - - precs = [5, 15, 28, 35, 57, 80, 100, 150, 200] - ---- ./sympy/mpmath/tests/test_calculus.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_calculus.py 2013-08-01 16:28:29.892067839 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - - def test_approximation(): - mp.dps = 15 ---- ./sympy/mpmath/tests/test_functions2.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_functions2.py 2013-08-01 16:28:29.892067839 -0600 -@@ -1,5 +1,5 @@ - import math --from sympy.mpmath import * -+from mpmath import * - - from sympy.utilities.pytest import XFAIL - ---- ./sympy/mpmath/tests/test_quad.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_quad.py 2013-08-01 16:28:29.893067838 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - - def ae(a, b): - return abs(a-b) < 10**(-mp.dps+5) ---- ./sympy/mpmath/tests/test_diff.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_diff.py 2013-08-01 16:28:29.893067838 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import * -+from mpmath import * - - def test_diff(): - mp.dps = 15 ---- ./sympy/mpmath/tests/test_trig.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_trig.py 2013-08-01 16:28:29.893067838 -0600 -@@ -1,5 +1,5 @@ --from sympy.mpmath import * --from sympy.mpmath.libmp import * -+from mpmath import * -+from mpmath.libmp import * - - def test_trig_misc_hard(): - mp.prec = 53 ---- ./sympy/mpmath/tests/test_str.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_str.py 2013-08-01 16:28:29.894067837 -0600 -@@ -1,4 +1,4 @@ --from sympy.mpmath import nstr, matrix, inf -+from mpmath import nstr, matrix, inf - - def test_nstr(): - m = matrix([[0.75, 0.190940654, -0.0299195971], ---- ./sympy/mpmath/tests/test_pickle.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_pickle.py 2013-08-01 16:28:29.894067837 -0600 -@@ -4,7 +4,7 @@ import os - import tempfile - import pickle - --from sympy.mpmath import * -+from mpmath import * - - def pickler(obj): - fn = tempfile.mktemp() ---- ./sympy/mpmath/tests/test_fp.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_fp.py 2013-08-01 16:28:29.896067836 -0600 -@@ -6,7 +6,7 @@ exp 2.25 - log 2.25 - ''' - --from sympy.mpmath import * -+from mpmath import * - mp.dps = 20 - for test in cases.splitlines(): - if not test: -@@ -21,7 +21,7 @@ for test in cases.splitlines(): - - """ - --from sympy.mpmath import fp -+from mpmath import fp - - def ae(x, y, tol=1e-12): - if x == y: ---- ./sympy/mpmath/tests/test_visualization.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_visualization.py 2013-08-01 16:28:29.896067836 -0600 -@@ -9,7 +9,7 @@ sure that passing custom Axes works. - # for a test, so let's just skip this entirely. - - disabled = True --from sympy.mpmath import mp, fp -+from mpmath import mp, fp - - def test_axes(): - try: ---- ./sympy/mpmath/tests/test_rootfinding.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/mpmath/tests/test_rootfinding.py 2013-08-01 16:28:29.896067836 -0600 -@@ -1,5 +1,5 @@ --from sympy.mpmath import * --from sympy.mpmath.calculus.optimization import Secant, Muller, Bisection, Illinois, \ -+from mpmath import * -+from mpmath.calculus.optimization import Secant, Muller, Bisection, Illinois, \ - Pegasus, Anderson, Ridder, ANewton, Newton, MNewton, MDNewton - - from sympy.utilities.pytest import XFAIL ---- ./sympy/physics/quantum/qubit.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/physics/quantum/qubit.py 2013-08-01 16:28:29.896067836 -0600 -@@ -22,7 +22,7 @@ from sympy.physics.quantum.represent imp - from sympy.physics.quantum.matrixutils import ( - numpy_ndarray, scipy_sparse_matrix - ) --from sympy.mpmath.libmp.libintmath import bitcount -+from mpmath.libmp.libintmath import bitcount - - __all__ = [ - 'Qubit', ---- ./sympy/physics/quantum/constants.py.orig 2013-07-13 11:50:18.000000000 -0600 -+++ ./sympy/physics/quantum/constants.py 2013-08-01 16:28:29.896067836 -0600 +-from sympy.mpmath.libmp import (fzero, ++from mpmath.libmp import (fzero, + 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-0.7.3/sympy/physics/quantum/constants.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/physics/quantum/constants.py 2013-10-17 20:00:00.000000000 -0600 @@ -3,7 +3,7 @@ from sympy.core.numbers import NumberSymbol from sympy.core.singleton import Singleton @@ -932,34 +1086,245 @@ #----------------------------------------------------------------------------- # Constants ---- ./sympy/simplify/simplify.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/simplify/simplify.py 2013-08-01 16:28:29.898067834 -0600 +--- ./sympy-0.7.3/sympy/physics/quantum/qubit.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/physics/quantum/qubit.py 2013-10-17 20:00:00.000000000 -0600 +@@ -22,7 +22,7 @@ from sympy.physics.quantum.represent imp + from sympy.physics.quantum.matrixutils import ( + numpy_ndarray, scipy_sparse_matrix + ) +-from sympy.mpmath.libmp.libintmath import bitcount ++from mpmath.libmp.libintmath import bitcount + + __all__ = [ + 'Qubit', +--- ./sympy-0.7.3/sympy/polys/domains/groundtypes.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/polys/domains/groundtypes.py 2013-10-17 20:00:00.000000000 -0600 +@@ -71,13 +71,13 @@ else: + gmpy_sqrt = None + gmpy_qdiv = None + +-from sympy.mpmath import ( ++from mpmath import ( + mpf as MPmathReal, + mpc as MPmathComplex, + mpi as MPmathInterval, + ) + +-import sympy.mpmath.libmp as mlib ++import mpmath.libmp as mlib + + + def python_sqrt(n): +--- ./sympy-0.7.3/sympy/polys/numberfields.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/polys/numberfields.py 2013-10-17 20:00:00.000000000 -0600 +@@ -39,7 +39,7 @@ from sympy.utilities import ( + from sympy.simplify.simplify import _mexpand, _is_sum_surds + from sympy.ntheory import sieve + from sympy.ntheory.factor_ import divisors +-from sympy.mpmath import pslq, mp ++from mpmath import pslq, mp + + + def _choose_factor(factors, x, v, prec=200): +--- ./sympy-0.7.3/sympy/polys/polytools.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/polys/polytools.py 2013-10-17 20:00:00.000000000 -0600 +@@ -56,7 +56,7 @@ from sympy.polys.polyerrors import ( + from sympy.utilities import group + + import sympy.polys +-import sympy.mpmath ++import mpmath + + from sympy.polys.domains import FF, QQ + from sympy.polys.constructor import construct_domain +@@ -3180,17 +3180,17 @@ class Poly(Expr): + coeffs = [ coeff.evalf(n=n).as_real_imag() + for coeff in f.all_coeffs() ] + +- dps = sympy.mpmath.mp.dps +- sympy.mpmath.mp.dps = n ++ dps = mpmath.mp.dps ++ mpmath.mp.dps = n + + try: + try: +- coeffs = [ sympy.mpmath.mpc(*coeff) for coeff in coeffs ] ++ coeffs = [ mpmath.mpc(*coeff) for coeff in coeffs ] + except TypeError: + raise DomainError( + "numerical domain expected, got %s" % f.rep.dom) + +- result = sympy.mpmath.polyroots( ++ result = mpmath.polyroots( + coeffs, maxsteps=maxsteps, cleanup=cleanup, error=error) + + if error: +@@ -3200,7 +3200,7 @@ class Poly(Expr): + + roots = list(map(sympify, sorted(roots, key=lambda r: (r.real, r.imag)))) + finally: +- sympy.mpmath.mp.dps = dps ++ mpmath.mp.dps = dps + + if error is not None: + return roots, sympify(error) +--- ./sympy-0.7.3/sympy/polys/rootoftools.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/polys/rootoftools.py 2013-10-17 20:00:00.000000000 -0600 +@@ -23,8 +23,8 @@ from sympy.polys.polyerrors import ( + + from sympy.polys.domains import QQ + +-from sympy.mpmath import mp, mpf, mpc, findroot +-from sympy.mpmath.libmp.libmpf import prec_to_dps ++from mpmath import mp, mpf, mpc, findroot ++from mpmath.libmp.libmpf import prec_to_dps + + from sympy.utilities import lambdify + +--- ./sympy-0.7.3/sympy/printing/latex.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/printing/latex.py 2013-10-17 20:00:00.000000000 -0600 +@@ -10,8 +10,8 @@ from .printer import Printer + from .conventions import split_super_sub, requires_partial + from .precedence import precedence, PRECEDENCE + +-import sympy.mpmath.libmp as mlib +-from sympy.mpmath.libmp import prec_to_dps ++import mpmath.libmp as mlib ++from mpmath.libmp import prec_to_dps + + from sympy.core.compatibility import default_sort_key + from sympy.utilities.iterables import has_variety +--- ./sympy-0.7.3/sympy/printing/repr.py.orig 2013-10-17 16:31:19.530651253 -0600 ++++ ./sympy-0.7.3/sympy/printing/repr.py 2013-10-17 20:00:00.000000000 -0600 +@@ -7,8 +7,8 @@ relation eval(srepr(expr))=expr holds in + + from sympy.core.function import AppliedUndef + from .printer import Printer +-import sympy.mpmath.libmp as mlib +-from sympy.mpmath.libmp import prec_to_dps, repr_dps ++import mpmath.libmp as mlib ++from mpmath.libmp import prec_to_dps, repr_dps + + + class ReprPrinter(Printer): +--- ./sympy-0.7.3/sympy/printing/str.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/printing/str.py 2013-10-17 20:00:00.000000000 -0600 +@@ -8,8 +8,8 @@ from sympy.core.numbers import Integer + from .printer import Printer + from sympy.printing.precedence import precedence, PRECEDENCE + +-import sympy.mpmath.libmp as mlib +-from sympy.mpmath.libmp import prec_to_dps ++import mpmath.libmp as mlib ++from mpmath.libmp import prec_to_dps + + from sympy.utilities import default_sort_key + +--- ./sympy-0.7.3/sympy/simplify/simplify.py.orig 2013-10-17 16:31:19.553651241 -0600 ++++ ./sympy-0.7.3/sympy/simplify/simplify.py 2013-10-17 20:00:00.000000000 -0600 @@ -31,7 +31,7 @@ from sympy.ntheory.factor_ import multip from sympy.polys import (Poly, together, reduced, cancel, factor, ComputationFailed, lcm, gcd) -import sympy.mpmath as mpmath +import mpmath + from functools import reduce - def _mexpand(expr): ---- ./sympy/matrices/matrices.py.orig 2013-07-13 11:50:19.000000000 -0600 -+++ ./sympy/matrices/matrices.py 2013-08-01 16:28:29.899067833 -0600 -@@ -1183,7 +1183,7 @@ class MatrixBase(object): - """Solve the linear system Ax = rhs for x where A = self. +--- ./sympy-0.7.3/sympy/solvers/solvers.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/solvers/solvers.py 2013-10-17 20:00:00.000000000 -0600 +@@ -45,7 +45,7 @@ from sympy.utilities.lambdify import lam + from sympy.utilities.misc import filldedent + from sympy.utilities.iterables import uniq - This is for symbolic matrices, for real or complex ones use -- sympy.mpmath.lu_solve or sympy.mpmath.qr_solve. -+ mpmath.lu_solve or mpmath.qr_solve. +-from sympy.mpmath import findroot ++from mpmath import findroot - See Also - ======== -@@ -1559,7 +1559,7 @@ class MatrixBase(object): - to use QRsolve. + from sympy.solvers.polysys import solve_poly_system + from sympy.solvers.inequalities import reduce_inequalities +@@ -2267,8 +2267,8 @@ def nsolve(*args, **kwargs): + Overdetermined systems are supported. - This is mainly for educational purposes and symbolic matrices, for real -- (or complex) matrices use sympy.mpmath.qr_solve. -+ (or complex) matrices use mpmath.qr_solve. + >>> from sympy import Symbol, nsolve +- >>> import sympy +- >>> sympy.mpmath.mp.dps = 15 ++ >>> import mpmath, sympy ++ >>> mpmath.mp.dps = 15 + >>> x1 = Symbol('x1') + >>> x2 = Symbol('x2') + >>> f1 = 3 * x1**2 - 2 * x2**2 - 1 +--- ./sympy-0.7.3/sympy/solvers/tests/test_numeric.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/solvers/tests/test_numeric.py 2013-10-17 20: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 ++from mpmath import mnorm, mpf + from sympy.solvers import nsolve + from sympy.utilities.lambdify import lambdify + from sympy.utilities.pytest import raises, XFAIL +--- ./sympy-0.7.3/sympy/statistics/distributions.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/statistics/distributions.py 2013-10-17 20:00:00.000000000 -0600 +@@ -207,7 +207,7 @@ class Normal(ContinuousProbability): + # error function is not yet implemented in SymPy but can easily be + # computed numerically - See Also - ======== +- from sympy.mpmath import mpf, erfinv ++ from mpmath import mpf, erfinv + + # calculate y = ierf(p) by solving erf(y) - p = 0 + y = erfinv(mpf(p)) +--- ./sympy-0.7.3/sympy/utilities/tests/test_lambdify.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/utilities/tests/test_lambdify.py 2013-10-17 20: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) + from sympy.printing.lambdarepr import LambdaPrinter +-from sympy import mpmath ++import mpmath + from sympy.utilities.lambdify import implemented_function + from sympy.utilities.pytest import skip + from sympy.utilities.decorator import conserve_mpmath_dps +--- ./sympy-0.7.3/sympy/statistics/tests/test_statistics.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/statistics/tests/test_statistics.py 2013-10-17 20:00:00.000000000 -0600 +@@ -3,7 +3,7 @@ from sympy.functions import erf + + from operator import abs + +-from sympy.mpmath import mp ++from mpmath import mp + + from sympy.utilities.tests.test_pickling import check + +--- ./sympy-0.7.3/sympy/utilities/decorator.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/utilities/decorator.py 2013-10-17 20:00:00.000000000 -0600 +@@ -76,7 +76,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.""" + import functools +- from sympy import mpmath ++ import mpmath + + def func_wrapper(): + dps = mpmath.mp.dps +--- ./sympy-0.7.3/sympy/utilities/lambdify.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/utilities/lambdify.py 2013-10-17 20:00:00.000000000 -0600 +@@ -85,7 +85,7 @@ NUMPY_TRANSLATIONS = { + # Available modules: + MODULES = { + "math": (MATH, MATH_DEFAULT, MATH_TRANSLATIONS, ("from math import *",)), +- "mpmath": (MPMATH, MPMATH_DEFAULT, MPMATH_TRANSLATIONS, ("from sympy.mpmath import *",)), ++ "mpmath": (MPMATH, MPMATH_DEFAULT, MPMATH_TRANSLATIONS, ("from mpmath import *",)), + "numpy": (NUMPY, NUMPY_DEFAULT, NUMPY_TRANSLATIONS, ("import_module('numpy')",)), + "sympy": (SYMPY, SYMPY_DEFAULT, {}, ( + "from sympy.functions import *", +--- ./sympy-0.7.3/sympy/utilities/runtests.py.orig 2013-07-13 11:53:32.000000000 -0600 ++++ ./sympy-0.7.3/sympy/utilities/runtests.py 2013-10-17 20:00:00.000000000 -0600 +@@ -547,7 +547,7 @@ def _doctest(*paths, **kwargs): + blacklist = kwargs.get("blacklist", []) + blacklist.extend([ + "doc/src/modules/mpmath", # needs to be fixed upstream +- "sympy/mpmath", # needs to be fixed upstream ++ "mpmath", # needs to be fixed upstream + "doc/src/modules/plotting.rst", # generates live plots + "sympy/statistics", # prints a deprecation + "doc/src/modules/statistics.rst", # warning (the module is deprecated) diff --git a/sympy.spec b/sympy.spec index 583e5e7..dffbc97 100644 --- a/sympy.spec +++ b/sympy.spec @@ -1,10 +1,11 @@ Name: sympy Version: 0.7.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Python library for symbolic mathematics License: BSD URL: http://sympy.org/ -Source0: https://github.com/%{name}/%{name}/releases/download/%{name}-%{veresion}/%{name}-%{version}.tar.gz +Source0: https://github.com/%{name}/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz +Source1: https://github.com/%{name}/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}-py3.3.tar.gz # Upstream tried to graft in another project as a private copy; we rip # it out (rhbz# 551576): Patch0: %{name}-0.7.3-strip-internal-mpmath.patch @@ -12,9 +13,9 @@ BuildArch: noarch BuildRequires: gettext BuildRequires: graphviz -BuildRequires: numpy -BuildRequires: python2-devel -BuildRequires: python-mpmath +BuildRequires: numpy python3-numpy +BuildRequires: python2-devel python3-devel +BuildRequires: python-mpmath python3-mpmath BuildRequires: python-sphinx BuildRequires: tex(latex) BuildRequires: tex-dvipng @@ -29,6 +30,18 @@ while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python and does not require any external libraries. +%package -n python3-%{name} +Summary: A Python3 library for symbolic mathematics +Requires: python3-matplotlib +Requires: python3-mpmath +Requires: python3-pyglet + +%description -n python3-%{name} +SymPy aims to become a full-featured computer algebra system (CAS) +while keeping the code as simple as possible in order to be +comprehensible and easily extensible. SymPy is written entirely in +Python and does not require any external libraries. + %package texmacs Summary: TeXmacs integration for sympy Requires: %{name} = %{version}-%{release}, TeXmacs @@ -52,26 +65,48 @@ HTML documentation for sympy. %prep %setup -q +%setup -q -T -D -a 1 %patch0 -b .mpmath 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 +sed 's/env //' %{name}-%{version}/bin/isympy > isympy.new +touch -r %{name}-%{version}/bin/isympy isympy.new +mv -f isympy.new %{name}-%{version}/bin/isympy %build -# Build the project -python setup.py build +# Build the python2 version +python2 setup.py build + +# Build the python3 version +cd %{name}-%{version} +python3 setup.py build # Build the documentation -cd doc +cd ../doc make html make cheatsheet +cd ../%{name}-%{version}/doc +make cheatsheet %install -# Install the main project -python setup.py install -O1 --skip-build --root %{buildroot} +# Install the python3 version +cd %{name}-%{version} +python3 setup.py install -O1 --skip-build --root %{buildroot} +mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/isympy3 +cd .. -# Remove extra files +# Install the python2 version +python2 setup.py install -O1 --skip-build --root %{buildroot} + +## Remove extra files rm -f %{buildroot}%{_bindir}/{,doc}test -# Install the TeXmacs integration +## Install the TeXmacs integration cp -p data/TeXmacs/bin/tm_sympy %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/TeXmacs/plugins/sympy cp -a data/TeXmacs/progs %{buildroot}%{_datadir}/TeXmacs/plugins/sympy @@ -86,15 +121,27 @@ rm -f %{buildroot}%{_docdir}/%{name}-doc/html/.buildinfo rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n %check -python setup.py test +# 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 %files %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf -%{python_sitelib}/sympy/ -%{python_sitelib}/sympy-%{version}-*.egg-info +%{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 +%{python3_sitelib}/sympy/ +%{python3_sitelib}/sympy-%{version}-*.egg-info +%{_bindir}/isympy3 + %files texmacs %doc data/TeXmacs/LICENSE %{_bindir}/tm_sympy @@ -108,6 +155,9 @@ python setup.py test %{_docdir}/%{name}-doc/html %changelog +* Fri Oct 18 2013 Jerry James - 0.7.3-2 +- Build a python3 subpackage (bz 982759) + * Fri Aug 2 2013 Jerry James - 0.7.3-1 - Update to 0.7.3 - Upstream dropped all tutorial translations