*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / rpy / rpy-2.9.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7} )
6 PYTHON_REQ_USE="sqlite"
7
8 inherit distutils-r1 flag-o-matic virtualx
9
10 MYSLOT=2
11 MY_PN=${PN}${MYSLOT}
12 MY_P=${MY_PN}-${PV}
13
14 DESCRIPTION="Python interface to the R Programming Language"
15 HOMEPAGE="https://rpy.sourceforge.net/
16         https://pypi.org/project/rpy2/"
17 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
18
19 LICENSE="AGPL-3 GPL-2 LGPL-2.1 MPL-1.1"
20 SLOT="0"
21 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
22 IUSE="test"
23
24 # ggplot2 is a test dep but not in portage
25 RESTRICT="test"
26
27 RDEPEND="
28         >=dev-lang/R-3.2
29         dev-python/numpy[${PYTHON_USEDEP}]
30         >=dev-python/pandas-0.13.1[${PYTHON_USEDEP}]
31         dev-python/six[${PYTHON_USEDEP}]
32         virtual/python-singledispatch[${PYTHON_USEDEP}]
33 "
34 DEPEND="${RDEPEND}
35         test? ( >=dev-lang/R-3.2[X,png] )
36         dev-python/setuptools[${PYTHON_USEDEP}]"
37 PDEPEND="dev-python/ipython[${PYTHON_USEDEP}]"
38
39 S="${WORKDIR}/${MY_P}"
40
41 python_compile() {
42         if ! python_is_python3; then
43                 local CFLAGS=${CFLAGS}
44                 append-cflags -fno-strict-aliasing
45         fi
46         distutils-r1_python_compile
47 }
48
49 python_test() {
50         cd "${BUILD_DIR}"/lib || die
51         virtx "${EPYTHON}" -m 'rpy2.tests'
52 }