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: Fri, 28 Jul 2017 00:07:19
Message-Id: 1501200402.0714332d34cc49f3ce29603825857fabc1391e6e.grozin@gentoo
1 commit: 0714332d34cc49f3ce29603825857fabc1391e6e
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 28 00:06:42 2017 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 28 00:06:42 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0714332d
7
8 dev-python/sympy: bump to 1.1.1, an important patch re-added
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 dev-python/sympy/Manifest | 1 +
13 dev-python/sympy/files/sympy-1.1.1-zeta.patch | 29 +++++++++
14 dev-python/sympy/sympy-1.1.1.ebuild | 90 +++++++++++++++++++++++++++
15 3 files changed, 120 insertions(+)
16
17 diff --git a/dev-python/sympy/Manifest b/dev-python/sympy/Manifest
18 index 6290308fadd..718207f7370 100644
19 --- a/dev-python/sympy/Manifest
20 +++ b/dev-python/sympy/Manifest
21 @@ -1,3 +1,4 @@
22 DIST sympy-0.7.6.1.tar.gz 6431571 SHA256 1fc272b51091aabe7d07f1bf9f0a47f3e28657fb2bec52bf3ef0e8f159f5f564 SHA512 18877abd3c530418e4f4942cbb0a03140dc81e5a1004720c472fb97cf8eaa41acca59765f6278715ea88bcd0cd07ad5952863a0d1b6e6d00994d257e8c0a6574 WHIRLPOOL b0c0c74e7865c91585d1a2c8510fe328b8e697dec02bd17aaa446ef6e089b9cf2ca5b4f58b6b59febccf142384b907e1bd47451e22fa305843bd883355801226
23 DIST sympy-1.0.tar.gz 4281528 SHA256 3eacd210d839e4db911d216a9258a3ac6f936992f66db211e22767983297ffae SHA512 977db6e9bc6a5918cceb255981a57e85e7060c0922aefd2968b004d25d704e25a5cb5bbe09eb387e8695581e23e2825d9c40310068fe25ece7e9c23037a21f39 WHIRLPOOL df02cc8603c23f621226f28b4f0555e765f145d968869058ed9420fedd3c6d6d0f095ee14fa864cd505455f245e5adf10794fc3b1392fb5a331ed5dc506b988b
24 +DIST sympy-1.1.1.tar.gz 4580952 SHA256 ac5b57691bc43919dcc21167660a57cc51797c28a4301a6144eff07b751216a4 SHA512 ff8857fd5810795554ca4f636b2d8e633057d7ea7df76461003d823ecbaddc98cde0561eb79a1058741c5ece233c13bfcb5e30d5bfb8ac6dbab3d05d8226f92b WHIRLPOOL 3ab86021e99de620127bbd3da994745d265e66fbe7ebf77984106f998443200dd7a5a3295cc62e3bca7e3eb1df58b331d1faba568760230fab550c5c2c3f92b9
25 DIST sympy-1.1.tar.gz 4579454 SHA256 e42d7b8cc719bb0427b503d49f8489ec6292c74957c3bd04216a8392bee37782 SHA512 4129752778b50fbc08180fe413d2109ad418b54b79caea461b9a6cf6856ab4f50ce95df6131b07791ed633c840648aa7c4dd130ab3f1cbb1e03e7346e995747b WHIRLPOOL bcee355015504a464c89f1cc2c35b3085af6d53a4d8c2245eda124ddbf53fb562b6a768b2d6cd79688b1255a21540094bd18e3f814dd729541a85767e27adb3c
26
27 diff --git a/dev-python/sympy/files/sympy-1.1.1-zeta.patch b/dev-python/sympy/files/sympy-1.1.1-zeta.patch
28 new file mode 100644
29 index 00000000000..d9bab8096fa
30 --- /dev/null
31 +++ b/dev-python/sympy/files/sympy-1.1.1-zeta.patch
32 @@ -0,0 +1,29 @@
33 +diff -U2 -r sympy-1.1.1.orig/sympy/functions/special/zeta_functions.py sympy-1.1.1/sympy/functions/special/zeta_functions.py
34 +--- sympy-1.1.1.orig/sympy/functions/special/zeta_functions.py 2017-07-22 05:17:42.000000000 +0700
35 ++++ sympy-1.1.1/sympy/functions/special/zeta_functions.py 2017-07-28 06:35:28.477927184 +0700
36 +@@ -272,4 +272,5 @@
37 + @classmethod
38 + def eval(cls, s, z):
39 ++ from sympy import unpolarify
40 + if z == 1:
41 + return zeta(s)
42 +@@ -277,5 +278,11 @@
43 + return -dirichlet_eta(s)
44 + elif z == 0:
45 +- return 0
46 ++ return S.Zero
47 ++
48 ++ # branch handling
49 ++ if (1 - abs(z)).is_nonnegative:
50 ++ newz = unpolarify(z)
51 ++ if newz != z:
52 ++ return cls(s, newz)
53 +
54 + def fdiff(self, argindex=1):
55 +@@ -483,5 +490,5 @@
56 + For `\operatorname{Re}(s) > 0`, this function is defined as
57 +
58 +- .. math:: \eta(s) = \sum_{n=1}^\infty \frac{(-1)^n}{n^s}.
59 ++ .. math:: \eta(s) = \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^s}.
60 +
61 + It admits a unique analytic continuation to all of :math:`\mathbb{C}`.
62
63 diff --git a/dev-python/sympy/sympy-1.1.1.ebuild b/dev-python/sympy/sympy-1.1.1.ebuild
64 new file mode 100644
65 index 00000000000..35ea4c1cc06
66 --- /dev/null
67 +++ b/dev-python/sympy/sympy-1.1.1.ebuild
68 @@ -0,0 +1,90 @@
69 +# Copyright 1999-2017 Gentoo Foundation
70 +# Distributed under the terms of the GNU General Public License v2
71 +
72 +EAPI=6
73 +
74 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
75 +
76 +inherit distutils-r1 eutils virtualx
77 +
78 +DESCRIPTION="Computer Algebra System in pure Python"
79 +HOMEPAGE="http://sympy.org"
80 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz"
81 +
82 +LICENSE="BSD"
83 +SLOT="0"
84 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
85 +IUSE="doc examples gtk imaging ipython latex mathml opengl pdf png pyglet symengine test texmacs theano"
86 +
87 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
88 + doc? ( || ( $(python_gen_useflags 'python2*') ) )"
89 +
90 +RDEPEND="dev-python/mpmath[${PYTHON_USEDEP}]
91 + dev-python/pexpect[${PYTHON_USEDEP}]
92 + imaging? ( dev-python/pillow[${PYTHON_USEDEP}] )
93 + ipython? ( dev-python/ipython[${PYTHON_USEDEP}] )
94 + latex? (
95 + virtual/latex-base
96 + dev-texlive/texlive-fontsextra
97 + png? ( app-text/dvipng )
98 + pdf? ( app-text/ghostscript-gpl )
99 + )
100 + mathml? (
101 + dev-libs/libxml2:2[${PYTHON_USEDEP}]
102 + $(python_gen_cond_dep 'dev-libs/libxslt[${PYTHON_USEDEP}]' python2_7)
103 + gtk? ( x11-libs/gtkmathview[gtk] )
104 + )
105 + opengl? ( dev-python/pyopengl[${PYTHON_USEDEP}] )
106 + pyglet? ( dev-python/pyglet[${PYTHON_USEDEP}] )
107 + symengine? ( dev-python/symengine[${PYTHON_USEDEP}] )
108 + texmacs? ( app-office/texmacs )
109 + theano? ( dev-python/theano[${PYTHON_USEDEP}] )
110 +"
111 +
112 +DEPEND="${RDEPEND}
113 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] app-text/docbook2X )
114 + test? ( ${RDEPEND} dev-python/pytest[${PYTHON_USEDEP}] )"
115 +
116 +PATCHES=(
117 + "${FILESDIR}"/${P}-zeta.patch
118 + "${FILESDIR}"/${PN}-1.0-doc-makefile.patch
119 +)
120 +
121 +pkg_setup() {
122 + use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
123 +}
124 +
125 +python_compile_all() {
126 + if use doc; then
127 + export XDG_CONFIG_HOME="${T}/config-dir"
128 + mkdir "${XDG_CONFIG_HOME}" || die
129 + chmod 0700 "${XDG_CONFIG_HOME}" || die
130 + emake -j1 -C doc html info man cheatsheet
131 + fi
132 +}
133 +
134 +python_test() {
135 + virtx "${PYTHON}" setup.py test
136 +}
137 +
138 +python_install_all() {
139 + local DOCS=( AUTHORS README.rst )
140 + if use doc; then
141 + DOCS+=( doc/_build/cheatsheet/cheatsheet.pdf \
142 + doc/_build/cheatsheet/combinatoric_cheatsheet.pdf )
143 + local HTML_DOCS=( doc/_build/html/. )
144 + doinfo doc/_build/texinfo/${PN}.info
145 + fi
146 + if use examples; then
147 + dodoc -r examples
148 + docompress -x /usr/share/doc/${PF}/examples
149 + fi
150 + distutils-r1_python_install_all
151 +
152 + if use texmacs; then
153 + exeinto /usr/libexec/TeXmacs/bin/
154 + doexe data/TeXmacs/bin/tm_sympy
155 + insinto /usr/share/TeXmacs/plugins/sympy/
156 + doins -r data/TeXmacs/progs
157 + fi
158 +}