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 os
class PyMatplotlib(Package):
class PyMatplotlib(PythonPackage):
"""matplotlib is a python 2D plotting library which produces publication
quality figures in a variety of hardcopy formats and interactive
environments across platforms."""
@@ -80,7 +80,7 @@ class PyMatplotlib(Package):
# --------- Optional dependencies
depends_on('pkg-config', type='build') # why not...
depends_on('py-pillow', when='+image', type=('build', 'run'))
depends_on('pil', when='+image', type=('build', 'run'))
depends_on('py-ipython', when='+ipython')
depends_on('ghostscript', when='+latex', type='run')
depends_on('texlive', when='+latex', type='run')
@@ -95,9 +95,10 @@ class PyMatplotlib(Package):
# depends_on('ttconv')
depends_on('py-six@1.9.0:', type=('build', 'run'))
def install(self, spec, prefix):
setup_py('build')
setup_py('install', '--prefix={0}'.format(prefix))
@PythonPackage.sanity_check('install')
def set_backend(self):
spec = self.spec
prefix = self.prefix
if '+qt' in spec or '+tk' in spec:
# Set backend in matplotlib configuration file