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/files/, dev-python/sympy/
Date: Tue, 01 Dec 2015 06:43:09
Message-Id: 1448951815.03423e2c774a7692551ab6e5fe73408d0d370ccb.grozin@gentoo
1 commit: 03423e2c774a7692551ab6e5fe73408d0d370ccb
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 1 06:24:37 2015 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 1 06:36:55 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03423e2c
7
8 dev-python/sympy: upstream bug fix
9
10 https://github.com/skirpichev/omg/pull/137
11
12 Package-Manager: portage-2.2.26
13
14 dev-python/sympy/files/sympy-0.7.6.1-zeta.patch | 32 +++++++++
15 dev-python/sympy/sympy-0.7.6.1-r1.ebuild | 91 +++++++++++++++++++++++++
16 2 files changed, 123 insertions(+)
17
18 diff --git a/dev-python/sympy/files/sympy-0.7.6.1-zeta.patch b/dev-python/sympy/files/sympy-0.7.6.1-zeta.patch
19 new file mode 100644
20 index 0000000..ffb85f9
21 --- /dev/null
22 +++ b/dev-python/sympy/files/sympy-0.7.6.1-zeta.patch
23 @@ -0,0 +1,32 @@
24 +diff -r -U1 sympy-0.7.6.1.orig/sympy/functions/special/zeta_functions.py sympy-0.7.6.1/sympy/functions/special/zeta_functions.py
25 +--- sympy-0.7.6.1.orig/sympy/functions/special/zeta_functions.py 2015-09-04 02:34:00.000000000 +0600
26 ++++ sympy-0.7.6.1/sympy/functions/special/zeta_functions.py 2015-12-01 11:27:24.000000000 +0600
27 +@@ -243,3 +243,3 @@
28 + >>> polylog(s, -1)
29 +- dirichlet_eta(s)
30 ++ -dirichlet_eta(s)
31 +
32 +@@ -270,2 +270,3 @@
33 + def eval(cls, s, z):
34 ++ from sympy import unpolarify
35 + if z == 1:
36 +@@ -273,6 +274,12 @@
37 + elif z == -1:
38 +- return dirichlet_eta(s)
39 ++ return -dirichlet_eta(s)
40 + elif z == 0:
41 +- return 0
42 ++ return S.Zero
43 +
44 ++ # branch handling
45 ++ if (1 - abs(z)).is_nonnegative:
46 ++ newz = unpolarify(z)
47 ++ if newz != z:
48 ++ return cls(s, newz)
49 ++
50 + def fdiff(self, argindex=1):
51 +@@ -479,3 +486,3 @@
52 +
53 +- .. math:: \eta(s) = \sum_{n=1}^\infty \frac{(-1)^n}{n^s}.
54 ++ .. math:: \eta(s) = \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^s}.
55 +
56
57 diff --git a/dev-python/sympy/sympy-0.7.6.1-r1.ebuild b/dev-python/sympy/sympy-0.7.6.1-r1.ebuild
58 new file mode 100644
59 index 0000000..c480b6e
60 --- /dev/null
61 +++ b/dev-python/sympy/sympy-0.7.6.1-r1.ebuild
62 @@ -0,0 +1,91 @@
63 +# Copyright 1999-2015 Gentoo Foundation
64 +# Distributed under the terms of the GNU General Public License v2
65 +# $Id$
66 +
67 +EAPI=5
68 +
69 +PYTHON_COMPAT=( python{2_7,3_3,3_4} )
70 +
71 +inherit distutils-r1 eutils virtualx
72 +
73 +DESCRIPTION="Computer Algebra System in pure Python"
74 +HOMEPAGE="http://sympy.org"
75 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz"
76 +
77 +LICENSE="BSD"
78 +SLOT="0"
79 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-macos"
80 +IUSE="doc examples gtk imaging ipython latex mathml opengl pdf png pyglet test texmacs theano"
81 +
82 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
83 + doc? ( python_targets_python2_7 )"
84 +
85 +RDEPEND="
86 + $(python_gen_cond_dep '>=dev-python/pexpect-2.0[${PYTHON_USEDEP}]' python2_7)
87 + imaging? ( dev-python/pillow[${PYTHON_USEDEP}] )
88 + ipython? ( dev-python/ipython[${PYTHON_USEDEP}] )
89 + latex? (
90 + virtual/latex-base
91 + dev-texlive/texlive-fontsextra
92 + png? ( app-text/dvipng )
93 + pdf? ( app-text/ghostscript-gpl )
94 + )
95 + mathml? (
96 + dev-libs/libxml2:2[${PYTHON_USEDEP}]
97 + $(python_gen_cond_dep 'dev-libs/libxslt[${PYTHON_USEDEP}]' python2_7)
98 + gtk? ( x11-libs/gtkmathview[gtk] )
99 + )
100 + opengl? ( dev-python/pyopengl[${PYTHON_USEDEP}] )
101 + pyglet? ( $(python_gen_cond_dep 'dev-python/pyglet[${PYTHON_USEDEP}]' python2_7) )
102 + texmacs? ( app-office/texmacs )
103 + theano? ( $(python_gen_cond_dep 'dev-python/theano[${PYTHON_USEDEP}]' python2_7) )
104 +"
105 +
106 +DEPEND="${RDEPEND}
107 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
108 + test? ( ${RDEPEND} dev-python/pytest[${PYTHON_USEDEP}] )"
109 +
110 +python_prepare_all() {
111 + epatch "${FILESDIR}"/${PN}-0.7.6-doc-makefile.patch
112 + epatch "${FILESDIR}"/${P}-sphinx-1.3.1.patch
113 + epatch "${FILESDIR}"/${P}-zeta.patch
114 + distutils-r1_python_prepare_all
115 +}
116 +
117 +python_compile() {
118 + PYTHONPATH="." distutils-r1_python_compile
119 +}
120 +
121 +python_compile_all() {
122 + if use doc; then
123 + export XDG_CONFIG_HOME="${T}/config-dir"
124 + mkdir "${XDG_CONFIG_HOME}" || die
125 + chmod 0700 "${XDG_CONFIG_HOME}" || die
126 + emake -j1 -C doc html info cheatsheet
127 + fi
128 +}
129 +
130 +python_test() {
131 + VIRTUALX_COMMAND="./setup.py" virtualmake test
132 +}
133 +
134 +python_install() {
135 + PYTHONPATH="." distutils-r1_python_install
136 +}
137 +
138 +python_install_all() {
139 + local DOCS=( AUTHORS README.rst )
140 + use doc &&\
141 + DOCS=( ${DOCS[*]} doc/_build/cheatsheet/cheatsheet.pdf doc/_build/cheatsheet/combinatoric_cheatsheet.pdf ) &&\
142 + local HTML_DOCS=( doc/_build/html/. ) &&\
143 + doinfo doc/_build/texinfo/${PN}.info
144 + use examples && local EXAMPLES=( examples/. )
145 + distutils-r1_python_install_all
146 +
147 + if use texmacs; then
148 + exeinto /usr/libexec/TeXmacs/bin/
149 + doexe data/TeXmacs/bin/tm_sympy
150 + insinto /usr/share/TeXmacs/plugins/sympy/
151 + doins -r data/TeXmacs/progs
152 + fi
153 +}