rpy2-2.8.3 was released 2016-09-04[0], latest version in gentoo is rpy-2.7.8. Our current versions of rpy (<2.8.2) have some incompatibility with dev-python/ipython-5 and later.[1] This can be seen in test failures like: ====================================================================== ERROR: setUpClass (ipython.tests.test_rmagic.TestRmagic) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/dev-python/rpy-2.7.8/work/rpy2-2.7.8-python2_7/lib/rpy2/ipython/tests/test_rmagic.py", line 42, in setUpClass cls.ip.magic('load_ext rpy2.ipython') File "/usr/lib64/python2.7/site-packages/IPython/core/interactiveshell.py", line 2158, in magic return self.run_line_magic(magic_name, magic_arg_s) File "/usr/lib64/python2.7/site-packages/IPython/core/interactiveshell.py", line 2079, in run_line_magic result = fn(*args,**kwargs) File "<decorator-gen-62>", line 2, in load_ext File "/usr/lib64/python2.7/site-packages/IPython/core/magic.py", line 188, in <lambda> call = lambda f, *a, **k: f(*a, **k) File "/usr/lib64/python2.7/site-packages/IPython/core/magics/extension.py", line 37, in load_ext res = self.shell.extension_manager.load_extension(module_str) File "/usr/lib64/python2.7/site-packages/IPython/core/extensions.py", line 85, in load_extension if self._call_load_ipython_extension(mod): File "/usr/lib64/python2.7/site-packages/IPython/core/extensions.py", line 132, in _call_load_ipython_extension mod.load_ipython_extension(self.shell) File "rpy2/ipython/rmagic.py", line 788, in load_ipython_extension if ip.has_readline: AttributeError: 'TerminalInteractiveShell' object has no attribute 'has_readline' 0: https://pypi.python.org/pypi/rpy2 1: https://bitbucket.org/rpy2/rpy2/issues/359
Created attachment 452450 [details, diff] 0001-dev-python-rpy-bump-to-2.8.3.patch eroen@occam ~/repos/gentoo $ diff -urN dev-python/rpy/rpy-2.7.8.ebuild dev-python/rpy/rpy-2.8.3.ebuild --- dev-python/rpy/rpy-2.7.8.ebuild 2016-11-05 00:05:42.510467326 +0100 +++ dev-python/rpy/rpy-2.8.3.ebuild 2016-11-05 19:02:22.767114822 +0100 @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python2_7 python3_{4,5} ) PYTHON_REQ_USE="sqlite" -inherit distutils-r1 flag-o-matic +inherit distutils-r1 flag-o-matic virtualx MYSLOT=2 MY_PN=${PN}${MYSLOT} @@ -23,13 +23,14 @@ IUSE="test" RDEPEND=" - >=dev-lang/R-3.1 + >=dev-lang/R-3.2 dev-python/numpy[${PYTHON_USEDEP}] >=dev-python/pandas-0.13.1[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}] virtual/python-singledispatch[${PYTHON_USEDEP}] " DEPEND="${RDEPEND} + test? ( >=dev-lang/R-3.2[X,png] ) dev-python/setuptools[${PYTHON_USEDEP}]" PDEPEND="dev-python/ipython[${PYTHON_USEDEP}]" @@ -39,6 +40,15 @@ # Tarball absent of doc files in doc folder # https://bitbucket.org/rpy2/rpy2/issues/229 +python_prepare() { + if ! python_is_python3; then + # https://bitbucket.org/rpy2/rpy2/pull-requests/56 + sed -e '1i# coding=utf-8' \ + -i rpy/rinterface/tests/test_SexpClosure.py \ + -i rpy/rinterface/tests/test_SexpEnvironment.py || die + fi +} + python_compile() { if ! python_is_python3; then local CFLAGS=${CFLAGS} @@ -49,5 +59,5 @@ python_test() { cd "${BUILD_DIR}"/lib || die - ${PYTHON} -m 'rpy2.tests' || die + virtx ${PYTHON} -m 'rpy2.tests' || die }
https://github.com/gentoo/gentoo/pull/4103
commit bc43c2ea574d7d6c43a221928fe5a4340373314e Author: Marius Brehler <marbre@linux.sungazer.de> AuthorDate: Fri Mar 3 12:28:50 2017 +0100 Commit: David Seifert <soap@gentoo.org> CommitDate: Sat Mar 4 16:18:02 2017 +0100 dev-python/rpy: Version bump to 2.8.5 Thanks to eroen <gentoo@eroen.eu> for the work. Gentoo-Bug: https://bugs.gentoo.org/598970 Package-Manager: Portage-2.3.3, Repoman-2.3.1 Closes: https://github.com/gentoo/gentoo/pull/4103