1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
from spack import *
class PyNumpy(Package):
"""array processing for numbers, strings, records, and objects."""
homepage = "https://pypi.python.org/pypi/numpy"
url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz"
version('1.9.1', '78842b73560ec378142665e712ae4ad9')
version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645')
variant('blas', default=True)
extends('python')
depends_on('py-nose')
depends_on('lapack+shared', when='+blas')
def install(self, spec, prefix):
if '+blas' in spec:
with open('site.cfg', 'w') as f:
f.write('[DEFAULT]\n')
f.write('libraries=lapack,blas\n')
f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix))
python('setup.py', 'install', '--prefix=%s' % prefix)
|