forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pygpu: fix linking with gpuarray (spack#17033)
* add build_ext_args to link pygpu with gpuarray * libgpuarray: add version 0.7.6
- Loading branch information
1 parent
804b6f2
commit cb20f01
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
# SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
from spack import * | ||
import os | ||
|
||
|
||
class PyPygpu(PythonPackage): | ||
|
@@ -12,6 +13,7 @@ class PyPygpu(PythonPackage): | |
homepage = "http://deeplearning.net/software/libgpuarray/" | ||
url = "https://github.com/Theano/libgpuarray/archive/v0.6.1.tar.gz" | ||
|
||
version('0.7.6', sha256='ad1c00dd47c3d36ee1708e5167377edbfcdb7226e837ef9c68b841afbb4a4f6a') | ||
version('0.7.5', sha256='39c4d2e743848be43c8819c736e089ae51b11aa446cc6ee05af945c2dfd63420') | ||
version('0.7.2', sha256='ef11ee6f8d62d53831277fd3dcab662aa770a5b5de2d30fe3018c4af959204da') | ||
version('0.7.1', sha256='4d0f9dd63b0595a8c04d8cee91b2619847c033b011c71d776caa784322382ed6') | ||
|
@@ -21,11 +23,23 @@ class PyPygpu(PythonPackage): | |
version('0.6.1', sha256='b2466311e0e3bacdf7a586bba0263f6d232bf9f8d785e91ddb447653741e6ea5') | ||
version('0.6.0', sha256='a58a0624e894475a4955aaea25e82261c69b4d22c8f15ec07041a4ba176d35af') | ||
|
||
depends_on('libgpuarray') | ||
depends_on('[email protected]', when='@0.7.6') | ||
depends_on('[email protected]', when='@0.7.5') | ||
depends_on('libgpuarray') # default | ||
# not just build-time, requires pkg_resources | ||
depends_on('py-setuptools', type=('build', 'run')) | ||
depends_on('[email protected]:', type=('build', 'run')) | ||
depends_on('py-nose', type=('build', 'run')) | ||
depends_on('py-numpy', type=('build', 'run')) | ||
depends_on('py-mako', type=('build', 'run')) | ||
depends_on('check') | ||
|
||
phases = ['build_ext', 'install'] | ||
|
||
def build_ext_args(self, spec, prefix): | ||
|
||
_ = self.spec['libgpuarray'].prefix | ||
include_flags = '-I{0}'.format(os.path.join(_, 'include')) | ||
library_flags = '-L{0}'.format(os.path.join(_, 'lib')) | ||
|
||
return [include_flags, library_flags] |