You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
55 lines
1.4 KiB
4 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
4 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
|
||
4 years ago
|
PYTHON_COMPAT=( python3_{7..9} )
|
||
4 years ago
|
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||
|
|
||
4 years ago
|
inherit distutils-r1 optfeature
|
||
4 years ago
|
|
||
|
MY_P=${P^}
|
||
|
|
||
|
DESCRIPTION="Define and optimize multi-dimensional arrays mathematical expressions"
|
||
|
HOMEPAGE="https://github.com/Theano/Theano"
|
||
|
SRC_URI="mirror://pypi/${MY_P::1}/${MY_P%-*}/${MY_P}.tar.gz"
|
||
|
S="${WORKDIR}/${MY_P}"
|
||
|
|
||
|
LICENSE="BSD"
|
||
|
SLOT="0"
|
||
4 years ago
|
KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux"
|
||
4 years ago
|
# Tests sometimes hang. dev-python/theano-pymc is better. #738416
|
||
|
# This package is on the way out anyway for that fork.
|
||
|
RESTRICT="test"
|
||
4 years ago
|
|
||
|
BDEPEND="test? ( dev-python/parameterized[${PYTHON_USEDEP}] )"
|
||
|
RDEPEND="
|
||
|
dev-python/numpy[${PYTHON_USEDEP}]
|
||
|
dev-python/six[${PYTHON_USEDEP}]
|
||
4 years ago
|
dev-python/scipy[${PYTHON_USEDEP}]
|
||
4 years ago
|
"
|
||
|
|
||
|
distutils_enable_tests nose
|
||
|
|
||
|
src_prepare() {
|
||
|
sed -i -e "s/, 'flake8'//" setup.py || die
|
||
|
|
||
|
distutils-r1_src_prepare
|
||
|
}
|
||
|
|
||
|
python_test() {
|
||
|
distutils_install_for_testing
|
||
|
nosetests --verbosity=3 -e test_format_flake8 || die
|
||
|
}
|
||
|
|
||
4 years ago
|
# https://dev.gentoo.org/~mgorny/python-guide/concept.html#packaging-pkgutil-style-namespaces-in-gentoo
|
||
|
python_install() {
|
||
|
rm "${BUILD_DIR}"/lib/bin/__init__.py || die
|
||
|
distutils-r1_python_install
|
||
|
}
|
||
|
|
||
4 years ago
|
pkg_postinst() {
|
||
|
optfeature "Make picture of Theano computation graph" dev-python/pydot-ng
|
||
|
optfeature "Required for GPU/CPU code generation" dev-python/pygpu
|
||
|
}
|