summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorasmaahassan90 <31959389+asmaahassan90@users.noreply.github.com>2020-01-05 21:28:10 +0300
committerAdam J. Stewart <ajstewart426@gmail.com>2020-01-05 12:28:10 -0600
commitc0672eb641846f5977c2a51e7b0c7d69b6a6f166 (patch)
tree49157e721bc602dfdd87a2deea26a9b127a82149 /var
parentf7f4d1a02e6d38c655fb74801e27cc021650a554 (diff)
downloadspack-c0672eb641846f5977c2a51e7b0c7d69b6a6f166.tar.gz
spack-c0672eb641846f5977c2a51e7b0c7d69b6a6f166.tar.bz2
spack-c0672eb641846f5977c2a51e7b0c7d69b6a6f166.tar.xz
spack-c0672eb641846f5977c2a51e7b0c7d69b6a6f166.zip
Add py-thirdorder recipe (#12791)
* Add Thirdorder recipe * Remove white spaces * Converting recipe to a PythonPackage base class * remove trailing spaces * remove line at end of file * enhance recipe as per reviewer * fix post_install as requested by reviewer * rename dir to py-thirderorder * change checksum to sha256
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-thirdorder/package.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-thirdorder/package.py b/var/spack/repos/builtin/packages/py-thirdorder/package.py
new file mode 100644
index 0000000000..66b01f0d88
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-thirdorder/package.py
@@ -0,0 +1,37 @@
+# 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 *
+
+
+class PyThirdorder(PythonPackage):
+ """It helps ShengBTE users create FORCE_CONSTANTS_3RD files efficiently"""
+
+ homepage = "http://www.shengbte.org"
+ url = "http://www.shengbte.org/downloads/thirdorder-v1.1.1-8526f47.tar.bz2"
+
+ version('1.1.1-8526f47', '5e1cc8d6ffa7efdb7325c397ca236863ea8a9c5bed1c558acca68b140f89167e')
+
+ depends_on('py-numpy', type=('build', 'run'))
+ depends_on('py-scipy', type=('build', 'run'))
+ depends_on('spglib', type=('build', 'run'))
+
+ def patch(self):
+ setupfile = FileFilter('setup.py')
+ setupfile.filter('LIBRARY_DIRS = .*', 'LIBRARY_DIRS = ["%s"]'
+ % self.spec['spglib'].prefix.lib)
+ setupfile.filter('INCLUDE_DIRS = .*', 'INCLUDE_DIRS = ["%s"]'
+ % self.spec['spglib'].prefix.include)
+
+ sourcefile = FileFilter('thirdorder_core.c')
+ sourcefile.filter('#include "spglib.*"', '#include "spglib.h"')
+
+ @run_after('install')
+ def post_install(self):
+ mkdirp(self.prefix.bin)
+ install('thirdorder_espresso.py', self.prefix.bin)
+ install('thirdorder_vasp.py', self.prefix.bin)
+ install('thirdorder_castep.py', self.prefix.bin)
+ install('thirdorder_common.py', self.prefix.bin)