summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/esys-particle/package.py
diff options
context:
space:
mode:
authorsnehring <snehring@users.noreply.github.com>2021-10-04 14:41:31 -0500
committerGitHub <noreply@github.com>2021-10-04 19:41:31 +0000
commit675bdada493c4f41ad343fe99dfb4f5852a35396 (patch)
treebcf1d5c27b21964ca1b40fab37465de7dd4fcaf3 /var/spack/repos/builtin/packages/esys-particle/package.py
parentc59223effeb734e4e41fd99e2907bf2f15b4f669 (diff)
downloadspack-675bdada493c4f41ad343fe99dfb4f5852a35396.tar.gz
spack-675bdada493c4f41ad343fe99dfb4f5852a35396.tar.bz2
spack-675bdada493c4f41ad343fe99dfb4f5852a35396.tar.xz
spack-675bdada493c4f41ad343fe99dfb4f5852a35396.zip
esys-particle: add new package esys-particle (#25338)
* esys-particle: add new package esys-particle * esys-particle: requested changes * esys-particle: placating isort
Diffstat (limited to 'var/spack/repos/builtin/packages/esys-particle/package.py')
-rw-r--r--var/spack/repos/builtin/packages/esys-particle/package.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/esys-particle/package.py b/var/spack/repos/builtin/packages/esys-particle/package.py
new file mode 100644
index 0000000000..58a36a25e9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/esys-particle/package.py
@@ -0,0 +1,39 @@
+# 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 llnl.util.filesystem import find
+
+from spack import *
+
+
+class EsysParticle(CMakePackage):
+ """ESyS-Particle is Open Source software for particle-based numerical
+ modelling. The software implements the Discrete Element Method (DEM),
+ a widely used technique for modelling processes involving large
+ deformations, granular flow and/or fragmentation."""
+
+ homepage = "https://launchpad.net/esys-particle"
+ url = "https://launchpadlibrarian.net/539636757/esys-particle-3.0-alpha.tar.gz"
+
+ maintainers = ['snehring']
+
+ version('3.0-alpha', sha256='4fba856a95c93991cacb904e6a54a7ded93558f7adc8c3e6da99bc347843a434')
+
+ depends_on('mpi')
+ depends_on('boost@1.71.0+python')
+ depends_on('python@3.6:')
+ depends_on('py-setuptools', type='build')
+
+ @when('@3.0-alpha')
+ def patch(self):
+ files = find('.', 'CMakeLists.txt')
+ for file in files:
+ filter_file('PYTHON_LIBRARIES', 'Python_LIBRARIES',
+ file, string=True)
+
+ def setup_run_environment(self, env):
+ pylibpath = join_path(self.prefix.lib, "python{0}".format(
+ self.spec["python"].version.up_to(2)))
+ env.prepend_path('PYTHONPATH', join_path(pylibpath, 'dist-packages'))