summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-10-24 17:13:49 -0700
committerGitHub <noreply@github.com>2016-10-24 17:13:49 -0700
commit0f6a5cd38538e8969d11bd2167f11060b1f53b43 (patch)
tree529d9838df1417a87b2dbfb75f5c0384edbf87ef /var
parent7dd14870ce963b5ec6672e8378abb586ca3eb13a (diff)
parentc1ad4bde28a09f39dbae0f6488dc7b7182d11f93 (diff)
downloadspack-0f6a5cd38538e8969d11bd2167f11060b1f53b43.tar.gz
spack-0f6a5cd38538e8969d11bd2167f11060b1f53b43.tar.bz2
spack-0f6a5cd38538e8969d11bd2167f11060b1f53b43.tar.xz
spack-0f6a5cd38538e8969d11bd2167f11060b1f53b43.zip
Merge pull request #1186 from epfl-scitas/features/install_with_phases
do_install : allow for an arbitrary number of phases
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/astyle/package.py24
-rw-r--r--var/spack/repos/builtin/packages/autoconf/package.py11
-rw-r--r--var/spack/repos/builtin/packages/blitz/package.py11
-rw-r--r--var/spack/repos/builtin/packages/gmp/package.py24
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py58
-rw-r--r--var/spack/repos/builtin/packages/ibmisc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lzo/package.py13
-rw-r--r--var/spack/repos/builtin/packages/openjpeg/package.py11
-rw-r--r--var/spack/repos/builtin/packages/qhull/package.py8
-rw-r--r--var/spack/repos/builtin/packages/swiftsim/package.py19
-rw-r--r--var/spack/repos/builtin/packages/szip/package.py25
11 files changed, 75 insertions, 131 deletions
diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py
index eecdcfdad7..31e1efb591 100644
--- a/var/spack/repos/builtin/packages/astyle/package.py
+++ b/var/spack/repos/builtin/packages/astyle/package.py
@@ -25,28 +25,24 @@
from spack import *
-class Astyle(Package):
+class Astyle(MakefilePackage):
"""A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI,
Objective-C, C#, and Java Source Code.
"""
homepage = "http://astyle.sourceforge.net/"
- url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz"
+ url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz"
version('2.04', '30b1193a758b0909d06e7ee8dd9627f6')
- def install(self, spec, prefix):
+ parallel = False
- with working_dir('src'):
- # we need to edit the makefile in place to set compiler:
- make_file = join_path(self.stage.source_path,
- 'build', 'gcc', 'Makefile')
- filter_file(r'^CXX\s*=.*', 'CXX=%s' % spack_cxx, make_file)
+ def build_directory(self):
+ return join_path(self.stage.source_path, 'build', self.compiler.name)
- make('-f',
- make_file,
- parallel=False)
+ def edit(self, spec, prefix):
+ makefile = join_path(self.build_directory(), 'Makefile')
+ filter_file(r'^CXX\s*=.*', 'CXX=%s' % spack_cxx, makefile)
- mkdirp(self.prefix.bin)
- install(join_path(self.stage.source_path, 'src', 'bin', 'astyle'),
- self.prefix.bin)
+ def install_args(self):
+ return ['prefix={0}'.format(prefix)]
diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py
index 5eb7f3347b..b6aba8c03f 100644
--- a/var/spack/repos/builtin/packages/autoconf/package.py
+++ b/var/spack/repos/builtin/packages/autoconf/package.py
@@ -25,10 +25,8 @@
from spack import *
-class Autoconf(Package):
- """
- Autoconf -- system configuration part of autotools
- """
+class Autoconf(AutotoolsPackage):
+ """Autoconf -- system configuration part of autotools"""
homepage = 'https://www.gnu.org/software/autoconf/'
url = 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz'
@@ -54,8 +52,3 @@ class Autoconf(Package):
'ifnames']
for name in executables:
setattr(module, name, self._make_executable(name))
-
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/blitz/package.py b/var/spack/repos/builtin/packages/blitz/package.py
index c92e49a732..16ad3bc2ab 100644
--- a/var/spack/repos/builtin/packages/blitz/package.py
+++ b/var/spack/repos/builtin/packages/blitz/package.py
@@ -25,16 +25,9 @@
from spack import *
-class Blitz(Package):
+class Blitz(AutotoolsPackage):
"""N-dimensional arrays for C++"""
homepage = "http://github.com/blitzpp/blitz"
- url = "https://github.com/blitzpp/blitz/tarball/1.0.0"
+ url = "https://github.com/blitzpp/blitz/tarball/1.0.0"
version('1.0.0', '9f040b9827fe22228a892603671a77af')
-
- # No dependencies
-
- def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py
index 14ce08473d..dcabbff67e 100644
--- a/var/spack/repos/builtin/packages/gmp/package.py
+++ b/var/spack/repos/builtin/packages/gmp/package.py
@@ -25,12 +25,12 @@
from spack import *
-class Gmp(Package):
- """GMP is a free library for arbitrary precision arithmetic, operating
- on signed integers, rational numbers, and floating-point numbers."""
-
+class Gmp(AutotoolsPackage):
+ """GMP is a free library for arbitrary precision arithmetic,
+ operating on signed integers, rational numbers, and
+ floating-point numbers."""
homepage = "https://gmplib.org"
- url = "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2"
+ url = "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2"
version('6.1.1', '4c175f86e11eb32d8bf9872ca3a8e11d')
version('6.1.0', '86ee6e54ebfc4a90b643a65e402c4048')
@@ -39,16 +39,10 @@ class Gmp(Package):
depends_on('m4', type='build')
- def install(self, spec, prefix):
- config_args = ['--prefix=' + prefix,
- '--enable-cxx']
-
+ def configure_args(self):
+ args = ['--enable-cxx']
# We need this flag if we want all the following checks to pass.
if spec.compiler.name == 'intel':
- config_args.append('CXXFLAGS=-no-ftz')
-
- configure(*config_args)
+ args.append('CXXFLAGS=-no-ftz')
- make()
- make('check')
- make('install')
+ return args
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index f2fe48feb3..cbb7501034 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -27,10 +27,10 @@ from spack import *
import shutil
-class Hdf5(Package):
+class Hdf5(AutotoolsPackage):
"""HDF5 is a data model, library, and file format for storing and managing
- data. It supports an unlimited variety of datatypes, and is designed for
- flexible and efficient I/O and for high volume and complex data.
+ data. It supports an unlimited variety of datatypes, and is designed for
+ flexible and efficient I/O and for high volume and complex data.
"""
homepage = "http://www.hdfgroup.org/HDF5/"
@@ -58,17 +58,19 @@ class Hdf5(Package):
variant('threadsafe', default=False,
description='Enable thread-safe capabilities')
- depends_on("mpi", when='+mpi')
- depends_on("szip", when='+szip')
- depends_on("zlib@1.1.2:")
+ depends_on('mpi', when='+mpi')
+ depends_on('szip', when='+szip')
+ depends_on('zlib@1.1.2:')
- def validate(self, spec):
+ @AutotoolsPackage.precondition('configure')
+ def validate(self):
"""
Checks if incompatible variants have been activated at the same time
:param spec: spec of the package
:raises RuntimeError: in case of inconsistencies
"""
+ spec = self.spec
if '+fortran' in spec and not self.compiler.fc:
msg = 'cannot build a fortran variant without a fortran compiler'
raise RuntimeError(msg)
@@ -77,8 +79,8 @@ class Hdf5(Package):
msg = 'cannot use variant +threadsafe with either +cxx or +fortran'
raise RuntimeError(msg)
- def install(self, spec, prefix):
- self.validate(spec)
+ def configure_args(self):
+ spec = self.spec
# Handle compilation after spec validation
extra_args = []
@@ -139,21 +141,13 @@ class Hdf5(Package):
'--disable-hl',
])
- configure(
- "--prefix=%s" % prefix,
- "--with-zlib=%s" % spec['zlib'].prefix,
- *extra_args)
- make()
+ return ["--with-zlib=%s" % spec['zlib'].prefix] + extra_args
- if self.run_tests:
- make("check")
-
- make("install")
- self.check_install(spec)
-
- def check_install(self, spec):
- "Build and run a small program to test the installed HDF5 library"
- print "Checking HDF5 installation..."
+ def check(self):
+ super(Hdf5, self).check()
+ # Build and run a small program to test the installed HDF5 library
+ spec = self.spec
+ print("Checking HDF5 installation...")
checkdir = "spack-check"
with working_dir(checkdir, create=True):
source = r"""
@@ -190,15 +184,15 @@ HDF5 version {version} {version}
output = ""
success = output == expected
if not success:
- print "Produced output does not match expected output."
- print "Expected output:"
- print '-' * 80
- print expected
- print '-' * 80
- print "Produced output:"
- print '-' * 80
- print output
- print '-' * 80
+ print("Produced output does not match expected output.")
+ print("Expected output:")
+ print('-' * 80)
+ print(expected)
+ print('-' * 80)
+ print("Produced output:")
+ print('-' * 80)
+ print(output)
+ print('-' * 80)
raise RuntimeError("HDF5 install check failed")
shutil.rmtree(checkdir)
diff --git a/var/spack/repos/builtin/packages/ibmisc/package.py b/var/spack/repos/builtin/packages/ibmisc/package.py
index 736886df96..172204a75b 100644
--- a/var/spack/repos/builtin/packages/ibmisc/package.py
+++ b/var/spack/repos/builtin/packages/ibmisc/package.py
@@ -43,7 +43,7 @@ class Ibmisc(CMakePackage):
depends_on('cmake', type='build')
depends_on('doxygen', type='build')
- def configure_args(self):
+ def cmake_args(self):
spec = self.spec
return [
'-DUSE_EVERYTRACE=%s' % ('YES' if '+everytrace' in spec else 'NO'),
diff --git a/var/spack/repos/builtin/packages/lzo/package.py b/var/spack/repos/builtin/packages/lzo/package.py
index 1c44ced4d4..e9c98842f4 100644
--- a/var/spack/repos/builtin/packages/lzo/package.py
+++ b/var/spack/repos/builtin/packages/lzo/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Lzo(Package):
+class Lzo(AutotoolsPackage):
"""Real-time data compression library"""
homepage = 'https://www.oberhumer.com/opensource/lzo/'
@@ -37,15 +37,8 @@ class Lzo(Package):
version('2.06', '95380bd4081f85ef08c5209f4107e9f8')
version('2.05', 'c67cda5fa191bab761c7cb06fe091e36')
- def install(self, spec, prefix):
- configure_args = [
- '--prefix={0}'.format(prefix),
+ def configure_args(self):
+ return [
'--disable-dependency-tracking',
'--enable-shared'
]
- configure(*configure_args)
- make()
- if self.run_tests:
- make('check')
- make('test') # more exhaustive test
- make('install')
diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py
index fc505e19a9..988ebc155d 100644
--- a/var/spack/repos/builtin/packages/openjpeg/package.py
+++ b/var/spack/repos/builtin/packages/openjpeg/package.py
@@ -25,8 +25,9 @@
from spack import *
-class Openjpeg(Package):
+class Openjpeg(CMakePackage):
"""OpenJPEG is an open-source JPEG 2000 codec written in C language.
+
It has been developed in order to promote the use of JPEG 2000, a
still-image compression standard from the Joint Photographic
Experts Group (JPEG).
@@ -35,7 +36,7 @@ class Openjpeg(Package):
"""
homepage = "https://github.com/uclouvain/openjpeg"
- url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz"
+ url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz"
version('2.1', '3e1c451c087f8462955426da38aa3b3d')
version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5')
@@ -44,9 +45,3 @@ class Openjpeg(Package):
version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e')
depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
-
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py
index 462a681ad9..4456c16bd2 100644
--- a/var/spack/repos/builtin/packages/qhull/package.py
+++ b/var/spack/repos/builtin/packages/qhull/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Qhull(Package):
+class Qhull(CMakePackage):
"""Qhull computes the convex hull, Delaunay triangulation, Voronoi
diagram, halfspace intersection about a point, furt hest-site
Delaunay triangulation, and furthest-site Voronoi diagram. The
@@ -44,9 +44,3 @@ class Qhull(Package):
url="http://www.qhull.org/download/qhull-2012.1-src.tgz")
depends_on('cmake@2.6:', type='build')
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py
index c591c48d19..1c424b5ca0 100644
--- a/var/spack/repos/builtin/packages/swiftsim/package.py
+++ b/var/spack/repos/builtin/packages/swiftsim/package.py
@@ -26,7 +26,7 @@ from spack import *
import llnl.util.tty as tty
-class Swiftsim(Package):
+class Swiftsim(AutotoolsPackage):
"""SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides
astrophysicists with a state of the art framework to perform
particle based simulations.
@@ -58,20 +58,15 @@ class Swiftsim(Package):
tty.warn('This is needed to clone SWIFT repository')
spack_env.set('GIT_SSL_NO_VERIFY', 1)
- def install(self, spec, prefix):
- # Generate configure from configure.ac
- # and Makefile.am
+ def autoreconf(self, spec, prefix):
libtoolize()
aclocal()
autoconf()
autogen = Executable('./autogen.sh')
autogen()
- # Configure and install
- options = ['--prefix=%s' % prefix,
- '--enable-mpi' if '+mpi' in spec else '--disable-mpi',
- '--with-metis={0}'.format(spec['metis'].prefix),
- '--enable-optimization']
- configure(*options)
- make()
- make("install")
+ def configure_args(self):
+ return ['--prefix=%s' % self.prefix,
+ '--enable-mpi' if '+mpi' in self.spec else '--disable-mpi',
+ '--with-metis={0}'.format(self.spec['metis'].prefix),
+ '--enable-optimization']
diff --git a/var/spack/repos/builtin/packages/szip/package.py b/var/spack/repos/builtin/packages/szip/package.py
index b2ca6f3995..91934f7d03 100644
--- a/var/spack/repos/builtin/packages/szip/package.py
+++ b/var/spack/repos/builtin/packages/szip/package.py
@@ -25,24 +25,21 @@
from spack import *
-class Szip(Package):
- """An implementation of the extended-Rice lossless compression algorithm.
- It provides lossless compression of scientific data, and is provided
- with HDF software products.
+class Szip(AutotoolsPackage):
+ """Szip is an implementation of the extended-Rice lossless
+ compression algorithm.
+ It provides lossless compression of scientific data, and is
+ provided with HDF software products.
"""
homepage = "https://www.hdfgroup.org/doc_resource/SZIP/"
- url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz"
+ url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz"
version('2.1', '902f831bcefb69c6b635374424acbead')
- def install(self, spec, prefix):
- configure('--prefix=%s' % prefix,
- '--enable-production',
- '--enable-shared',
- '--enable-static',
- '--enable-encoding')
-
- make()
- make("install")
+ def configure_args(self):
+ return ['--enable-production',
+ '--enable-shared',
+ '--enable-static',
+ '--enable-encoding']