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/
Date: Mon, 28 Mar 2016 13:03:25
Message-Id: 1459169582.c25aadf4d684872f411ad8e9db89184099c794ac.grozin@gentoo
1 commit: c25aadf4d684872f411ad8e9db89184099c794ac
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 28 12:53:02 2016 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 28 12:53:02 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c25aadf4
7
8 dev-python/sympy: with USE=doc now depends on app-text/docbook2X
9
10 Bug: 577966
11
12 Package-Manager: portage-2.2.28
13
14 dev-python/sympy/sympy-1.0-r1.ebuild | 96 ++++++++++++++++++++++++++++++++++++
15 1 file changed, 96 insertions(+)
16
17 diff --git a/dev-python/sympy/sympy-1.0-r1.ebuild b/dev-python/sympy/sympy-1.0-r1.ebuild
18 new file mode 100644
19 index 0000000..2db71a6
20 --- /dev/null
21 +++ b/dev-python/sympy/sympy-1.0-r1.ebuild
22 @@ -0,0 +1,96 @@
23 +# Copyright 1999-2016 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +EAPI=5
28 +
29 +PYTHON_COMPAT=( python{2_7,3_3,3_4} )
30 +
31 +inherit distutils-r1 eutils virtualx
32 +
33 +DESCRIPTION="Computer Algebra System in pure Python"
34 +HOMEPAGE="http://sympy.org"
35 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz"
36 +
37 +LICENSE="BSD"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-macos"
40 +IUSE="doc examples gtk imaging ipython latex mathml opengl pdf png pyglet test texmacs theano"
41 +
42 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
43 + doc? ( || ( $(python_gen_useflags 'python2*') ) )"
44 +
45 +RDEPEND="dev-python/mpmath[${PYTHON_USEDEP}]
46 + $(python_gen_cond_dep '>=dev-python/pexpect-2.0[${PYTHON_USEDEP}]' python2_7)
47 + imaging? ( dev-python/pillow[${PYTHON_USEDEP}] )
48 + ipython? ( dev-python/ipython[${PYTHON_USEDEP}] )
49 + latex? (
50 + virtual/latex-base
51 + dev-texlive/texlive-fontsextra
52 + png? ( app-text/dvipng )
53 + pdf? ( app-text/ghostscript-gpl )
54 + )
55 + mathml? (
56 + dev-libs/libxml2:2[${PYTHON_USEDEP}]
57 + $(python_gen_cond_dep 'dev-libs/libxslt[${PYTHON_USEDEP}]' python2_7)
58 + gtk? ( x11-libs/gtkmathview[gtk] )
59 + )
60 + opengl? ( dev-python/pyopengl[${PYTHON_USEDEP}] )
61 + pyglet? ( $(python_gen_cond_dep 'dev-python/pyglet[${PYTHON_USEDEP}]' python2_7) )
62 + texmacs? ( app-office/texmacs )
63 + theano? ( $(python_gen_cond_dep 'dev-python/theano[${PYTHON_USEDEP}]' python2_7) )
64 +"
65 +
66 +DEPEND="${RDEPEND}
67 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] app-text/docbook2X )
68 + test? ( ${RDEPEND} dev-python/pytest[${PYTHON_USEDEP}] )"
69 +
70 +pkg_setup() {
71 + use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
72 +}
73 +
74 +python_prepare_all() {
75 + epatch "${FILESDIR}"/${P}-doc-makefile.patch
76 + epatch "${FILESDIR}"/${PN}-0.7.6.1-zeta.patch
77 + distutils-r1_python_prepare_all
78 +}
79 +
80 +python_compile() {
81 + PYTHONPATH="." distutils-r1_python_compile
82 +}
83 +
84 +python_compile_all() {
85 + if use doc; then
86 + export XDG_CONFIG_HOME="${T}/config-dir"
87 + mkdir "${XDG_CONFIG_HOME}" || die
88 + chmod 0700 "${XDG_CONFIG_HOME}" || die
89 + emake -j1 -C doc html info man cheatsheet
90 + fi
91 +}
92 +
93 +python_test() {
94 + virtx "${PYTHON}" setup.py test
95 +}
96 +
97 +python_install() {
98 + PYTHONPATH="." distutils-r1_python_install
99 +}
100 +
101 +python_install_all() {
102 + local DOCS=( AUTHORS README.rst )
103 + if use doc; then
104 + DOCS+=( doc/_build/cheatsheet/cheatsheet.pdf \
105 + doc/_build/cheatsheet/combinatoric_cheatsheet.pdf )
106 + local HTML_DOCS=( doc/_build/html/. )
107 + doinfo doc/_build/texinfo/${PN}.info
108 + fi
109 + use examples && local EXAMPLES=( examples/. )
110 + distutils-r1_python_install_all
111 +
112 + if use texmacs; then
113 + exeinto /usr/libexec/TeXmacs/bin/
114 + doexe data/TeXmacs/bin/tm_sympy
115 + insinto /usr/share/TeXmacs/plugins/sympy/
116 + doins -r data/TeXmacs/progs
117 + fi
118 +}