diff options
author | brietzke <brietzke@users.noreply.github.com> | 2019-06-15 17:29:36 +0200 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-06-15 10:29:36 -0500 |
commit | ef55319a9ca5a9cb7f7c927ee497305efc158d4b (patch) | |
tree | d4c6da8d778134df5fe9517740680a87afc3e094 | |
parent | 537fa81c5dc9aca98fc8f0b5f66a17d7abc85fdf (diff) | |
download | spack-ef55319a9ca5a9cb7f7c927ee497305efc158d4b.tar.gz spack-ef55319a9ca5a9cb7f7c927ee497305efc158d4b.tar.bz2 spack-ef55319a9ca5a9cb7f7c927ee497305efc158d4b.tar.xz spack-ef55319a9ca5a9cb7f7c927ee497305efc158d4b.zip |
new package: mutationpp (#11705)
* new package: mutationpp
* Update package.py
* flake8: correct package.py for flake8-python-style
* Update package.py
* modifications as requested by reviewer for #11705
-rw-r--r-- | var/spack/repos/builtin/packages/mutationpp/package.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mutationpp/package.py b/var/spack/repos/builtin/packages/mutationpp/package.py new file mode 100644 index 0000000000..52fb2bf49d --- /dev/null +++ b/var/spack/repos/builtin/packages/mutationpp/package.py @@ -0,0 +1,50 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class Mutationpp(CMakePackage): + """Mutation++ is an open-source library originally developed + at the von Karman Institute for Fluid Dynamics, designed to + couple with conventional computational fluid dynamics codes + to provide thermodynamic, transport, chemistry, and energy + transfer properties associated with subsonic to hypersonic flows.""" + + homepage = "https://github.com/mutationpp/Mutationpp" + url = "https://github.com/mutationpp/Mutationpp/archive/v0.3.1.tar.gz" + + version('0.3.1', 'a6da2816e145ac9fcfbd8920595b7f65ce7bc8df0bec572b32647720758cbe69') + + variant('fortran', default=True, description='Enable Fortran interface') + variant('data', default=True, description='Install default model data') + variant('examples', default=True, description='Install examples') + + def cmake_args(self): + args = [] + if '+fortran' in self.spec: + args.append('-DBUILD_FORTRAN_WRAPPER=ON') + return args + + @run_after('install') + def install_data(self): + if '+data' in self.spec and os.path.isdir('data'): + install_tree('data', self.prefix.data) + + @run_after('install') + def install_examples(self): + if '+examples' in self.spec and os.path.isdir('examples'): + install_tree('examples', self.prefix.examples) + + def setup_environment(self, spack_env, run_env): + run_env.set('MPP_DIRECTORY', self.prefix) + if os.path.isdir(self.prefix.data): + run_env.set('MPP_DATA_DIRECTORY', self.prefix.data) + + def setup_dependent_environment(self, spack_env, run_env): + spack_env.set('MPP_DIRECTORY', self.prefix) + if os.path.isdir(self.prefix.data): + spack_env.set('MPP_DATA_DIRECTORY', self.prefix.data) |