Skip to content

Commit

Permalink
Merge branch 'update/yt-rockstar' into yt-dev-working-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
krafczyk committed Jan 17, 2017
2 parents e2d4dad + fa39273 commit 65be1a9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions var/spack/repos/builtin/packages/py-yt/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ class PyYt(Package):
variant("astropy", default=True, description="enable astropy support")
variant("h5py", default=True, description="enable h5py support")
variant("scipy", default=True, description="enable scipy support")
<<<<<<< HEAD
variant("devmode", default=False, description="enable development mode")
=======
variant("rockstar", default=False, description="enable rockstar support")
>>>>>>> update/yt-rockstar

extends("python")

Expand All @@ -66,13 +70,21 @@ class PyYt(Package):
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:")

def install(self, spec, prefix):
if '+devmode' in spec:
setup_py("develop", "--prefix=%s" % prefix)
else:
setup_py("install", "--prefix=%s" % prefix)
if '+rockstar' in spec:
if os.path.exists('rockstar.cfg'):
os.remove('rockstar.cfg')
rockstar_cfg = open('rockstar.cfg', 'w')
rockstar_cfg.write(spec.get_dependency('rockstar').spec.prefix)
rockstar_cfg.close()
setup_py("install", "--prefix=%s" % prefix)
self.check_install(spec, prefix)

def check_install(self, spec, prefix):
Expand Down

0 comments on commit 65be1a9

Please sign in to comment.