summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2014-05-29 15:42:10 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2014-05-29 15:42:10 +0000
commit75ca2c8569d46443f5fe5b65ce868670b1c7af80 (patch)
treec1a83f3a80a3de89ac970ffd6e31fade093e3948 /dev-python/oct2py
parentbump; add py3 pypy support, test phase (diff)
downloadgentoo-2-75ca2c8569d46443f5fe5b65ce868670b1c7af80.tar.gz
gentoo-2-75ca2c8569d46443f5fe5b65ce868670b1c7af80.tar.bz2
gentoo-2-75ca2c8569d46443f5fe5b65ce868670b1c7af80.zip
Imported fix for bug #511044 to main tree
(Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'dev-python/oct2py')
-rw-r--r--dev-python/oct2py/ChangeLog14
-rw-r--r--dev-python/oct2py/files/oct2py-1.3.0-test.patch21
-rw-r--r--dev-python/oct2py/oct2py-1.3.0-r1.ebuild (renamed from dev-python/oct2py/oct2py-1.0.0.ebuild)28
3 files changed, 55 insertions, 8 deletions
diff --git a/dev-python/oct2py/ChangeLog b/dev-python/oct2py/ChangeLog
index 99f90c27373d..01ab263eefe1 100644
--- a/dev-python/oct2py/ChangeLog
+++ b/dev-python/oct2py/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for dev-python/oct2py
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/oct2py/ChangeLog,v 1.15 2014/02/25 17:24:45 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/oct2py/ChangeLog,v 1.16 2014/05/29 15:42:10 bicatali Exp $
+
+*oct2py-1.3.0-r1 (29 May 2014)
+
+ 29 May 2014; Sébastien Fabbro <bicatali@gentoo.org> -oct2py-1.0.0.ebuild,
+ +oct2py-1.3.0-r1.ebuild, +files/oct2py-1.3.0-test.patch:
+ Imported to main tree
+
+*oct2py-1.3.0-r1 (28 May 2014)
+
+ 28 May 2014; cel <cel.gentoo@gmail.com> +files/oct2py-1.3.0-test.patch,
+ +metadata.xml, +oct2py-1.3.0-r1.ebuild:
+ updated oct2py ebuild to provide a working test suite.
25 Feb 2014; Sébastien Fabbro <bicatali@gentoo.org> oct2py-1.3.0.ebuild:
Fixed documentation building, bug #502310
diff --git a/dev-python/oct2py/files/oct2py-1.3.0-test.patch b/dev-python/oct2py/files/oct2py-1.3.0-test.patch
new file mode 100644
index 000000000000..9bc22e091918
--- /dev/null
+++ b/dev-python/oct2py/files/oct2py-1.3.0-test.patch
@@ -0,0 +1,21 @@
+diff --git a/oct2py/ipython/tests/test_octavemagic.py b/oct2py/ipython/tests/test_octavemagic.py
+index b75d992..43c0a8b 100644
+--- a/oct2py/ipython/tests/test_octavemagic.py
++++ b/oct2py/ipython/tests/test_octavemagic.py
+@@ -1,5 +1,6 @@
+ """Tests for Octave magics extension."""
+
++import codecs
+ import unittest
+ import sys
+ from IPython.testing.globalipapp import get_ipython
+@@ -22,7 +23,8 @@ class OctaveMagicTest(unittest.TestCase):
+ IPython team's logic.
+ '''
+ if not sys.stdin.encoding:
+- sys.stdin.encoding = 'utf-8' # needed for py.test
++ # needed for py.test
++ sys.stdin = codecs.getreader('utf-8')(sys.stdin)
+ cls.ip = get_ipython()
+ # This is just to get a minimally modified version of the changes
+ # working
diff --git a/dev-python/oct2py/oct2py-1.0.0.ebuild b/dev-python/oct2py/oct2py-1.3.0-r1.ebuild
index dd54af67fc42..30da90cc21dd 100644
--- a/dev-python/oct2py/oct2py-1.0.0.ebuild
+++ b/dev-python/oct2py/oct2py-1.3.0-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/oct2py/oct2py-1.0.0.ebuild,v 1.1 2013/10/20 18:24:00 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/oct2py/oct2py-1.3.0-r1.ebuild,v 1.1 2014/05/29 15:42:10 bicatali Exp $
EAPI=5
@@ -21,20 +21,34 @@ RDEPEND="
sci-libs/scipy[${PYTHON_USEDEP}]
sci-mathematics/octave"
DEPEND="${RDEPEND}
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ doc? (
+ dev-python/sphinx-bootstrap-theme
+ dev-python/numpydoc
+ )
test? (
dev-python/nose[${PYTHON_USEDEP}]
dev-python/ipython[${PYTHON_USEDEP}]
- )"
+ )"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}/${P}-test.patch"
+ )
+ distutils-r1_python_prepare_all
+}
python_compile_all() {
if use doc; then
- sphinx-build doc html || die
+ sphinx-build docs html || die
fi
}
python_test() {
- nosetests oct2py --with-doctest || die "Tests fail with ${EPYTHON}"
+ unset DISPLAY
+ if [[ ${EPYTHON} == python2* ]]; then
+ local OPTIONS="--with-doctest"
+ fi
+ nosetests oct2py ${OPTIONS} || die "Tests fail with ${EPYTHON}"
iptest -v IPython.extensions.tests.test_octavemagic || die "Tests fail with ${EPYTHON}"
}
@@ -43,7 +57,7 @@ python_install_all() {
distutils-r1_python_install_all
if use examples; then
- insinto /usr/share/${PF}/
+ insinto /usr/share/doc/${PF}
doins -r example
fi
}