Gentoo Archives: gentoo-commits

From: Andrey Grozin <grozin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/sympy/, dev-python/sympy/files/
Date: Thu, 29 Dec 2016 01:30:29
Message-Id: 1482974989.b1754d7ad8e53f7782dc873acaf99f8d2b99d04d.grozin@gentoo
1 commit: b1754d7ad8e53f7782dc873acaf99f8d2b99d04d
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 29 01:29:49 2016 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 29 01:29:49 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1754d7a
7
8 dev-python/sympy: fix a wrong test
9
10 Bug: 603214
11
12 Package-Manager: Portage-2.3.3, Repoman-2.3.1
13
14 dev-python/sympy/files/sympy-1.0-zeta.patch | 47 +++++++++++++++++++++++++++++
15 dev-python/sympy/sympy-1.0-r1.ebuild | 2 +-
16 2 files changed, 48 insertions(+), 1 deletion(-)
17
18 diff --git a/dev-python/sympy/files/sympy-1.0-zeta.patch b/dev-python/sympy/files/sympy-1.0-zeta.patch
19 new file mode 100644
20 index 00000000..43f5483
21 --- /dev/null
22 +++ b/dev-python/sympy/files/sympy-1.0-zeta.patch
23 @@ -0,0 +1,47 @@
24 +diff -r -U2 sympy-1.0.orig/sympy/functions/special/tests/test_zeta_functions.py sympy-1.0/sympy/functions/special/tests/test_zeta_functions.py
25 +--- sympy-1.0.orig/sympy/functions/special/tests/test_zeta_functions.py 2016-03-09 00:38:39.000000000 +0600
26 ++++ sympy-1.0/sympy/functions/special/tests/test_zeta_functions.py 2016-12-28 23:25:19.370041561 +0700
27 +@@ -125,5 +125,5 @@
28 + assert polylog(s, 0) == 0
29 + assert polylog(s, 1) == zeta(s)
30 +- assert polylog(s, -1) == dirichlet_eta(s)
31 ++ assert polylog(s, -1) == -dirichlet_eta(s)
32 +
33 + assert myexpand(polylog(1, z), -log(1 + exp_polar(-I*pi)*z))
34 +diff -r -U2 sympy-1.0.orig/sympy/functions/special/zeta_functions.py sympy-1.0/sympy/functions/special/zeta_functions.py
35 +--- sympy-1.0.orig/sympy/functions/special/zeta_functions.py 2016-03-09 00:38:39.000000000 +0600
36 ++++ sympy-1.0/sympy/functions/special/zeta_functions.py 2016-12-28 23:23:56.109047180 +0700
37 +@@ -245,5 +245,5 @@
38 + zeta(s)
39 + >>> polylog(s, -1)
40 +- dirichlet_eta(s)
41 ++ -dirichlet_eta(s)
42 +
43 + If :math:`s` is a negative integer, :math:`0` or :math:`1`, the
44 +@@ -272,10 +272,17 @@
45 + @classmethod
46 + def eval(cls, s, z):
47 ++ from sympy import unpolarify
48 + if z == 1:
49 + return zeta(s)
50 + elif z == -1:
51 +- return dirichlet_eta(s)
52 ++ return -dirichlet_eta(s)
53 + elif z == 0:
54 +- return 0
55 ++ return S.Zero
56 ++
57 ++ # branch handling
58 ++ if (1 - abs(z)).is_nonnegative:
59 ++ newz = unpolarify(z)
60 ++ if newz != z:
61 ++ return cls(s, newz)
62 +
63 + def fdiff(self, argindex=1):
64 +@@ -486,5 +493,5 @@
65 + For `\operatorname{Re}(s) > 0`, this function is defined as
66 +
67 +- .. math:: \eta(s) = \sum_{n=1}^\infty \frac{(-1)^n}{n^s}.
68 ++ .. math:: \eta(s) = \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^s}.
69 +
70 + It admits a unique analytic continuation to all of :math:`\mathbb{C}`.
71
72 diff --git a/dev-python/sympy/sympy-1.0-r1.ebuild b/dev-python/sympy/sympy-1.0-r1.ebuild
73 index 88544a9..2015771 100644
74 --- a/dev-python/sympy/sympy-1.0-r1.ebuild
75 +++ b/dev-python/sympy/sympy-1.0-r1.ebuild
76 @@ -51,7 +51,7 @@ pkg_setup() {
77
78 python_prepare_all() {
79 epatch "${FILESDIR}"/${P}-doc-makefile.patch
80 - epatch "${FILESDIR}"/${PN}-0.7.6.1-zeta.patch
81 + epatch "${FILESDIR}"/${P}-zeta.patch
82 distutils-r1_python_prepare_all
83 }