Simplified NumPy dependencies

This commit is contained in:
Adam J. Stewart 2016-03-24 12:34:58 -05:00
parent cc582dd4b4
commit 8643e21913
2 changed files with 31 additions and 11 deletions

View file

@ -1,24 +1,43 @@
from spack import * from spack import *
class PyNumpy(Package): class PyNumpy(Package):
"""array processing for numbers, strings, records, and objects.""" """NumPy is the fundamental package for scientific computing with Python.
homepage = "https://pypi.python.org/pypi/numpy" It contains among other things: a powerful N-dimensional array object,
sophisticated (broadcasting) functions, tools for integrating C/C++ and
Fortran code, and useful linear algebra, Fourier transform, and random
number capabilities"""
homepage = "http://www.numpy.org/"
url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz" url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz"
version('1.9.1', '78842b73560ec378142665e712ae4ad9') version('1.10.4', 'aed294de0aa1ac7bd3f9745f4f1968ad')
version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645')
version('1.9.1', '78842b73560ec378142665e712ae4ad9')
variant('blas', default=True) variant('blas', default=True)
variant('lapack', default=True)
extends('python') extends('python')
depends_on('py-nose') depends_on('py-nose')
depends_on('netlib-blas+fpic', when='+blas') depends_on('blas', when='+blas')
depends_on('netlib-lapack+shared', when='+blas') depends_on('lapack', when='+lapack')
def install(self, spec, prefix): def install(self, spec, prefix):
libraries = []
library_dirs = []
if '+blas' in spec: if '+blas' in spec:
libraries.append('blas')
library_dirs.append(spec['blas'].prefix.lib)
if '+lapack' in spec:
libraries.append('lapack')
library_dirs.append(spec['lapack'].prefix.lib)
if '+blas' in spec or '+lapack' in spec:
with open('site.cfg', 'w') as f: with open('site.cfg', 'w') as f:
f.write('[DEFAULT]\n') f.write('[DEFAULT]\n')
f.write('libraries=lapack,blas\n') f.write('libraries=%s\n' % ','.join(libraries))
f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) f.write('library_dirs=%s\n' % ':'.join(library_dirs))
python('setup.py', 'install', '--prefix=%s' % prefix) python('setup.py', 'install', '--prefix=%s' % prefix)

View file

@ -2,11 +2,12 @@
class PyScipy(Package): class PyScipy(Package):
"""Scientific Library for Python.""" """Scientific Library for Python."""
homepage = "https://pypi.python.org/pypi/scipy" homepage = "http://www.scipy.org/"
url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz" url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz"
version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') version('0.17.0', '5ff2971e1ce90e762c59d2cd84837224')
version('0.15.1', 'be56cd8e60591d6332aac792a5880110') version('0.15.1', 'be56cd8e60591d6332aac792a5880110')
version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a')
extends('python') extends('python')
depends_on('py-nose') depends_on('py-nose')