Add PythonPackage base class

- Add a PythonPackage class with build system support.
  - Support build phases in PythonPackage
  - Add a custom sanity check for PythonPackages
  - Get rid of nolink dependencies in python packages

- Update spack create to use new PythonPackage class

- Port most of Python packages to new PythonPackage class

- Conducted a massive install and activate of Python packages.
  - Fixed bugs introduced by install and activate.

- Update API docs on PythonPackage
This commit is contained in:
Adam J. Stewart
2017-01-16 18:13:37 -08:00
committed by Todd Gamblin
parent 1f49493fee
commit c0aaa8fcea
169 changed files with 849 additions and 1011 deletions

View File

@@ -26,7 +26,7 @@
import platform
class PyNumpy(Package):
class PyNumpy(PythonPackage):
"""NumPy is the fundamental package for scientific computing with Python.
It contains among other things: a powerful N-dimensional array object,
sophisticated (broadcasting) functions, tools for integrating C/C++ and
@@ -46,7 +46,6 @@ class PyNumpy(Package):
variant('blas', default=True)
variant('lapack', default=True)
extends('python')
depends_on('python@2.6:2.8,3.2:')
depends_on('py-nose', type='build')
depends_on('py-setuptools', type='build')
@@ -65,7 +64,8 @@ def setup_dependent_package(self, module, dep_spec):
self.spec.version, python_version, arch),
'numpy/core/include')
def install(self, spec, prefix):
def patch(self):
spec = self.spec
# for build notes see http://www.scipy.org/scipylib/building/linux.html
lapackblas = LibraryList('')
if '+lapack' in spec:
@@ -82,5 +82,3 @@ def install(self, spec, prefix):
if not ((platform.system() == "Darwin") and
(platform.mac_ver()[0] == '10.12')):
f.write('rpath=%s\n' % ':'.join(lapackblas.directories))
setup_py('install', '--prefix={0}'.format(prefix))