From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-physics/qutip/qutip-4.2.0.ebuild | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sci-physics/qutip/qutip-4.2.0.ebuild (limited to 'sci-physics/qutip/qutip-4.2.0.ebuild') diff --git a/sci-physics/qutip/qutip-4.2.0.ebuild b/sci-physics/qutip/qutip-4.2.0.ebuild new file mode 100644 index 000000000000..e5514134e279 --- /dev/null +++ b/sci-physics/qutip/qutip-4.2.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{5,6} ) + +inherit distutils-r1 toolchain-funcs + +DESCRIPTION="Simulating dynamics of open quantum systems in Python." +HOMEPAGE="http://qutip.org" +SRC_URI="https://github.com/qutip/qutip/archive/v$PV.tar.gz -> $P.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="openmp test" + +RDEPEND="dev-python/cython[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND} + test? ( dev-python/nose[${PYTHON_USEDEP}] ) +" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +python_prepare_all() { + sed -i setup.py \ + -e 's/_compiler_flags = .*$/_compiler_flags = []/' || die + + distutils-r1_python_prepare_all +} + +python_configure_all() { + use openmp && mydistutilsargs=( --with-openmp ) +} + +python_test() { + cd "${BUILD_DIR}"/lib* || die + ${EPYTHON} -c "import qutip.testing as qt ; qt.run()" || die +} -- cgit v1.2.3