summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2017-01-03 05:02:40 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2017-01-04 06:02:04 +0000
commiteb516cecc8888df2a919bbdafc606d6fef3ef03b (patch)
treea34c2773bf75b840630db7f23e5c8467c71b4922
parentdev-python/sphinx-gallery: fix nose depedency (diff)
downloadgentoo-eb516cecc8888df2a919bbdafc606d6fef3ef03b.tar.gz
gentoo-eb516cecc8888df2a919bbdafc606d6fef3ef03b.tar.bz2
gentoo-eb516cecc8888df2a919bbdafc606d6fef3ef03b.zip
dev-python/pygpu: initial import
Package-Manager: Portage-2.3.3, Repoman-2.3.1
-rw-r--r--dev-python/pygpu/Manifest1
-rw-r--r--dev-python/pygpu/metadata.xml19
-rw-r--r--dev-python/pygpu/pygpu-0.6.0_rc1.ebuild50
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-python/pygpu/Manifest b/dev-python/pygpu/Manifest
new file mode 100644
index 000000000000..f0991252daa6
--- /dev/null
+++ b/dev-python/pygpu/Manifest
@@ -0,0 +1 @@
+DIST pygpu-0.6.0_rc1.tar.gz 228152 SHA256 c49655af200920e539597f26f975388b02af2f3971567d7e713e1a4ccd0b2a58 SHA512 90b2d31ebe38c08610643b28262375ed093b6587d4fff0bff2b1bbe249de3ec1ff01893cce67401dfec2946095cf83545d5093e8e49d86cded332eb7063d5e2e WHIRLPOOL 44471721d6a75f6dbeac313fd6de9778db3f98bc48904f6333e18b7e24792d62c0def57d05d984908be5ea5241645fcab4d7c537d2dff1fad73e2883e42c8673
diff --git a/dev-python/pygpu/metadata.xml b/dev-python/pygpu/metadata.xml
new file mode 100644
index 000000000000..e05423a24848
--- /dev/null
+++ b/dev-python/pygpu/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription>
+ This package contains the Python bindings to libgpuarray which
+ are build in the top of NumPy.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">Theano/libgpuarray</remote-id>
+ </upstream>
+ <use>
+ <flag name="cuda">Enable NVIDIA CUDA toolkit support</flag>
+ <flag name="opencl">Enable OpenCL support</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-python/pygpu/pygpu-0.6.0_rc1.ebuild b/dev-python/pygpu/pygpu-0.6.0_rc1.ebuild
new file mode 100644
index 000000000000..680b6d46f857
--- /dev/null
+++ b/dev-python/pygpu/pygpu-0.6.0_rc1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
+
+inherit distutils-r1
+
+MYPV=${PV/_/-}
+
+DESCRIPTION="Python bindings to libgpuarray"
+HOMEPAGE="http://deeplearning.net/software/libgpuarray/"
+SRC_URI="https://github.com/Theano/libgpuarray/archive/v${MYPV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cuda doc opencl test"
+
+RDEPEND="
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-libs/libgpuarray:=[cuda?,opencl?]
+"
+DEPEND="${RDEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? (
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/breathe[${PYTHON_USEDEP}]
+ )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
+"
+
+S="${WORKDIR}/libgpuarray-${MYPV}"
+
+python_compile_all() {
+ if use doc; then
+ python_setup
+ esetup.py build_sphinx
+ fi
+}
+
+python_test() {
+ local DEVICE=cuda
+ use opencl && DEVICE=opencl
+ nosetests -svw "${BUILD_DIR}/lib/" || die
+}