1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_6 )
8 inherit distutils-r1 toolchain-funcs
10 DESCRIPTION="Simulating dynamics of open quantum systems in Python."
11 HOMEPAGE="http://qutip.org"
12 SRC_URI="https://github.com/qutip/qutip/archive/v$PV.tar.gz -> $P.tar.gz"
16 KEYWORDS="~amd64 ~x86"
18 RESTRICT="!test? ( test )"
20 RDEPEND="dev-python/cython[${PYTHON_USEDEP}]
21 dev-python/numpy[${PYTHON_USEDEP}]
22 dev-python/matplotlib[${PYTHON_USEDEP}]
23 sci-libs/scipy[${PYTHON_USEDEP}]
26 test? ( dev-python/nose[${PYTHON_USEDEP}] )
30 [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
34 [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
37 python_prepare_all() {
39 -e 's/_compiler_flags = .*$/_compiler_flags = []/' || die
41 distutils-r1_python_prepare_all
44 python_configure_all() {
45 use openmp && mydistutilsargs=( --with-openmp )
49 cd "${BUILD_DIR}"/lib* || die
50 ${EPYTHON} -c "import qutip.testing as qt ; qt.run()" || die