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

@@ -25,30 +25,31 @@
from spack import *
class PyNbconvert(Package):
class PyNbconvert(PythonPackage):
"""Jupyter Notebook Conversion"""
homepage = "https://github.com/jupyter/nbconvert"
url = "https://github.com/jupyter/nbconvert/archive/4.2.0.tar.gz"
version('4.2.0' , '8bd88771cc00f575d5edcd0b5197f964')
version('4.1.0' , '06655576713ba1ff7cece2b92760c187')
version('4.0.0' , '9661620b1e10a7b46f314588d2d0932f')
extends('python')
version('4.2.0', '8bd88771cc00f575d5edcd0b5197f964')
version('4.1.0', '06655576713ba1ff7cece2b92760c187')
version('4.0.0', '9661620b1e10a7b46f314588d2d0932f')
depends_on('py-setuptools', type='build')
depends_on('py-pycurl', type='build')
depends_on('python@2.7:2.7.999,3.3:')
depends_on('py-mistune')
depends_on('py-jinja2')
depends_on('py-pygments')
depends_on('py-traitlets')
depends_on('py-jupyter-core')
depends_on('py-nbformat')
depends_on('py-entrypoints')
depends_on('py-tornado')
depends_on('py-jupyter-client')
depends_on('py-mistune', type=('build', 'run'))
depends_on('py-jinja2', type=('build', 'run'))
depends_on('py-pygments', type=('build', 'run'))
depends_on('py-traitlets', type=('build', 'run'))
depends_on('py-jupyter-core', type=('build', 'run'))
depends_on('py-nbformat', type=('build', 'run'))
depends_on('py-entrypoints', type=('build', 'run'))
depends_on('py-tornado', type=('build', 'run'))
depends_on('py-jupyter-client', type=('build', 'run'))
def install(self, spec, prefix):
setup_py('install', '--prefix={0}'.format(prefix))
# FIXME:
# Failed, try again after installing PycURL with `pip install pycurl` to avoid outdated SSL. # noqa
# Failed to download css from https://cdn.jupyter.org/notebook/4.1.0/style/style.min.css: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) # noqa
# Downloading CSS: https://cdn.jupyter.org/notebook/4.1.0/style/style.min.css # noqa
# error: Need Notebook CSS to proceed: nbconvert/resources/style.min.css