summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik v. Raven <hendrik@consetetur.de>2017-07-12 13:57:40 +0200
committerDavid Seifert <soap@gentoo.org>2017-07-30 16:41:40 +0200
commit4727e6ac4b06ea977eb4916cef847559aee30d40 (patch)
treef9bdd09f921469443da69ed35106b40f71cd73fa /sci-physics/qutip/qutip-4.2.0.ebuild
parentdev-libs/sway: updated live ebuild (diff)
downloadgentoo-4727e6ac4b06ea977eb4916cef847559aee30d40.tar.gz
gentoo-4727e6ac4b06ea977eb4916cef847559aee30d40.tar.bz2
gentoo-4727e6ac4b06ea977eb4916cef847559aee30d40.zip
sci-physics/qutip: new ebuild
Package-Manager: Portage-2.3.6, Repoman-2.3.3 Closes: https://github.com/gentoo/gentoo/pull/5095
Diffstat (limited to 'sci-physics/qutip/qutip-4.2.0.ebuild')
-rw-r--r--sci-physics/qutip/qutip-4.2.0.ebuild50
1 files changed, 50 insertions, 0 deletions
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
+}