summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarson Woods <carsonwoods@users.noreply.github.com>2019-07-09 07:57:53 -0600
committerElizabeth Fischer <elizabeth.fischer@columbia.edu>2019-07-09 09:57:53 -0400
commit2838aa772d9d8827a55ce1f64cf0be7be2869712 (patch)
tree5e034d516240af16ef50dc9dec36659fa31219e2
parentd0b2c77cd1adcc00a005d861f944e8effb3a9b89 (diff)
downloadspack-2838aa772d9d8827a55ce1f64cf0be7be2869712.tar.gz
spack-2838aa772d9d8827a55ce1f64cf0be7be2869712.tar.bz2
spack-2838aa772d9d8827a55ce1f64cf0be7be2869712.tar.xz
spack-2838aa772d9d8827a55ce1f64cf0be7be2869712.zip
package: Add powerapi package (#11845)
* Add powerapi package * Fix flake8 formatting * Fix download URL * Update powerapi version line * Fix how configure arguments are selected to improve readability * Bug Fixes * Fix trailing whitespace * Bug fixes * Remove incorrect configure flag
-rw-r--r--var/spack/repos/builtin/packages/powerapi/package.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/powerapi/package.py b/var/spack/repos/builtin/packages/powerapi/package.py
new file mode 100644
index 0000000000..aa7132a043
--- /dev/null
+++ b/var/spack/repos/builtin/packages/powerapi/package.py
@@ -0,0 +1,51 @@
+# 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 Powerapi(AutotoolsPackage):
+ """This software is a reference implementation of the PowerAPI"""
+
+ homepage = "https://powerapi.sandia.gov/"
+ git = "https://github.com/pwrapi/pwrapi-ref.git"
+
+ version('1.1.1', commit='93f66dfa29f014067823f2b790a1862e5841a11c')
+
+ variant('hwloc', default=False, description='Build hwloc support')
+ variant('debug', default=False, description='Enable debug support')
+ variant('mpi', default=False, description='Enable MPI support')
+ variant('gnu-ld', default=False, description='Assume GNU compiled uses gnu-ld')
+
+ depends_on('autoconf')
+ depends_on('automake')
+ depends_on('libtool')
+ depends_on('m4')
+
+ depends_on('hwloc', when='+hwloc')
+ depends_on('mpi', when='+mpi')
+
+ def autoreconf(self, spec, prefix):
+ bash = which('bash')
+ bash('./autogen.sh')
+
+ def configure_args(self):
+ spec = self.spec
+ args = ['--prefix={0}'.format(self.prefix)]
+
+ if '+hwloc' in spec:
+ args.append('--with-hwloc={0}'.format(spec['hwloc'].prefix))
+
+ if '+mpi' in spec:
+ args.append('--with-mpi={0}'.format(spec['mpi'].prefix))
+
+ args.extend([
+ '--with%s-gnu-ld' % ('' if '+gnu-ld' in spec else 'out'),
+ '--%sable-debug' % ('en' if '+debug' in spec else 'dis')
+ ])
+
+ return args
+
+ def install(self, spec, prefix):
+ make('install')