/[gentoo-x86]/dev-python/ipython/ipython-0.13.ebuild
Gentoo

Contents of /dev-python/ipython/ipython-0.13.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Aug 27 20:00:41 2013 UTC (11 months ago) by xarthisius
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Add missing dependencies. Fixes bug #481342 and #481726 by <jcpetkovich@gmail.com> and Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> respectively. Drop obsolete versions

(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 895192F9)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/ipython/ipython-0.13.ebuild,v 1.4 2012/12/31 12:59:55 mgorny Exp $
4
5 EAPI=4
6
7 # python eclass cruft
8 PYTHON_DEPEND="*:2.6"
9 PYTHON_USE_WITH="readline sqlite"
10 PYTHON_MODNAME="IPython"
11 SUPPORT_PYTHON_ABIS="1"
12 RESTRICT_PYTHON_ABIS="2.5 *-jython *-pypy-*"
13
14 inherit distutils elisp-common eutils virtualx
15
16 DESCRIPTION="Advanced interactive shell for Python"
17 HOMEPAGE="http://ipython.org/"
18 SRC_URI="http://archive.ipython.org/release/${PV}/${P}.tar.gz"
19
20 LICENSE="BSD"
21 SLOT="0"
22 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
23 IUSE="doc emacs examples matplotlib mongodb notebook octave
24 qt4 +smp test wxwidgets"
25
26 CDEPEND="dev-python/decorator
27 dev-python/pexpect
28 virtual/pyparsing
29 dev-python/simplegeneric
30 virtual/python-argparse
31 emacs? ( app-emacs/python-mode virtual/emacs )
32 matplotlib? ( dev-python/matplotlib )
33 mongodb? ( dev-python/pymongo )
34 octave? ( dev-python/oct2py )
35 smp? ( dev-python/pyzmq )
36 wxwidgets? ( dev-python/wxpython )"
37 RDEPEND="${CDEPEND}
38 notebook? ( >=www-servers/tornado-2.1
39 dev-python/pygments
40 dev-python/pyzmq )
41 qt4? ( || ( dev-python/PyQt4 dev-python/pyside )
42 dev-python/pygments
43 dev-python/pyzmq )"
44 DEPEND="${CDEPEND}
45 test? ( dev-python/nose )"
46
47 src_prepare() {
48 distutils_src_prepare
49 epatch "${FILESDIR}"/${PN}-0.12-globalpath.patch
50 epatch "${FILESDIR}"/${PN}-0.13-umlaut.patch
51
52 # fix for gentoo python scripts
53 sed -i \
54 -e "/ipython_cmd/s/ipython3/ipython/g" \
55 IPython/frontend/terminal/console/tests/test_console.py \
56 IPython/lib/irunner.py \
57 IPython/testing/tools.py || die
58
59 sed -i \
60 -e "s/find_scripts(True, suffix='3')/find_scripts(True)/" \
61 setup.py || die
62
63 # disable failing tests
64 sed -i \
65 -e 's/test_pylab_import_all_disabled/_&/' \
66 -e 's/test_pylab_import_all_enabled/_&/' \
67 IPython/lib/tests/test_irunner_pylab_magic.py || die
68
69 # fix gentoo installation directory for documentation
70 sed -i \
71 -e "/docdirbase = pjoin/s/ipython/${PF}/" \
72 -e "/pjoin(docdirbase,'manual')/s/manual/html/" \
73 setupbase.py || die "sed failed"
74
75 if ! use doc; then
76 sed -i \
77 -e "/(pjoin(docdirbase, 'extensions'), igridhelpfiles),/d" \
78 -e 's/ + manual_files//' \
79 setupbase.py || die
80 fi
81
82 if ! use examples; then
83 sed -i \
84 -e 's/+ example_files//' \
85 setupbase.py || die
86 fi
87 }
88
89 src_compile() {
90 distutils_src_compile
91 use emacs && elisp-compile docs/emacs/ipython.el
92 }
93
94 src_test() {
95 # https://github.com/ipython/ipython/issues/2083
96 unset PYTHONWARNINGS
97
98 if use mongodb; then
99 mkdir -p "${T}/mongo.db"
100 mongod --dbpath "${T}/mongo.db" --fork --logpath "${T}/mongo.log"
101 fi
102
103 testing() {
104 "$(PYTHON)" setup.py \
105 build -b "build-${PYTHON_ABI}" \
106 install --root="${T}/tests-${PYTHON_ABI}" > /dev/null || die
107 # Initialize ~/.ipython directory.
108 PATH="${T}/tests-${PYTHON_ABI}${EPREFIX}/usr/bin:${PATH}" \
109 PYTHONPATH="${T}/tests-${PYTHON_ABI}${EPREFIX}$(python_get_sitedir)" \
110 ipython <<< "" > /dev/null || return 1
111 # Run tests (-v for more verbosity).
112 PATH="${T}/tests-${PYTHON_ABI}${EPREFIX}/usr/bin:${PATH}" \
113 PYTHONPATH="${T}/tests-${PYTHON_ABI}${EPREFIX}$(python_get_sitedir)" \
114 iptest -v || return 1
115 }
116 VIRTUALX_COMMAND="python_execute_function" virtualmake testing
117
118 use mongodb && killall -u "$(id -nu)" mongod
119 }
120
121 src_install() {
122 distutils_src_install
123 if use emacs; then
124 pushd docs/emacs > /dev/null
125 elisp-install ${PN} ${PN}.el*
126 elisp-site-file-install "${FILESDIR}"/62ipython-gentoo.el
127 popd > /dev/null
128 fi
129 }
130
131 pkg_postinst() {
132 distutils_pkg_postinst
133 use emacs && elisp-site-regen
134 }
135
136 pkg_postrm() {
137 distutils_pkg_postrm
138 use emacs && elisp-site-regen
139 }

  ViewVC Help
Powered by ViewVC 1.1.20