Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygpu/
Date: Wed, 04 Jan 2017 06:02:57
Message-Id: 1483509724.eb516cecc8888df2a919bbdafc606d6fef3ef03b.bicatali@gentoo
1 commit: eb516cecc8888df2a919bbdafc606d6fef3ef03b
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 3 05:02:40 2017 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 4 06:02:04 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb516cec
7
8 dev-python/pygpu: initial import
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 dev-python/pygpu/Manifest | 1 +
13 dev-python/pygpu/metadata.xml | 19 +++++++++++++
14 dev-python/pygpu/pygpu-0.6.0_rc1.ebuild | 50 +++++++++++++++++++++++++++++++++
15 3 files changed, 70 insertions(+)
16
17 diff --git a/dev-python/pygpu/Manifest b/dev-python/pygpu/Manifest
18 new file mode 100644
19 index 00000000..f099125
20 --- /dev/null
21 +++ b/dev-python/pygpu/Manifest
22 @@ -0,0 +1 @@
23 +DIST pygpu-0.6.0_rc1.tar.gz 228152 SHA256 c49655af200920e539597f26f975388b02af2f3971567d7e713e1a4ccd0b2a58 SHA512 90b2d31ebe38c08610643b28262375ed093b6587d4fff0bff2b1bbe249de3ec1ff01893cce67401dfec2946095cf83545d5093e8e49d86cded332eb7063d5e2e WHIRLPOOL 44471721d6a75f6dbeac313fd6de9778db3f98bc48904f6333e18b7e24792d62c0def57d05d984908be5ea5241645fcab4d7c537d2dff1fad73e2883e42c8673
24
25 diff --git a/dev-python/pygpu/metadata.xml b/dev-python/pygpu/metadata.xml
26 new file mode 100644
27 index 00000000..e05423a
28 --- /dev/null
29 +++ b/dev-python/pygpu/metadata.xml
30 @@ -0,0 +1,19 @@
31 +<?xml version="1.0" encoding="UTF-8"?>
32 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
33 +<pkgmetadata>
34 + <maintainer type="project">
35 + <email>sci@g.o</email>
36 + <name>Gentoo Science Project</name>
37 + </maintainer>
38 + <longdescription>
39 + This package contains the Python bindings to libgpuarray which
40 + are build in the top of NumPy.
41 + </longdescription>
42 + <upstream>
43 + <remote-id type="github">Theano/libgpuarray</remote-id>
44 + </upstream>
45 + <use>
46 + <flag name="cuda">Enable NVIDIA CUDA toolkit support</flag>
47 + <flag name="opencl">Enable OpenCL support</flag>
48 + </use>
49 +</pkgmetadata>
50
51 diff --git a/dev-python/pygpu/pygpu-0.6.0_rc1.ebuild b/dev-python/pygpu/pygpu-0.6.0_rc1.ebuild
52 new file mode 100644
53 index 00000000..680b6d4
54 --- /dev/null
55 +++ b/dev-python/pygpu/pygpu-0.6.0_rc1.ebuild
56 @@ -0,0 +1,50 @@
57 +# Copyright 1999-2017 Gentoo Foundation
58 +# Distributed under the terms of the GNU General Public License v2
59 +# $Id$
60 +
61 +EAPI=6
62 +
63 +PYTHON_COMPAT=( python2_7 python3_{4,5} )
64 +
65 +inherit distutils-r1
66 +
67 +MYPV=${PV/_/-}
68 +
69 +DESCRIPTION="Python bindings to libgpuarray"
70 +HOMEPAGE="http://deeplearning.net/software/libgpuarray/"
71 +SRC_URI="https://github.com/Theano/libgpuarray/archive/v${MYPV}.tar.gz -> ${P}.tar.gz"
72 +
73 +LICENSE="BSD"
74 +SLOT="0"
75 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
76 +IUSE="cuda doc opencl test"
77 +
78 +RDEPEND="
79 + dev-python/mako[${PYTHON_USEDEP}]
80 + dev-python/numpy[${PYTHON_USEDEP}]
81 + dev-libs/libgpuarray:=[cuda?,opencl?]
82 +"
83 +DEPEND="${RDEPEND}
84 + dev-python/cython[${PYTHON_USEDEP}]
85 + dev-python/setuptools[${PYTHON_USEDEP}]
86 + doc? (
87 + dev-python/sphinx[${PYTHON_USEDEP}]
88 + dev-python/breathe[${PYTHON_USEDEP}]
89 + )
90 + test? ( dev-python/nose[${PYTHON_USEDEP}] )
91 +"
92 +
93 +S="${WORKDIR}/libgpuarray-${MYPV}"
94 +
95 +python_compile_all() {
96 + if use doc; then
97 + python_setup
98 + esetup.py build_sphinx
99 + fi
100 +}
101 +
102 +python_test() {
103 + local DEVICE=cuda
104 + use opencl && DEVICE=opencl
105 + nosetests -svw "${BUILD_DIR}/lib/" || die
106 +}