*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / pygpu / pygpu-0.6.7.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_6 )
7
8 inherit distutils-r1
9
10 MYPV=${PV/_/-}
11
12 DESCRIPTION="Python bindings to libgpuarray"
13 HOMEPAGE="http://deeplearning.net/software/libgpuarray/"
14 SRC_URI="https://github.com/Theano/libgpuarray/archive/v${MYPV}.tar.gz -> ${P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
19 IUSE="cuda opencl test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND="
23         dev-python/mako[${PYTHON_USEDEP}]
24         dev-python/numpy[${PYTHON_USEDEP}]
25         dev-libs/libgpuarray:=[cuda?,opencl?]
26 "
27 DEPEND="${RDEPEND}
28         dev-python/cython[${PYTHON_USEDEP}]
29         dev-python/setuptools[${PYTHON_USEDEP}]
30         test? ( dev-python/nose[${PYTHON_USEDEP}] )
31 "
32
33 S="${WORKDIR}/libgpuarray-${MYPV}"
34
35 python_test() {
36         local DEVICE=cuda
37         use opencl && DEVICE=opencl
38         nosetests -svw "${BUILD_DIR}/lib/" || die
39 }