summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorbryanherman <63422190+bryanherman@users.noreply.github.com>2021-01-27 21:56:35 -0500
committerGitHub <noreply@github.com>2021-01-27 20:56:35 -0600
commitf7a47e4048cd70f98a8bed60f39fdbdd07086a19 (patch)
treedb61ca26b6ebec988c285058e6a7518c8d3d5c24 /var
parent74fbad47425a319484503bb14bd10eae221b5310 (diff)
downloadspack-f7a47e4048cd70f98a8bed60f39fdbdd07086a19.tar.gz
spack-f7a47e4048cd70f98a8bed60f39fdbdd07086a19.tar.bz2
spack-f7a47e4048cd70f98a8bed60f39fdbdd07086a19.tar.xz
spack-f7a47e4048cd70f98a8bed60f39fdbdd07086a19.zip
New package: py-openmc (#21351)
* added package py-openmc * Update var/spack/repos/builtin/packages/py-openmc/package.py specify branch when using branch names for versions Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-openmc/package.py use run after fixture to install openmc lib Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-openmc/package.py Simplify copying openmc library to py-openmc prefix using install Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-openmc/package.py NumPy should be 1.9+ Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * fix paren missing * Update var/spack/repos/builtin/packages/py-openmc/package.py fixed parens Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-openmc/package.py use v0.11.0 in URL Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-openmc/package.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-openmc/package.py b/var/spack/repos/builtin/packages/py-openmc/package.py
new file mode 100644
index 0000000000..e3ffcba6c6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-openmc/package.py
@@ -0,0 +1,56 @@
+# Copyright 2013-2021 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 *
+
+
+class PyOpenmc(PythonPackage):
+ """The OpenMC project aims to provide a fully-featured Monte Carlo particle
+ transport code based on modern methods. It is a constructive solid
+ geometry, continuous-energy transport code that uses ACE format cross
+ sections. The project started under the Computational Reactor Physics
+ Group at MIT."""
+
+ homepage = "http://openmc.readthedocs.io/"
+ url = "https://github.com/openmc-dev/openmc/tarball/v0.11.0"
+ git = "https://github.com/openmc-dev/openmc.git"
+
+ version('develop', branch='develop')
+ version('master', branch='master')
+ version('0.12.0', tag='v0.12.0', submodules=True)
+ version('0.11.0', sha256='19a9d8e9c3b581e9060fbd96d30f1098312d217cb5c925eb6372a5786d9175af')
+
+ variant('mpi', default=False, description='Enable MPI support')
+
+ # keep py-openmc and openmc at the same version
+ for ver in ['develop', 'master', '0.12.0', '0.11.0']:
+ depends_on(
+ 'openmc+mpi@{0}'.format(ver), when='@{0}+mpi'.format(ver),
+ type=('build', 'run')
+ )
+ depends_on(
+ 'openmc~mpi@{0}'.format(ver), when='@{0}~mpi'.format(ver),
+ type=('build', 'run')
+ )
+
+ depends_on('git', type='build')
+ depends_on('python@3.5:', type=('build', 'run'))
+ depends_on('py-cython', type='build')
+ depends_on('py-h5py~mpi', when='~mpi', type=('build', 'run'))
+ depends_on('py-h5py+mpi', when='+mpi', type=('build', 'run'))
+ depends_on('py-ipython', type=('build', 'run'))
+ depends_on('py-lxml', type=('build', 'run'))
+ depends_on('py-matplotlib', type=('build', 'run'))
+ depends_on('py-mpi4py', when='+mpi', type=('build', 'run'))
+ depends_on('py-numpy@1.9:', type=('build', 'run'))
+ depends_on('py-pandas', type=('build', 'run'))
+ depends_on('py-setuptools', type='build')
+ depends_on('py-scipy', type=('build', 'run'))
+ depends_on('py-uncertainties', type=('build', 'run'))
+
+ @run_after('install')
+ def install_lib(self):
+ install(join_path(self.spec['openmc'].prefix.lib, 'libopenmc.*'),
+ self.prefix.lib)