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
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')
-rw-r--r--sci-physics/qutip/Manifest1
-rw-r--r--sci-physics/qutip/metadata.xml22
-rw-r--r--sci-physics/qutip/qutip-4.2.0.ebuild50
3 files changed, 73 insertions, 0 deletions
diff --git a/sci-physics/qutip/Manifest b/sci-physics/qutip/Manifest
new file mode 100644
index 00000000000..e2753f5f426
--- /dev/null
+++ b/sci-physics/qutip/Manifest
@@ -0,0 +1 @@
+DIST qutip-4.2.0.tar.gz 424805 SHA256 3c7fed0e9b04c0f69dab1555babed1b847d388c0cef9f26fbdc2f4db611d61e7 SHA512 888e569b30a1085162ecfa768967526f5ce34b19e1a1b0f76f1331eb3978159ba321e126a1bc57e0936c5819218f07a336a57c80193b33af1009d1cd87fa95de WHIRLPOOL 8c735c618bb21d51009bf5373d3e1e8d89d3186edcbea1be729daf13bf1fcc7d151bfad176ddf960f7563e1e0fa7e35f095f2c8e9e8c3839ac94ceb408f80e88
diff --git a/sci-physics/qutip/metadata.xml b/sci-physics/qutip/metadata.xml
new file mode 100644
index 00000000000..fb7fc53aee2
--- /dev/null
+++ b/sci-physics/qutip/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hendrik@consetetur.de</email>
+ <name>Hendrik v. Raven (lorem_ipsum)</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ QuTiP is open-source software for simulating the dynamics of open quantum systems. The QuTiP library depends on the excellent Numpy, Scipy, and Cython numerical packages. In addition, graphical output is provided by Matplotlib. QuTiP aims to provide user-friendly and efficient numerical simulations of a wide variety of Hamiltonians, including those with arbitrary time-dependence, commonly found in a wide range of physics applications such as quantum optics, trapped ions, superconducting circuits, and quantum nanomechanical resonators.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">qutip/qutip</remote-id>
+ </upstream>
+</pkgmetadata>
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 00000000000..e5514134e27
--- /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
+}