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:

committed by
Todd Gamblin

parent
1f49493fee
commit
c0aaa8fcea
@@ -26,7 +26,7 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyYt(Package):
|
||||
class PyYt(PythonPackage):
|
||||
"""Volumetric Data Analysis
|
||||
|
||||
yt is a python package for analyzing and visualizing
|
||||
@@ -54,8 +54,6 @@ class PyYt(Package):
|
||||
variant("h5py", default=True, description="enable h5py support")
|
||||
variant("scipy", default=True, description="enable scipy support")
|
||||
|
||||
extends("python")
|
||||
|
||||
depends_on("py-astropy", type=('build', 'run'), when="+astropy")
|
||||
depends_on("py-cython", type=('build', 'run'))
|
||||
depends_on("py-h5py", type=('build', 'run'), when="+h5py")
|
||||
@@ -67,12 +65,9 @@ class PyYt(Package):
|
||||
depends_on("py-sympy", type=('build', 'run'))
|
||||
depends_on("python @2.7:2.999,3.4:")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
setup_py("install", "--prefix=%s" % prefix)
|
||||
self.check_install(spec, prefix)
|
||||
|
||||
def check_install(self, spec, prefix):
|
||||
@PythonPackage.sanity_check('install')
|
||||
def check_install(self):
|
||||
# The Python interpreter path can be too long for this
|
||||
# yt = Executable(join_path(prefix.bin, "yt"))
|
||||
# yt("--help")
|
||||
python(join_path(prefix.bin, "yt"), "--help")
|
||||
python(join_path(self.prefix.bin, "yt"), "--help")
|
||||
|
Reference in New Issue
Block a user