Add the rockstar package (#3680)
* Add the rockstar package * Add rockstar to yt. * Correct signature of prep_yt. * Correct rockstar package installation process Needed to change the way the necessary prefixes are found as well as how the completed package is copied. There should probably be a way to do the copying in a more 'spack' way. * Add license * Add description. * Set no hdf5 variant as default. * Use copy_tree for copying files * Use MakefilePackage * Address concerns from @adamjstewart * Fix flake8 errors.
This commit is contained in:

committed by
Adam J. Stewart

parent
c6777ddf74
commit
7c4ed0a70a
@@ -57,6 +57,7 @@ class PyYt(PythonPackage):
|
||||
variant("astropy", default=True, description="enable astropy support")
|
||||
variant("h5py", default=True, description="enable h5py support")
|
||||
variant("scipy", default=True, description="enable scipy support")
|
||||
variant("rockstar", default=False, description="enable rockstar support")
|
||||
|
||||
depends_on("py-astropy", type=('build', 'run'), when="+astropy")
|
||||
depends_on("py-cython", type=('build', 'run'))
|
||||
@@ -67,8 +68,15 @@ class PyYt(PythonPackage):
|
||||
depends_on("py-scipy", type=('build', 'run'), when="+scipy")
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-sympy", type=('build', 'run'))
|
||||
depends_on("rockstar@yt", type=('build', 'run'), when="+rockstar")
|
||||
depends_on("python @2.7:2.999,3.4:")
|
||||
|
||||
@run_before('install')
|
||||
def prep_yt(self):
|
||||
if '+rockstar' in self.spec:
|
||||
with open('rockstar.cfg', 'w') as rockstar_cfg:
|
||||
rockstar_cfg.write(self.spec['rockstar'].prefix)
|
||||
|
||||
@run_after('install')
|
||||
def check_install(self):
|
||||
# The Python interpreter path can be too long for this
|
||||
|
Reference in New Issue
Block a user