summaryrefslogtreecommitdiff
path: root/dev-python/pycuda
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/pycuda
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/pycuda')
-rw-r--r--dev-python/pycuda/Manifest14
-rw-r--r--dev-python/pycuda/metadata.xml11
-rw-r--r--dev-python/pycuda/pycuda-2012.1.ebuild87
-rw-r--r--dev-python/pycuda/pycuda-2013.1.1.ebuild87
-rw-r--r--dev-python/pycuda/pycuda-2014.1.ebuild87
-rw-r--r--dev-python/pycuda/pycuda-2016.1.2.ebuild84
-rw-r--r--dev-python/pycuda/pycuda-2017.1.ebuild82
-rw-r--r--dev-python/pycuda/pycuda-9999.ebuild88
8 files changed, 540 insertions, 0 deletions
diff --git a/dev-python/pycuda/Manifest b/dev-python/pycuda/Manifest
new file mode 100644
index 000000000000..6d12a7f87052
--- /dev/null
+++ b/dev-python/pycuda/Manifest
@@ -0,0 +1,14 @@
+DIST pycuda-2012.1.tar.gz 1473695 SHA256 d5b90467b926c73ceaf2dd2662fef2e21e106f00a0aa0d11f09a891aac3925dc SHA512 bb8889fa46de3d4ae57fb47883232953eba0e12a53431fffdefb12af3134540aec2671f0f2fbbe1d836dab354d407e078e773e84f8ee9a5345400a4a59da7937 WHIRLPOOL b35484ddc8d2c1808a0d706dcdcc9ebe49af153b0aaaf8fc2596f4068c5c2dbdb9fb4f84ac46512b314ef9383f70dfcefa4895191d7a9f6d78eee8ae8a56fe71
+DIST pycuda-2013.1.1.tar.gz 1586425 SHA256 4b541ff7ab4a867e9389b3b9b9456c6957000f39a20a46e872dd25dd3bece2da SHA512 7a7e95fcd4f76d10234558021064cc299e6d93ab9a428c9560e5a8a73b13304ba9ccc3c103674a25effdc01a14aac21981a62de881a9c990ad16d7689b75e502 WHIRLPOOL c1e958defbe4998c0af5a256df51daa3901f0bf2a45e5c5faed9abf5ba60ebd0dddab6fbb4caff41eac588fe7fc3cca1517c032d95d316492f99c307b6a260f3
+DIST pycuda-2014.1.tar.gz 1588986 SHA256 28e8f7425d0bac03a6c80346a4e150024ef0e4740ce11cb54e6aef351127d7af SHA512 57e333941c472feea6974e583f9d27f7f5083011bd8a7cc0bc31d27032885a130f1f57a16b0730696c607b9dca32ad84b96c984cd82351800ec854acdfa8fe9f WHIRLPOOL c71876c6f203a0a8a996a90976ad3f012ce1497ee84534c7fb8876e19293766d4641fbac00a538b1ddb074b29f8d8347f39caae613839b38cf5ee9eb15a86c09
+DIST pycuda-2016.1.2.tar.gz 1603373 SHA256 a7dbdac7e2f0c0d2ad98f5f281d5a9d29d6673b3c20210e261b96e9a2d0b6e37 SHA512 7a1a9d6723651bdc6f584de884c46bbaa17970e622b4d800c7f36ff57817807a51c7e4aa0a40872e46fc1243087af6dda07489bb60b6a33f52740a4d7a9e69a7 WHIRLPOOL f1c169d0bac25f625aa6609bf06fdc7fadce00fd291d27113b9ae92995801cfc2361cfb254bec836c2547ff4b96498c945f73a0ed76032b382e13f315222e711
+DIST pycuda-2017.1.tar.gz 1608187 SHA256 a92725ccd8515b4d7284b9127184b6fdb61f224daa086e7fc6b926e2094b055f SHA512 ce3de28de613352bec4efb86ffaa055f92ccd0c758b903aecc60af5b84f0f0643d04a869d6a23ce329c3d33670cfb266ad69c784ba917a190a11bdfea1fe6690 WHIRLPOOL 47ca3e88007315f67b7147cf534f0c91e979f4c5fdcad28742a51f2062390509fcfeac8696a049557c2a37b659430ad3d148a607b5e0c8da6fc4a71f4bc54fa7
+EBUILD pycuda-2012.1.ebuild 2370 SHA256 1af521a8535bb1c7b9f54fce9afe8955109706351a8991778dc24776f5673b80 SHA512 84ae216bd2b480a195ecaca68cc028a0cd3424af2dcdb37f3462f5c8922aa4e4fc8dca5d7f9afd7deb7f0b66654634a46bea82988847b9e5dda9d6bca933c4bd WHIRLPOOL 615113c425233503bd83242821695213407000db9f4f992b36b8969c85b180b92ebff17d1bba14aa663f8dd2612975bc1c69d34c178dcce71937bf97953ee813
+EBUILD pycuda-2013.1.1.ebuild 2368 SHA256 9f57459cde8b4c607ea2848aa59fffee36e2aeef10f263356ccf5591757d1da2 SHA512 c9914f7be3cca3b5fca2ce9ed466589788d36a08564b2d8f515c80f5641e6cb350af5876a3eb44c2158a8160d50aa12b2620ffb28b415e12b322f7a2d501f75b WHIRLPOOL b394318b00b05a65338ff69aea13cbad09ad1a065c829cbe945475d927a71d22869da53f95dc82f1a1d63ab99afb51e79109de08b40fceb3bff5d1bf3db11d7e
+EBUILD pycuda-2014.1.ebuild 2405 SHA256 2f0ad6c429c6b6cdbb4a57df1a650d2fa6e5823dbc1cb84d9afaaa3db230e847 SHA512 f95dd9915f24ec38d377193be259dbc9d45e5cabf5f924a52a1a8c49a4f7e789bb36bb1023031aae0f4656efc139055fd111e5570457b1a964a5b6e7515bbfeb WHIRLPOOL e009b167ecb26d7e4abbddd6c4f311d2ac62ebd46a8dded4d2654d9a2463995eb988204a65645bf5279d17260d7d62180627094ef5b3e6c4d53bc7e0821be23b
+EBUILD pycuda-2016.1.2.ebuild 2319 SHA256 b1a88de35045729a432931c0bec7ede71e1ce7f7ca1356df33ecd555fc12df62 SHA512 23eb78e93a2a5ec02958254b82b41f2d2df743b9253b372db8ed53c75268e9cfd61bfe4a8564378a293056859d8c1f5d1a70adc3e00077a14ce148df2f2f4dd9 WHIRLPOOL 3e92d208c135e46b7c5be7ded26ff83fb875c9698c0d629cadcefc4495047cfe856705cb2b90bd572242713d43b89fdbfa7d8abea3ebc79892761758d964fd3d
+EBUILD pycuda-2017.1.ebuild 2293 SHA256 a3158202d6ee5f6aca03ab4370545c8c0929f6fea8fd13bd6fdc2b7b64c37e1c SHA512 c57dffa5f495c447ed2a0edbeb4c0327c1455c3b810b573a3c40b043732fac38e6ba182b8ec968f6ad8f863d05de25683b0ed302196d3b52b2b7c9942084e288 WHIRLPOOL e32a609670cb206b022b57ab1ce192adc759f241cc4329252d27bbb66cdd6c8daeedff57f7f2478afd2b90891e2806a19822659b36bc3ca6b32901ba81a87883
+EBUILD pycuda-9999.ebuild 2391 SHA256 98216616521fabac858aca0b4c18a831bf25a33ad56a717e65189a219ee375b4 SHA512 8ceb1e5ba6517cff9cfb2f37ad7190ce5bca76d78d18888b4baedcf3c74d1f3feb25524d391ef1422fb40063608f14e0e7aa83f6da688fa9c6fec62b142348d1 WHIRLPOOL 8fc0c03a119ebdeac929939f5c719c0c23d1707aabc4e9b1645105d7c886a88a2d524b1119f3a00711ceff9ef8220bebb1ad2d62f5cb44acf1fa1dae5f98b571
+MISC ChangeLog 3887 SHA256 ed50898c81f84a561a0d3c99fcd02ddf7fb0e914100eeda49925d3952654e2ec SHA512 f3f471bfd4ca738300f57f645958818d8929d60e63c8bde9b0adce311fde0c1c7c83b1fb7c873e4e8496b29394e756fa751de9f10358c48ab5a899c6e877e664 WHIRLPOOL 4f9fc6c14f1e52bb1d774252d6d68f0441cbcdb2f63c117054535e91279a244d7f49304ecd02034d507ede1b4f82eb34d4d72d9d9e93723a83d3f7417f776e7c
+MISC ChangeLog-2015 4156 SHA256 d1a6e98bc7f7aa17cbe309386701e52619aa2d5e69f895efbc59c78f6eecba2a SHA512 1e3810930fe76a23b43f5b020b2ed13f06b211bb4bfb805c151857d98e386158e60a01d04349af71fde83efdd772023a3160eaf7e0e3e1543ffce7053323f652 WHIRLPOOL a92f0d704cab346b0e8a4f89dee2e5ad94b04ddaaeb27da8b1e952b1eb208074828b420c14d92dbb2e031268e1b6ce4c0b606d9093515004f3668b25d7266c85
+MISC metadata.xml 332 SHA256 e10c83dd1808f1b643903dd2020de71d2d1511d04193c848a376ccace12637c9 SHA512 2a2ba5f70d55593801948a9143fce5ddb2922da30fc7c1ea3ec21ccbb391a09fc34be961e9dbccb53d6575aa347878d105526d85bb7cc3f2f561f1793f0eee5c WHIRLPOOL 59b5ad53d35814fb7bde6f798de3eb6a576a71b0544533d79a63b71f5f4bacdb0d1a2e022350ab8dc83982a0b1c48d74c98205a0445c7405d1fe018a9e4e254e
diff --git a/dev-python/pycuda/metadata.xml b/dev-python/pycuda/metadata.xml
new file mode 100644
index 000000000000..392ea93829c7
--- /dev/null
+++ b/dev-python/pycuda/metadata.xml
@@ -0,0 +1,11 @@
+<?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>
+ <upstream>
+ <remote-id type="pypi">pycuda</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pycuda/pycuda-2012.1.ebuild b/dev-python/pycuda/pycuda-2012.1.ebuild
new file mode 100644
index 000000000000..8c8e48ffd028
--- /dev/null
+++ b/dev-python/pycuda/pycuda-2012.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cuda distutils-r1 multilib
+
+DESCRIPTION="Python wrapper for NVIDIA CUDA"
+HOMEPAGE="http://mathema.tician.de/software/pycuda/ https://pypi.python.org/pypi/pycuda"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples opengl test"
+
+RDEPEND="
+ dev-libs/boost[python,${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pytools-2011.2[${PYTHON_USEDEP}]
+ dev-util/nvidia-cuda-toolkit
+ x11-drivers/nvidia-drivers
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}] )"
+
+# We need write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+python_prepare_all() {
+ cuda_sanitize
+ sed \
+ -e "s:'--preprocess':\'--preprocess\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:\"--cubin\":\'--cubin\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:/usr/include/pycuda:${S}/src/cuda:g" \
+ -i pycuda/compiler.py || die
+
+ touch siteconf.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+ local myopts=()
+ use opengl && myopts+=( --cuda-enable-gl )
+
+ mkdir "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+ [[ -e ./siteconf.py ]] && rm -f ./siteconf.py
+ "${EPYTHON}" "${S}"/configure.py \
+ --boost-inc-dir="${EPREFIX}/usr/include" \
+ --boost-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --boost-python-libname=boost_python-$(echo ${EPYTHON} | sed 's/python//')-mt \
+ --boost-thread-libname=boost_thread-mt \
+ --cuda-root="${EPREFIX}/opt/cuda" \
+ --cudadrv-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --cudart-lib-dir="${EPREFIX}/opt/cuda/$(get_libdir)" \
+ --cuda-inc-dir="${EPREFIX}/opt/cuda/include" \
+ --no-use-shipped-boost \
+ "${myopts[@]}"
+}
+
+src_test() {
+ # we need write access to this to run the tests
+ addwrite /dev/nvidia0
+ addwrite /dev/nvidiactl
+ python_test() {
+ py.test --debug -v -v -v || die "Tests fail with ${EPYTHON}"
+ }
+ distutils-r1_src_test
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-python/pycuda/pycuda-2013.1.1.ebuild b/dev-python/pycuda/pycuda-2013.1.1.ebuild
new file mode 100644
index 000000000000..38d353c8f62b
--- /dev/null
+++ b/dev-python/pycuda/pycuda-2013.1.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cuda distutils-r1 multilib
+
+DESCRIPTION="Python wrapper for NVIDIA CUDA"
+HOMEPAGE="http://mathema.tician.de/software/pycuda/ https://pypi.python.org/pypi/pycuda"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples opengl test"
+
+RDEPEND="
+ dev-libs/boost[python,${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pytools-2013[${PYTHON_USEDEP}]
+ dev-util/nvidia-cuda-toolkit
+ x11-drivers/nvidia-drivers
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}] )"
+
+# We need write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+python_prepare_all() {
+ cuda_sanitize
+ sed \
+ -e "s:'--preprocess':\'--preprocess\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:\"--cubin\":\'--cubin\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:/usr/include/pycuda:${S}/src/cuda:g" \
+ -i pycuda/compiler.py || die
+
+ touch siteconf.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+ local myopts=()
+ use opengl && myopts+=( --cuda-enable-gl )
+
+ mkdir "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+ [[ -e ./siteconf.py ]] && rm -f ./siteconf.py
+ "${EPYTHON}" "${S}"/configure.py \
+ --boost-inc-dir="${EPREFIX}/usr/include" \
+ --boost-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --boost-python-libname=boost_python-$(echo ${EPYTHON} | sed 's/python//')-mt \
+ --boost-thread-libname=boost_thread-mt \
+ --cuda-root="${EPREFIX}/opt/cuda" \
+ --cudadrv-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --cudart-lib-dir="${EPREFIX}/opt/cuda/$(get_libdir)" \
+ --cuda-inc-dir="${EPREFIX}/opt/cuda/include" \
+ --no-use-shipped-boost \
+ "${myopts[@]}"
+}
+
+src_test() {
+ # we need write access to this to run the tests
+ addwrite /dev/nvidia0
+ addwrite /dev/nvidiactl
+ python_test() {
+ py.test --debug -v -v -v || die "Tests fail with ${EPYTHON}"
+ }
+ distutils-r1_src_test
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-python/pycuda/pycuda-2014.1.ebuild b/dev-python/pycuda/pycuda-2014.1.ebuild
new file mode 100644
index 000000000000..4da48c34850d
--- /dev/null
+++ b/dev-python/pycuda/pycuda-2014.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_4 )
+
+inherit cuda distutils-r1 multilib
+
+DESCRIPTION="Python wrapper for NVIDIA CUDA"
+HOMEPAGE="http://mathema.tician.de/software/pycuda/ https://pypi.python.org/pypi/pycuda"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples opengl test"
+
+RDEPEND="
+ dev-libs/boost[python,${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pytools-2013[${PYTHON_USEDEP}]
+ dev-util/nvidia-cuda-toolkit
+ x11-drivers/nvidia-drivers
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}] )"
+
+# We need write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+python_prepare_all() {
+ cuda_sanitize
+ sed \
+ -e "s:'--preprocess':\'--preprocess\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:\"--cubin\":\'--cubin\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:/usr/include/pycuda:${S}/src/cuda:g" \
+ -i pycuda/compiler.py || die
+
+ touch siteconf.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+ local myopts=()
+ use opengl && myopts+=( --cuda-enable-gl )
+
+ [[ -d "${BUILD_DIR}" ]] || mkdir "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+ [[ -e ./siteconf.py ]] && rm -f ./siteconf.py
+ "${EPYTHON}" "${S}"/configure.py \
+ --boost-inc-dir="${EPREFIX}/usr/include" \
+ --boost-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --boost-python-libname=boost_python-$(echo ${EPYTHON} | sed 's/python//')-mt \
+ --boost-thread-libname=boost_thread-mt \
+ --cuda-root="${EPREFIX}/opt/cuda" \
+ --cudadrv-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --cudart-lib-dir="${EPREFIX}/opt/cuda/$(get_libdir)" \
+ --cuda-inc-dir="${EPREFIX}/opt/cuda/include" \
+ --no-use-shipped-boost \
+ "${myopts[@]}"
+}
+
+src_test() {
+ # we need write access to this to run the tests
+ addwrite /dev/nvidia0
+ addwrite /dev/nvidiactl
+ python_test() {
+ py.test --debug -v -v -v || die "Tests fail with ${EPYTHON}"
+ }
+ distutils-r1_src_test
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-python/pycuda/pycuda-2016.1.2.ebuild b/dev-python/pycuda/pycuda-2016.1.2.ebuild
new file mode 100644
index 000000000000..8118670d6633
--- /dev/null
+++ b/dev-python/pycuda/pycuda-2016.1.2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
+
+inherit cuda distutils-r1
+
+DESCRIPTION="Python wrapper for NVIDIA CUDA"
+HOMEPAGE="http://mathema.tician.de/software/pycuda/ https://pypi.python.org/pypi/pycuda"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples opengl test"
+
+RDEPEND="
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pytools-2013[${PYTHON_USEDEP}]
+ dev-util/nvidia-cuda-toolkit
+ x11-drivers/nvidia-drivers
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}] )"
+
+# We need write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+python_prepare_all() {
+ cuda_sanitize
+ sed \
+ -e "s:'--preprocess':\'--preprocess\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:\"--cubin\":\'--cubin\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:/usr/include/pycuda:${S}/src/cuda:g" \
+ -i pycuda/compiler.py || die
+
+ touch siteconf.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+ rm -f ./siteconf.py || die
+ "${EPYTHON}" "${S}"/configure.py \
+ --boost-inc-dir="${EPREFIX}/usr/include" \
+ --boost-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --boost-python-libname=boost_python-$(echo ${EPYTHON} | sed 's/python//')-mt \
+ --boost-thread-libname=boost_thread-mt \
+ --cuda-root="${EPREFIX}/opt/cuda" \
+ --cudadrv-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --cudart-lib-dir="${EPREFIX}/opt/cuda/$(get_libdir)" \
+ --cuda-inc-dir="${EPREFIX}/opt/cuda/include" \
+ --no-use-shipped-boost \
+ $(usex opengl --cuda-enable-gl "") || die
+}
+
+src_test() {
+ # we need write access to this to run the tests
+ addwrite /dev/nvidia0
+ addwrite /dev/nvidiactl
+ python_test() {
+ py.test --debug -v -v -v || die "Tests fail with ${EPYTHON}"
+ }
+ distutils-r1_src_test
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-python/pycuda/pycuda-2017.1.ebuild b/dev-python/pycuda/pycuda-2017.1.ebuild
new file mode 100644
index 000000000000..8e1816be7cb8
--- /dev/null
+++ b/dev-python/pycuda/pycuda-2017.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit cuda distutils-r1
+
+DESCRIPTION="Python wrapper for NVIDIA CUDA"
+HOMEPAGE="http://mathema.tician.de/software/pycuda"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples opengl test"
+
+RDEPEND="
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pytools-2013[${PYTHON_USEDEP}]
+ dev-util/nvidia-cuda-toolkit
+ x11-drivers/nvidia-drivers
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}] )"
+
+# We need write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+python_prepare_all() {
+ cuda_sanitize
+ sed -e "s:'--preprocess':\'--preprocess\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:\"--cubin\":\'--cubin\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:/usr/include/pycuda:${S}/src/cuda:g" \
+ -i pycuda/compiler.py || die
+
+ touch siteconf.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+ rm -f ./siteconf.py || die
+ "${EPYTHON}" "${S}"/configure.py \
+ --boost-inc-dir="${EPREFIX}/usr/include" \
+ --boost-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --boost-python-libname=boost_python-$(echo ${EPYTHON} | sed 's/python//')-mt \
+ --boost-thread-libname=boost_thread-mt \
+ --cuda-root="${EPREFIX}/opt/cuda" \
+ --cudadrv-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --cudart-lib-dir="${EPREFIX}/opt/cuda/$(get_libdir)" \
+ --cuda-inc-dir="${EPREFIX}/opt/cuda/include" \
+ --no-use-shipped-boost \
+ $(usex opengl --cuda-enable-gl "") || die
+}
+
+src_test() {
+ # we need write access to this to run the tests
+ addwrite /dev/nvidia0
+ addwrite /dev/nvidiactl
+ python_test() {
+ py.test --debug -v -v -v || die "Tests fail with ${EPYTHON}"
+ }
+ distutils-r1_src_test
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+
+ fi
+}
diff --git a/dev-python/pycuda/pycuda-9999.ebuild b/dev-python/pycuda/pycuda-9999.ebuild
new file mode 100644
index 000000000000..4a27060149fd
--- /dev/null
+++ b/dev-python/pycuda/pycuda-9999.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
+
+inherit cuda distutils-r1 git-r3 multilib
+
+DESCRIPTION="Python wrapper for NVIDIA CUDA"
+HOMEPAGE="http://mathema.tician.de/software/pycuda/ https://pypi.python.org/pypi/pycuda"
+SRC_URI=""
+EGIT_REPO_URI="http://git.tiker.net/trees/pycuda.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="examples opengl test"
+
+RDEPEND="
+ dev-libs/boost[python,${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pytools-2013[${PYTHON_USEDEP}]
+ dev-util/nvidia-cuda-toolkit
+ x11-drivers/nvidia-drivers
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}] )"
+
+# We need write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+python_prepare_all() {
+ cuda_sanitize
+ sed \
+ -e "s:'--preprocess':\'--preprocess\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:\"--cubin\":\'--cubin\', \'--compiler-bindir=$(cuda_gccdir)\':g" \
+ -e "s:/usr/include/pycuda:${S}/src/cuda:g" \
+ -i pycuda/compiler.py || die
+
+ touch siteconf.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+ local myopts=()
+ use opengl && myopts+=( --cuda-enable-gl )
+
+ mkdir "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+ [[ -e ./siteconf.py ]] && rm -f ./siteconf.py
+ "${EPYTHON}" "${S}"/configure.py \
+ --boost-inc-dir="${EPREFIX}/usr/include" \
+ --boost-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --boost-python-libname=boost_python-$(echo ${EPYTHON} | sed 's/python//')-mt \
+ --boost-thread-libname=boost_thread-mt \
+ --cuda-root="${EPREFIX}/opt/cuda" \
+ --cudadrv-lib-dir="${EPREFIX}/usr/$(get_libdir)" \
+ --cudart-lib-dir="${EPREFIX}/opt/cuda/$(get_libdir)" \
+ --cuda-inc-dir="${EPREFIX}/opt/cuda/include" \
+ --no-use-shipped-boost \
+ "${myopts[@]}"
+}
+
+src_test() {
+ # we need write access to this to run the tests
+ addwrite /dev/nvidia0
+ addwrite /dev/nvidiactl
+ python_test() {
+ py.test --debug -v -v -v || die "Tests fail with ${EPYTHON}"
+ }
+ distutils-r1_src_test
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}