From 81dc27bf411c7417604ca3ebb344ff82f8d3e7d9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 16 Mar 2014 16:03:49 -0700 Subject: Move packages and mock packages to /var/spack --- lib/spack/spack/globals.py | 7 +- lib/spack/spack/packages.py | 274 ++++++++++++++++++++ lib/spack/spack/packages/__init__.py | 278 --------------------- lib/spack/spack/packages/callpath/package.py | 37 --- lib/spack/spack/packages/cmake/package.py | 36 --- lib/spack/spack/packages/dyninst/package.py | 41 --- lib/spack/spack/packages/graphlib/package.py | 14 -- lib/spack/spack/packages/launchmon/package.py | 45 ---- .../packages/launchmon/patch.lmon_install_dir | 147 ----------- lib/spack/spack/packages/libdwarf/package.py | 75 ------ lib/spack/spack/packages/libelf/package.py | 47 ---- lib/spack/spack/packages/libunwind/package.py | 36 --- lib/spack/spack/packages/mpich/package.py | 43 ---- lib/spack/spack/packages/mpileaks/package.py | 37 --- lib/spack/spack/packages/mrnet/package.py | 15 -- .../mvapich2/ad_lustre_rwcontig_open_source.patch | 11 - lib/spack/spack/packages/mvapich2/package.py | 27 -- .../openmpi/ad_lustre_rwcontig_open_source.patch | 11 - .../spack/packages/openmpi/llnl-platforms.patch | 151 ----------- lib/spack/spack/packages/openmpi/package.py | 29 --- .../spack/packages/pmgr_collective/package.py | 37 --- lib/spack/spack/packages/scr/package.py | 39 --- lib/spack/spack/packages/spindle/package.py | 39 --- lib/spack/spack/packages/stat/package.py | 39 --- .../spack/test/mock_packages/callpath/package.py | 41 --- .../test/mock_packages/direct_mpich/package.py | 36 --- .../spack/test/mock_packages/dyninst/package.py | 42 ---- lib/spack/spack/test/mock_packages/fake/package.py | 33 --- .../test/mock_packages/indirect_mpich/package.py | 41 --- .../spack/test/mock_packages/libdwarf/package.py | 44 ---- .../spack/test/mock_packages/libelf/package.py | 43 ---- .../spack/test/mock_packages/mpich/package.py | 43 ---- .../spack/test/mock_packages/mpich2/package.py | 47 ---- .../spack/test/mock_packages/mpileaks/package.py | 40 --- .../test/mock_packages/multimethod/package.py | 143 ----------- .../trivial_install_test_package/package.py | 38 --- lib/spack/spack/test/mock_packages/zmpi/package.py | 39 --- lib/spack/spack/test/mock_packages_test.py | 7 +- lib/spack/spack/test/packages.py | 7 +- 39 files changed, 285 insertions(+), 1874 deletions(-) create mode 100644 lib/spack/spack/packages.py delete mode 100644 lib/spack/spack/packages/__init__.py delete mode 100644 lib/spack/spack/packages/callpath/package.py delete mode 100644 lib/spack/spack/packages/cmake/package.py delete mode 100644 lib/spack/spack/packages/dyninst/package.py delete mode 100644 lib/spack/spack/packages/graphlib/package.py delete mode 100644 lib/spack/spack/packages/launchmon/package.py delete mode 100644 lib/spack/spack/packages/launchmon/patch.lmon_install_dir delete mode 100644 lib/spack/spack/packages/libdwarf/package.py delete mode 100644 lib/spack/spack/packages/libelf/package.py delete mode 100644 lib/spack/spack/packages/libunwind/package.py delete mode 100644 lib/spack/spack/packages/mpich/package.py delete mode 100644 lib/spack/spack/packages/mpileaks/package.py delete mode 100644 lib/spack/spack/packages/mrnet/package.py delete mode 100644 lib/spack/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch delete mode 100644 lib/spack/spack/packages/mvapich2/package.py delete mode 100644 lib/spack/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch delete mode 100644 lib/spack/spack/packages/openmpi/llnl-platforms.patch delete mode 100644 lib/spack/spack/packages/openmpi/package.py delete mode 100644 lib/spack/spack/packages/pmgr_collective/package.py delete mode 100644 lib/spack/spack/packages/scr/package.py delete mode 100644 lib/spack/spack/packages/spindle/package.py delete mode 100644 lib/spack/spack/packages/stat/package.py delete mode 100644 lib/spack/spack/test/mock_packages/callpath/package.py delete mode 100644 lib/spack/spack/test/mock_packages/direct_mpich/package.py delete mode 100644 lib/spack/spack/test/mock_packages/dyninst/package.py delete mode 100644 lib/spack/spack/test/mock_packages/fake/package.py delete mode 100644 lib/spack/spack/test/mock_packages/indirect_mpich/package.py delete mode 100644 lib/spack/spack/test/mock_packages/libdwarf/package.py delete mode 100644 lib/spack/spack/test/mock_packages/libelf/package.py delete mode 100644 lib/spack/spack/test/mock_packages/mpich/package.py delete mode 100644 lib/spack/spack/test/mock_packages/mpich2/package.py delete mode 100644 lib/spack/spack/test/mock_packages/mpileaks/package.py delete mode 100644 lib/spack/spack/test/mock_packages/multimethod/package.py delete mode 100644 lib/spack/spack/test/mock_packages/trivial_install_test_package/package.py delete mode 100644 lib/spack/spack/test/mock_packages/zmpi/package.py (limited to 'lib') diff --git a/lib/spack/spack/globals.py b/lib/spack/spack/globals.py index 20801447fa..4ff50a3e7e 100644 --- a/lib/spack/spack/globals.py +++ b/lib/spack/spack/globals.py @@ -53,8 +53,13 @@ install_path = join_path(prefix, "opt") # # Set up the packages database. # -db = PackageDB(join_path(module_path, "packages")) +packages_path = join_path(var_path, "packages") +db = PackageDB(packages_path) +# +# This is the path to mock packages used by spack for testing. +# +mock_packages_path = join_path(var_path, "mock_packages") # # This controls how spack lays out install prefixes and diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py new file mode 100644 index 0000000000..732ced9bf2 --- /dev/null +++ b/lib/spack/spack/packages.py @@ -0,0 +1,274 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import re +import os +import sys +import string +import inspect +import glob +import imp + +import llnl.util.tty as tty +from llnl.util.filesystem import join_path +from llnl.util.lang import memoized + +import spack +import spack.error +import spack.spec +from spack.virtual import ProviderIndex + +# Name of module under which packages are imported +_imported_packages_module = 'spack.packages' + +# Name of the package file inside a package directory +_package_file_name = 'package.py' + +# Valid package names can contain '-' but can't start with it. +valid_package_re = r'^\w[\w-]*$' + +# Don't allow consecutive [_-] in package names +invalid_package_re = r'[_-][_-]+' + + +def valid_package_name(pkg_name): + """Return whether the pkg_name is valid for use in Spack.""" + return (re.match(valid_package_re, pkg_name) and + not re.search(invalid_package_re, pkg_name)) + + +def validate_package_name(pkg_name): + """Raise an exception if pkg_name is not valid.""" + if not valid_package_name(pkg_name): + raise InvalidPackageNameError(pkg_name) + + +def class_name_for_package_name(pkg_name): + """Get a name for the class the package file should contain. Note that + conflicts don't matter because the classes are in different modules. + """ + validate_package_name(pkg_name) + + class_name = pkg_name.replace('_', '-') + class_name = string.capwords(class_name, '-') + class_name = class_name.replace('-', '') + + # If a class starts with a number, prefix it with Number_ to make it a valid + # Python class name. + if re.match(r'^[0-9]', class_name): + class_name = "Num_%s" % class_name + + return class_name + + +def _autospec(function): + """Decorator that automatically converts the argument of a single-arg + function to a Spec.""" + def converter(self, spec_like): + if not isinstance(spec_like, spack.spec.Spec): + spec_like = spack.spec.Spec(spec_like) + return function(self, spec_like) + return converter + + +class PackageDB(object): + def __init__(self, root): + """Construct a new package database from a root directory.""" + self.root = root + self.instances = {} + self.provider_index = None + + + @_autospec + def get(self, spec): + if spec.virtual: + raise UnknownPackageError(spec.name) + + if not spec in self.instances: + package_class = self.get_class_for_package_name(spec.name) + self.instances[spec.name] = package_class(spec) + + return self.instances[spec.name] + + + @_autospec + def get_installed(self, spec): + return [s for s in self.installed_package_specs() if s.satisfies(spec)] + + + @_autospec + def providers_for(self, vpkg_spec): + if self.provider_index is None: + self.provider_index = ProviderIndex(self.all_package_names()) + + providers = self.provider_index.providers_for(vpkg_spec) + if not providers: + raise UnknownPackageError("No such virtual package: %s" % vpkg_spec) + return providers + + + def dirname_for_package_name(self, pkg_name): + """Get the directory name for a particular package. This is the + directory that contains its package.py file.""" + return join_path(self.root, pkg_name) + + + def filename_for_package_name(self, pkg_name): + """Get the filename for the module we should load for a particular + package. Packages for a pacakge DB live in + ``$root//package.py`` + + This will return a proper package.py path even if the + package doesn't exist yet, so callers will need to ensure + the package exists before importing. + """ + validate_package_name(pkg_name) + pkg_dir = self.dirname_for_package_name(pkg_name) + return join_path(pkg_dir, _package_file_name) + + + def installed_package_specs(self): + """Read installed package names straight from the install directory + layout. + """ + return spack.install_layout.all_specs() + + + @memoized + def all_package_names(self): + """Generator function for all packages. This looks for + ``/package.py`` files within the root direcotry""" + all_package_names = [] + for pkg_name in os.listdir(self.root): + pkg_dir = join_path(self.root, pkg_name) + pkg_file = join_path(pkg_dir, _package_file_name) + if os.path.isfile(pkg_file): + all_package_names.append(pkg_name) + all_package_names.sort() + return all_package_names + + + def all_packages(self): + for name in self.all_package_names(): + yield get(name) + + + def exists(self, pkg_name): + """Whether a package with the supplied name exists .""" + return os.path.exists(self.filename_for_package_name(pkg_name)) + + + @memoized + def get_class_for_package_name(self, pkg_name): + """Get an instance of the class for a particular package. + + This method uses Python's ``imp`` package to load python + source from a Spack package's ``package.py`` file. A + normal python import would only load each package once, but + because we do this dynamically, the method needs to be + memoized to ensure there is only ONE package class + instance, per package, per database. + """ + file_path = self.filename_for_package_name(pkg_name) + + if os.path.exists(file_path): + if not os.path.isfile(file_path): + tty.die("Something's wrong. '%s' is not a file!" % file_path) + if not os.access(file_path, os.R_OK): + tty.die("Cannot read '%s'!" % file_path) + else: + raise UnknownPackageError(pkg_name) + + class_name = class_name_for_package_name(pkg_name) + try: + module_name = _imported_packages_module + '.' + pkg_name + module = imp.load_source(module_name, file_path) + + except ImportError, e: + tty.die("Error while importing %s from %s:\n%s" % ( + pkg_name, file_path, e.message)) + + cls = getattr(module, class_name) + if not inspect.isclass(cls): + tty.die("%s.%s is not a class" % (pkg_name, class_name)) + + return cls + + + def compute_dependents(self): + """Reads in all package files and sets dependence information on + Package objects in memory. + """ + if not hasattr(compute_dependents, index): + compute_dependents.index = {} + + for pkg in all_packages(): + if pkg._dependents is None: + pkg._dependents = [] + + for name, dep in pkg.dependencies.iteritems(): + dpkg = get(name) + if dpkg._dependents is None: + dpkg._dependents = [] + dpkg._dependents.append(pkg.name) + + + def graph_dependencies(self, out=sys.stdout): + """Print out a graph of all the dependencies between package. + Graph is in dot format.""" + out.write('digraph G {\n') + out.write(' label = "Spack Dependencies"\n') + out.write(' labelloc = "b"\n') + out.write(' rankdir = "LR"\n') + out.write(' ranksep = "5"\n') + out.write('\n') + + def quote(string): + return '"%s"' % string + + deps = [] + for pkg in all_packages(): + out.write(' %-30s [label="%s"]\n' % (quote(pkg.name), pkg.name)) + for dep_name, dep in pkg.dependencies.iteritems(): + deps.append((pkg.name, dep_name)) + out.write('\n') + + for pair in deps: + out.write(' "%s" -> "%s"\n' % pair) + out.write('}\n') + + +class InvalidPackageNameError(spack.error.SpackError): + """Raised when we encounter a bad package name.""" + def __init__(self, name): + super(InvalidPackageNameError, self).__init__( + "Invalid package name: " + name) + self.name = name + + +class UnknownPackageError(spack.error.SpackError): + """Raised when we encounter a package spack doesn't have.""" + def __init__(self, name): + super(UnknownPackageError, self).__init__("Package %s not found." % name) + self.name = name diff --git a/lib/spack/spack/packages/__init__.py b/lib/spack/spack/packages/__init__.py deleted file mode 100644 index beb8ecf6ab..0000000000 --- a/lib/spack/spack/packages/__init__.py +++ /dev/null @@ -1,278 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -import re -import os -import sys -import string -import inspect -import glob -import imp - -import llnl.util.tty as tty -from llnl.util.filesystem import join_path -from llnl.util.lang import memoized - -import spack -import spack.error -import spack.spec -from spack.virtual import ProviderIndex - -# Name of module under which packages are imported -_imported_packages_module = 'spack.packages' - -# Name of the package file inside a package directory -_package_file_name = 'package.py' - -# Valid package names can contain '-' but can't start with it. -valid_package_re = r'^\w[\w-]*$' - -# Don't allow consecutive [_-] in package names -invalid_package_re = r'[_-][_-]+' - - -def valid_package_name(pkg_name): - """Return whether the pkg_name is valid for use in Spack.""" - return (re.match(valid_package_re, pkg_name) and - not re.search(invalid_package_re, pkg_name)) - - -def validate_package_name(pkg_name): - """Raise an exception if pkg_name is not valid.""" - if not valid_package_name(pkg_name): - raise InvalidPackageNameError(pkg_name) - - -def class_name_for_package_name(pkg_name): - """Get a name for the class the package file should contain. Note that - conflicts don't matter because the classes are in different modules. - """ - validate_package_name(pkg_name) - - class_name = pkg_name.replace('_', '-') - class_name = string.capwords(class_name, '-') - class_name = class_name.replace('-', '') - - # If a class starts with a number, prefix it with Number_ to make it a valid - # Python class name. - if re.match(r'^[0-9]', class_name): - class_name = "Num_%s" % class_name - - return class_name - - -def _autospec(function): - """Decorator that automatically converts the argument of a single-arg - function to a Spec.""" - def converter(self, spec_like): - if not isinstance(spec_like, spack.spec.Spec): - spec_like = spack.spec.Spec(spec_like) - return function(self, spec_like) - return converter - - -class PackageDB(object): - def __init__(self, root): - """Construct a new package database from a root directory.""" - self.root = root - self.instances = {} - self.provider_index = None - - - @_autospec - def get(self, spec): - if spec.virtual: - raise UnknownPackageError(spec.name) - - if not spec in self.instances: - package_class = self.get_class_for_package_name(spec.name) - self.instances[spec.name] = package_class(spec) - - return self.instances[spec.name] - - - @_autospec - def get_installed(self, spec): - return [s for s in self.installed_package_specs() if s.satisfies(spec)] - - - @_autospec - def providers_for(self, vpkg_spec): - if self.provider_index is None: - self.provider_index = ProviderIndex(self.all_package_names()) - - providers = self.provider_index.providers_for(vpkg_spec) - if not providers: - raise UnknownPackageError("No such virtual package: %s" % vpkg_spec) - return providers - - - def dirname_for_package_name(self, pkg_name): - """Get the directory name for a particular package. This is the - directory that contains its package.py file.""" - return join_path(self.root, pkg_name) - - - def filename_for_package_name(self, pkg_name): - """Get the filename for the module we should load for a particular - package. Packages for a pacakge DB live in - ``$root//package.py`` - - This will return a proper package.py path even if the - package doesn't exist yet, so callers will need to ensure - the package exists before importing. - """ - validate_package_name(pkg_name) - pkg_dir = self.dirname_for_package_name(pkg_name) - return join_path(pkg_dir, _package_file_name) - - - def installed_package_specs(self): - """Read installed package names straight from the install directory - layout. - """ - return spack.install_layout.all_specs() - - - @memoized - def all_package_names(self): - """Generator function for all packages. This looks for - ``/package.py`` files within the root direcotry""" - all_package_names = [] - for pkg_name in os.listdir(self.root): - pkg_dir = join_path(self.root, pkg_name) - pkg_file = join_path(pkg_dir, _package_file_name) - if os.path.isfile(pkg_file): - all_package_names.append(pkg_name) - all_package_names.sort() - return all_package_names - - - def all_packages(self): - for name in self.all_package_names(): - yield get(name) - - - def exists(self, pkg_name): - """Whether a package with the supplied name exists .""" - return os.path.exists(self.filename_for_package_name(pkg_name)) - - - @memoized - def get_class_for_package_name(self, pkg_name): - """Get an instance of the class for a particular package. - - This method uses Python's ``imp`` package to load python - source from a Spack package's ``package.py`` file. A - normal python import would only load each package once, but - because we do this dynamically, the method needs to be - memoized to ensure there is only ONE package class - instance, per package, per database. - """ - file_path = self.filename_for_package_name(pkg_name) - - if os.path.exists(file_path): - if not os.path.isfile(file_path): - tty.die("Something's wrong. '%s' is not a file!" % file_path) - if not os.access(file_path, os.R_OK): - tty.die("Cannot read '%s'!" % file_path) - else: - raise UnknownPackageError(pkg_name) - - # Figure out pacakges module based on self.root - if not re.match(r'%s' % spack.module_path, self.root): - raise RuntimeError("Packages path is not a submodule of spack.") - - class_name = class_name_for_package_name(pkg_name) - try: - module_name = _imported_packages_module + '.' + pkg_name - module = imp.load_source(module_name, file_path) - - except ImportError, e: - tty.die("Error while importing %s from %s:\n%s" % ( - pkg_name, file_path, e.message)) - - cls = getattr(module, class_name) - if not inspect.isclass(cls): - tty.die("%s.%s is not a class" % (pkg_name, class_name)) - - return cls - - - def compute_dependents(self): - """Reads in all package files and sets dependence information on - Package objects in memory. - """ - if not hasattr(compute_dependents, index): - compute_dependents.index = {} - - for pkg in all_packages(): - if pkg._dependents is None: - pkg._dependents = [] - - for name, dep in pkg.dependencies.iteritems(): - dpkg = get(name) - if dpkg._dependents is None: - dpkg._dependents = [] - dpkg._dependents.append(pkg.name) - - - def graph_dependencies(self, out=sys.stdout): - """Print out a graph of all the dependencies between package. - Graph is in dot format.""" - out.write('digraph G {\n') - out.write(' label = "Spack Dependencies"\n') - out.write(' labelloc = "b"\n') - out.write(' rankdir = "LR"\n') - out.write(' ranksep = "5"\n') - out.write('\n') - - def quote(string): - return '"%s"' % string - - deps = [] - for pkg in all_packages(): - out.write(' %-30s [label="%s"]\n' % (quote(pkg.name), pkg.name)) - for dep_name, dep in pkg.dependencies.iteritems(): - deps.append((pkg.name, dep_name)) - out.write('\n') - - for pair in deps: - out.write(' "%s" -> "%s"\n' % pair) - out.write('}\n') - - -class InvalidPackageNameError(spack.error.SpackError): - """Raised when we encounter a bad package name.""" - def __init__(self, name): - super(InvalidPackageNameError, self).__init__( - "Invalid package name: " + name) - self.name = name - - -class UnknownPackageError(spack.error.SpackError): - """Raised when we encounter a package spack doesn't have.""" - def __init__(self, name): - super(UnknownPackageError, self).__init__("Package %s not found." % name) - self.name = name diff --git a/lib/spack/spack/packages/callpath/package.py b/lib/spack/spack/packages/callpath/package.py deleted file mode 100644 index 5d92d77302..0000000000 --- a/lib/spack/spack/packages/callpath/package.py +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Callpath(Package): - homepage = "https://github.com/tgamblin/callpath" - url = "http://github.com/tgamblin/callpath-0.2.tar.gz" - - depends_on("dyninst") - depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/lib/spack/spack/packages/cmake/package.py b/lib/spack/spack/packages/cmake/package.py deleted file mode 100644 index 70406610b6..0000000000 --- a/lib/spack/spack/packages/cmake/package.py +++ /dev/null @@ -1,36 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Cmake(Package): - homepage = 'https://www.cmake.org' - url = 'http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz' - versions = { '2.8.10.2' : '097278785da7182ec0aea8769d06860c' } - - def install(self, spec, prefix): - configure('--prefix=' + prefix, - '--parallel=' + str(make_jobs)) - make() - make('install') diff --git a/lib/spack/spack/packages/dyninst/package.py b/lib/spack/spack/packages/dyninst/package.py deleted file mode 100644 index 2318317de5..0000000000 --- a/lib/spack/spack/packages/dyninst/package.py +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Dyninst(Package): - homepage = "https://paradyn.org" - url = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz" - list_url = "http://www.dyninst.org/downloads/dyninst-8.x" - - versions = {'8.1.2' : 'bf03b33375afa66fe0efa46ce3f4b17a', - '8.1.1' : '1f8743e3a5662b25ce64a7edf647e77d' } - - depends_on("libelf") - depends_on("libdwarf") - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/lib/spack/spack/packages/graphlib/package.py b/lib/spack/spack/packages/graphlib/package.py deleted file mode 100644 index c959135147..0000000000 --- a/lib/spack/spack/packages/graphlib/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class Graphlib(Package): - """Library to create, manipulate, and export graphs Graphlib.""" - homepage = "http://https://github.com/lee218llnl/graphlib" - url = "https://github.com/lee218llnl/graphlib/archive/v2.0.0.tar.gz" - - versions = { '2.0.0' : '43c6df84f1d38ba5a5dce0ae19371a70', } - - def install(self, spec, prefix): - cmake(".", *std_cmake_args) - - make() - make("install") diff --git a/lib/spack/spack/packages/launchmon/package.py b/lib/spack/spack/packages/launchmon/package.py deleted file mode 100644 index e2b82610fd..0000000000 --- a/lib/spack/spack/packages/launchmon/package.py +++ /dev/null @@ -1,45 +0,0 @@ -############################################################################## -# Copyright (c) 2014, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Launchmon(Package): - homepage = "http://sourceforge.net/projects/launchmon" - url = "http://sourceforge.net/code-snapshots/svn/l/la/launchmon/code/launchmon-code-481-branches-launchmon-1.0-release.zip" - force_url = True - list_url = "http://sourceforge.net/p/launchmon/code/HEAD/tree" - - #versions = {'1.0.0' : 'a0e5bfb7d82dc708d58bdbf93697886c'} - versions = {'1.0.0' : '9d1184397d3081b94e2c0577c3c605e5'} - patch('patch.lmon_install_dir', level=0) - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - - # TODO: remove once Jira SPACK-19 is fixed - import shutil - shutil.copy2('/usr/bin/libtool', 'libtool') - - make() - make("install") diff --git a/lib/spack/spack/packages/launchmon/patch.lmon_install_dir b/lib/spack/spack/packages/launchmon/patch.lmon_install_dir deleted file mode 100644 index 8a1d93fdc9..0000000000 --- a/lib/spack/spack/packages/launchmon/patch.lmon_install_dir +++ /dev/null @@ -1,147 +0,0 @@ -Index: launchmon/src/linux/lmon_api/Makefile.am -=================================================================== ---- launchmon/src/linux/lmon_api/Makefile.am (revision 481) -+++ launchmon/src/linux/lmon_api/Makefile.am (working copy) -@@ -80,13 +80,10 @@ - libmonfeapi_la_CFLAGS = $(AM_CFLAGS) - libmonfeapi_la_CXXFLAGS = $(AM_CXXFLAGS) - --libmonfeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ -- -L$(top_srcdir)/@GCRYPTLOC@ \ -- -L$(top_srcdir)/@GPGERRLOC@ \ -- $(AM_LDFLAGS) \ -- -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ -+libmonfeapi_la_LDFLAGS = $(AM_LDFLAGS) \ -+ -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ - --libmonfeapi_la_LIBADD = @LIBPTHREAD@ @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ @LIBRT@ -+libmonfeapi_la_LIBADD = @LIBPTHREAD@ $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ @LIBRT@ - - libmonbeapi_la_SOURCES = lmon_be.cxx \ - lmon_daemon_internal.cxx \ -@@ -113,13 +110,10 @@ - libmonbeapi_la_CFLAGS = $(AM_CFLAGS) - libmonbeapi_la_CXXFLAGS = $(AM_CXXFLAGS) - --libmonbeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ -- -L$(top_srcdir)/@GCRYPTLOC@ \ -- -L$(top_srcdir)/@GPGERRLOC@ \ -- $(AM_LDFLAGS) \ -+libmonbeapi_la_LDFLAGS = $(AM_LDFLAGS) \ - -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ - --libmonbeapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ -+libmonbeapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ - - - # -@@ -146,10 +140,8 @@ - - libmonmwapi_la_CXXFLAGS = $(AM_CXXFLAGS) - --libmonmwapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ -- -L$(top_srcdir)/@GCRYPTLOC@ \ -- -L$(top_srcdir)/@GPGERRLOC@ \ -- $(AM_LDFLAGS) \ -+libmonmwapi_la_LDFLAGS = $(AM_LDFLAGS) \ - -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ - --libmonmwapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ -+ -+libmonmwapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ -Index: tools/cobo/test/Makefile.am -=================================================================== ---- tools/cobo/test/Makefile.am (revision 481) -+++ tools/cobo/test/Makefile.am (working copy) -@@ -37,12 +37,12 @@ - - client_SOURCES = client.c - --client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ -+client_LDFLAGS = - --client_LDADD = @LIBCOMM@ -+client_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@ - - server_rsh_SOURCES = server_rsh.c - --server_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ -+server_rsh_LDFLAGS = - --server_rsh_LDADD = @LIBCOMM@ -+server_rsh_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@ -Index: tools/pmgr_collective/test/Makefile.am -=================================================================== ---- tools/pmgr_collective/test/Makefile.am (revision 481) -+++ tools/pmgr_collective/test/Makefile.am (working copy) -@@ -31,18 +31,18 @@ - ## Jun 10 2008 DHA: Copied from the old Makefile. - ## - --INCLUDES = -I$(top_srcdir)/@COMMLOC@ -+INCLUDES = - - noinst_PROGRAMS = client mpirun_rsh - - client_SOURCES = client.c - --client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ -+client_LDFLAGS = - --client_LDADD = @LIBCOMM@ -+client_LDADD = @COMMLOC@/@LIBCOMM@ - - mpirun_rsh_SOURCES = mpirun_rsh.c - --mpirun_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ -+mpirun_rsh_LDFLAGS = - --mpirun_rsh_LDADD = @LIBCOMM@ -+mpirun_rsh_LDADD = @COMMLOC@/@LIBCOMM@ -Index: config/x_ac_bootfabric.m4 -=================================================================== ---- config/x_ac_bootfabric.m4 (revision 481) -+++ config/x_ac_bootfabric.m4 (working copy) -@@ -63,7 +63,7 @@ - #AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) - #AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) - #AC_SUBST(COMMLOC, tools/pmgr_collective/src) -- #AC_SUBST(LIBCOMM, -lpmgr_collective) -+ #AC_SUBST(LIBCOMM, libcobo.la) - #else - commfab_found="no" - AC_MSG_ERROR([--with-bootfabric=pmgr is given, but pmgr_collective has been deprecated]) -@@ -87,7 +87,7 @@ - AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) - AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) - AC_SUBST(COMMLOC, tools/cobo/src) -- AC_SUBST(LIBCOMM, -lcobo) -+ AC_SUBST(LIBCOMM, libcobo.la) - - if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then - AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) -@@ -117,7 +117,7 @@ - AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) - AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) - AC_SUBST(COMMLOC, tools/cobo/src) -- AC_SUBST(LIBCOMM, -lcobo) -+ AC_SUBST(LIBCOMM, libcobo.la) - - if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then - AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) -Index: config/x_ac_gcrpyt.m4 -=================================================================== ---- config/x_ac_gcrypt.m4 2011-10-22 00:50:38.000000000 -0700 -+++ config/x_ac_gcrypt.patched.m4 2014-03-14 11:33:59.189220000 -0700 -@@ -55,8 +55,8 @@ - AC_CONFIG_SUBDIRS([tools/libgpg-error]) - AC_SUBST(GPGERRLOC, [tools/libgpg-error/src]) - AC_SUBST(GCRYPTLOC, [tools/libgcrypt/src]) -- AC_SUBST(LIBGCRYPT, [-lgcrypt]) -- AC_SUBST(LIBGPGERR, [-lgpg-error]) -+ AC_SUBST(LIBGCRYPT, [libgcrypt.la]) -+ AC_SUBST(LIBGPGERR, [libgpg-error.la]) - gcrypt_configured="yes" - else - AC_MSG_ERROR([tools/libgpg-error or tools/libgcrypt not found]) - diff --git a/lib/spack/spack/packages/libdwarf/package.py b/lib/spack/spack/packages/libdwarf/package.py deleted file mode 100644 index 657e84705a..0000000000 --- a/lib/spack/spack/packages/libdwarf/package.py +++ /dev/null @@ -1,75 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * -import os - -# Only build certain parts of dwarf because the other ones break. -dwarf_dirs = ['libdwarf', 'dwarfdump2'] - -class Libdwarf(Package): - homepage = "http://www.prevanders.net/dwarf.html" - url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" - list_url = homepage - - versions = { '20130729' : '4cc5e48693f7b93b7aa0261e63c0e21d', - '20130207' : '64b42692e947d5180e162e46c689dfbf', - '20130126' : 'ded74a5e90edb5a12aac3c29d260c5db' } - - depends_on("libelf") - - - def clean(self): - for dir in dwarf_dirs: - with working_dir(dir): - if os.path.exists('Makefile'): - make('clean') - - - def install(self, spec, prefix): - # dwarf build does not set arguments for ar properly - make.add_default_arg('ARFLAGS=rcs') - - # Dwarf doesn't provide an install, so we have to do it. - mkdirp(prefix.bin, prefix.include, prefix.lib, prefix.man1) - - with working_dir('libdwarf'): - configure("--prefix=" + prefix, "--enable-shared") - make() - - install('libdwarf.a', prefix.lib) - install('libdwarf.so', prefix.lib) - install('libdwarf.h', prefix.include) - install('dwarf.h', prefix.include) - - with working_dir('dwarfdump2'): - configure("--prefix=" + prefix) - - # This makefile has strings of copy commands that - # cause a race in parallel - make(parallel=False) - - install('dwarfdump', prefix.bin) - install('dwarfdump.conf', prefix.lib) - install('dwarfdump.1', prefix.man1) diff --git a/lib/spack/spack/packages/libelf/package.py b/lib/spack/spack/packages/libelf/package.py deleted file mode 100644 index f663ba750d..0000000000 --- a/lib/spack/spack/packages/libelf/package.py +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Libelf(Package): - """libelf lets you read, modify or create ELF object files in an - architecture-independent way. The library takes care of size - and endian issues, e.g. you can process a file for SPARC - processors on an Intel-based system.""" - - homepage = "http://www.mr511.de/software/english.html" - url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" - - versions = { '0.8.13' : '4136d7b4c04df68b686570afa26988ac', - '0.8.12' : 'e21f8273d9f5f6d43a59878dc274fec7', } - - def install(self, spec, prefix): - configure("--prefix=" + prefix, - "--enable-shared", - "--disable-dependency-tracking", - "--disable-debug") - make() - - # The mkdir commands in libelf's install can fail in parallel - make("install", parallel=False) diff --git a/lib/spack/spack/packages/libunwind/package.py b/lib/spack/spack/packages/libunwind/package.py deleted file mode 100644 index c93b5b2c98..0000000000 --- a/lib/spack/spack/packages/libunwind/package.py +++ /dev/null @@ -1,36 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Libunwind(Package): - homepage = "http://www.nongnu.org/libunwind/" - url = "http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz" - - versions = { '1.1' : 'fb4ea2f6fbbe45bf032cd36e586883ce' } - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/lib/spack/spack/packages/mpich/package.py b/lib/spack/spack/packages/mpich/package.py deleted file mode 100644 index af9e8266dc..0000000000 --- a/lib/spack/spack/packages/mpich/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpich(Package): - """MPICH is a high performance and widely portable implementation of - the Message Passing Interface (MPI) standard.""" - homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" - list_url = "http://www.mpich.org/static/downloads/" - list_depth = 2 - - versions = { '3.0.4' : '9c5d5d4fe1e17dd12153f40bc5b6dbc0' } - - provides('mpi@:3', when='@3:') - provides('mpi@:1', when='@1:') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/lib/spack/spack/packages/mpileaks/package.py b/lib/spack/spack/packages/mpileaks/package.py deleted file mode 100644 index 3307b9fdee..0000000000 --- a/lib/spack/spack/packages/mpileaks/package.py +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpileaks(Package): - homepage = "http://www.llnl.gov" - url = "http://www.llnl.gov/mpileaks-1.0.tar.gz" - - depends_on("mpi") - depends_on("callpath") - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/lib/spack/spack/packages/mrnet/package.py b/lib/spack/spack/packages/mrnet/package.py deleted file mode 100644 index 15d851f83e..0000000000 --- a/lib/spack/spack/packages/mrnet/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class Mrnet(Package): - """The MRNet Multi-Cast Reduction Network.""" - homepage = "http://paradyn.org/mrnet" - url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_4.0.0.tar.gz" - - versions = { '4.0.0' : 'd00301c078cba57ef68613be32ceea2f', } - parallel = False - - def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") - - make() - make("install") diff --git a/lib/spack/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch b/lib/spack/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch deleted file mode 100644 index ff85845cf8..0000000000 --- a/lib/spack/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800 -+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800 -@@ -8,7 +8,7 @@ - * Copyright (C) 2008 Sun Microsystems, Lustre group - */ - --#define _XOPEN_SOURCE 600 -+//#define _XOPEN_SOURCE 600 - #include - #include - #include "ad_lustre.h" diff --git a/lib/spack/spack/packages/mvapich2/package.py b/lib/spack/spack/packages/mvapich2/package.py deleted file mode 100644 index f372679f49..0000000000 --- a/lib/spack/spack/packages/mvapich2/package.py +++ /dev/null @@ -1,27 +0,0 @@ -from spack import * - -class Mvapich2(Package): - """mvapich2 is an MPI implmenetation for infiniband networks.""" - - homepage = "http://mvapich.cse.ohio-state.edu/" - url = "http://mvapich.cse.ohio-state.edu/download/mvapich2/mv2/mvapich2-1.9.tgz" - - versions = { '1.9' : '5dc58ed08fd3142c260b70fe297e127c', } - - provides('mpi@:1', when='@1.9:') - - patch('ad_lustre_rwcontig_open_source.patch', when='@1.9:') - - def install(self, spec, prefix): - configure( - "--prefix=" + prefix, - "--enable-f77", "--enable-fc", "--enable-cxx", - "--enable-fast=all", "--enable-g=dbg", "--enable-nmpi-as-mpi", - "--enable-shared", "--enable-sharedlibs=gcc", - "--enable-debuginfo", - "--with-pm=no", "--with-pmi=slurm", - "--with-device=ch3:psm", - "--enable-romio", "--with-file-system=lustre+nfs+ufs", - "--disable-mpe", "--without-mpe") - make() - make("install") diff --git a/lib/spack/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch b/lib/spack/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch deleted file mode 100644 index daa825ccbe..0000000000 --- a/lib/spack/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ompi/mca/io/romio/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800 -+++ b/ompi/mca/io/romio/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800 -@@ -8,7 +8,7 @@ - * Copyright (C) 2008 Sun Microsystems, Lustre group - */ - --#define _XOPEN_SOURCE 600 -+//#define _XOPEN_SOURCE 600 - #include - #include - #include "ad_lustre.h" diff --git a/lib/spack/spack/packages/openmpi/llnl-platforms.patch b/lib/spack/spack/packages/openmpi/llnl-platforms.patch deleted file mode 100644 index f515743c4d..0000000000 --- a/lib/spack/spack/packages/openmpi/llnl-platforms.patch +++ /dev/null @@ -1,151 +0,0 @@ -diff -Nuar openmpi-1.6.5.orig/contrib/platform/llnl/optimized openmpi-1.6.5.llnl/contrib/platform/llnl/optimized ---- openmpi-1.6.5.orig/contrib/platform/llnl/optimized 1969-12-31 16:00:00.000000000 -0800 -+++ openmpi-1.6.5.llnl/contrib/platform/llnl/optimized 2013-08-08 23:47:12.704029000 -0700 -@@ -0,0 +1,29 @@ -+enable_dlopen=no -+enable_mem_debug=no -+enable_mem_profile=no -+enable_debug_symbols=no -+enable_binaries=yes -+enable_heterogeneous=no -+enable_debug=no -+enable_shared=yes -+enable_static=yes -+enable_memchecker=no -+enable_ipv6=no -+enable_mpi_f77=yes -+enable_mpi_f90=yes -+enable_mpi_cxx=yes -+enable_mpi_cxx_seek=yes -+enable_cxx_exceptions=no -+enable_ft_thread=no -+enable_per_user_config_files=no -+enable_mca_no_build=carto,crs,filem,routed-linear,snapc,pml-dr,pml-crcp2,pml-crcpw,pml-v,pml-example,crcp,btl-tcp -+enable_contrib_no_build=libnbc,vt -+with_slurm=yes -+with_pmi=yes -+with_tm=no -+with_openib=yes -+with_psm=yes -+with_devel_headers=yes -+with_io_romio_flags=--with-file-system=ufs+nfs+lustre -+with_memory_manager=ptmalloc2 -+with_valgrind=no -diff -Nuar openmpi-1.6.5.orig/contrib/platform/llnl/optimized.conf openmpi-1.6.5.llnl/contrib/platform/llnl/optimized.conf ---- openmpi-1.6.5.orig/contrib/platform/llnl/optimized.conf 1969-12-31 16:00:00.000000000 -0800 -+++ openmpi-1.6.5.llnl/contrib/platform/llnl/optimized.conf 2013-08-08 23:43:52.907553000 -0700 -@@ -0,0 +1,114 @@ -+# -+# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -+# University Research and Technology -+# Corporation. All rights reserved. -+# Copyright (c) 2004-2005 The University of Tennessee and The University -+# of Tennessee Research Foundation. All rights -+# reserved. -+# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -+# University of Stuttgart. All rights reserved. -+# Copyright (c) 2004-2005 The Regents of the University of California. -+# All rights reserved. -+# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. -+# Copyright (c) 2011 Los Alamos National Security, LLC. -+# All rights reserved. -+# $COPYRIGHT$ -+# -+# Additional copyrights may follow -+# -+# $HEADER$ -+# -+ -+# This is the default system-wide MCA parameters defaults file. -+# Specifically, the MCA parameter "mca_param_files" defaults to a -+# value of -+# "$HOME/.openmpi/mca-params.conf:$sysconf/openmpi-mca-params.conf" -+# (this file is the latter of the two). So if the default value of -+# mca_param_files is not changed, this file is used to set system-wide -+# MCA parameters. This file can therefore be used to set system-wide -+# default MCA parameters for all users. Of course, users can override -+# these values if they want, but this file is an excellent location -+# for setting system-specific MCA parameters for those users who don't -+# know / care enough to investigate the proper values for them. -+ -+# Note that this file is only applicable where it is visible (in a -+# filesystem sense). Specifically, MPI processes each read this file -+# during their startup to determine what default values for MCA -+# parameters should be used. mpirun does not bundle up the values in -+# this file from the node where it was run and send them to all nodes; -+# the default value decisions are effectively distributed. Hence, -+# these values are only applicable on nodes that "see" this file. If -+# $sysconf is a directory on a local disk, it is likely that changes -+# to this file will need to be propagated to other nodes. If $sysconf -+# is a directory that is shared via a networked filesystem, changes to -+# this file will be visible to all nodes that share this $sysconf. -+ -+# The format is straightforward: one per line, mca_param_name = -+# rvalue. Quoting is ignored (so if you use quotes or escape -+# characters, they'll be included as part of the value). For example: -+ -+# Disable run-time MPI parameter checking -+# mpi_param_check = 0 -+ -+# Note that the value "~/" will be expanded to the current user's home -+# directory. For example: -+ -+# Change component loading path -+# component_path = /usr/local/lib/openmpi:~/my_openmpi_components -+ -+# See "ompi_info --param all all" for a full listing of Open MPI MCA -+# parameters available and their default values. -+# -+ -+# Basic behavior to smooth startup -+mca_component_show_load_errors = 0 -+orte_abort_timeout = 10 -+opal_set_max_sys_limits = 1 -+orte_report_launch_progress = 1 -+ -+# Define timeout for daemons to report back during launch -+orte_startup_timeout = 10000 -+ -+## Protect the shared file systems -+orte_no_session_dirs = /p,/usr/local,/usr/global,/nfs/tmp1,/nfs/tmp2 -+orte_tmpdir_base = /tmp -+ -+## Require an allocation to run - protects the frontend -+## from inadvertent job executions -+orte_allocation_required = 1 -+ -+## MPI behavior -+## Do NOT specify mpi_leave_pinned so system -+## can figure out for itself whether or not -+## it is supported and usable -+orte_notifier = syslog -+ -+## Add the interface for out-of-band communication -+## and set it up -+oob_tcp_if_include=ib0 -+oob_tcp_peer_retries = 1000 -+oob_tcp_disable_family = IPv6 -+oob_tcp_listen_mode = listen_thread -+oob_tcp_sndbuf = 32768 -+oob_tcp_rcvbuf = 32768 -+ -+## Define the MPI interconnects -+btl = sm,openib,self -+ -+## We are using the PSM MTL by default -+## There can only be one! -+pml = cm -+ -+## Setup OpenIB - just in case -+btl_openib_want_fork_support = 0 -+btl_openib_cpc_include = oob -+btl_openib_receive_queues = S,4096,1024:S,12288,512:S,65536,512 -+ -+## Enable cpu affinity -+opal_paffinity_alone = 1 -+ -+## Setup MPI options -+mpi_show_handle_leaks = 0 -+mpi_warn_on_fork = 1 -+mpi_abort_print_stack = 0 -+ diff --git a/lib/spack/spack/packages/openmpi/package.py b/lib/spack/spack/packages/openmpi/package.py deleted file mode 100644 index f24a66c12e..0000000000 --- a/lib/spack/spack/packages/openmpi/package.py +++ /dev/null @@ -1,29 +0,0 @@ -from spack import * - -class Openmpi(Package): - """Open MPI is a project combining technologies and resources from - several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) - in order to build the best MPI library available. A completely - new MPI-2 compliant implementation, Open MPI offers advantages - for system and software vendors, application developers and - computer science researchers. - """ - - homepage = "http://www.open-mpi.org" - url = "http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2" - - versions = { '1.6.5' : '03aed2a4aa4d0b27196962a2a65fc475', } - - patch('ad_lustre_rwcontig_open_source.patch') - patch('llnl-platforms.patch') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") - - # TODO: implement variants next, so we can have LLNL and LANL options. - # use above for LANL builds, but for LLNL builds, we need this - # "--with-platform=contrib/platform/llnl/optimized") - - make() - make("install") diff --git a/lib/spack/spack/packages/pmgr_collective/package.py b/lib/spack/spack/packages/pmgr_collective/package.py deleted file mode 100644 index 0874e2d17b..0000000000 --- a/lib/spack/spack/packages/pmgr_collective/package.py +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class PmgrCollective(Package): - """PMGR_COLLECTIVE provides a scalable network for bootstrapping - MPI jobs.""" - homepage = "http://www.sourceforge.net/projects/pmgrcollective" - url = "http://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz" - - versions = { '1.0' : '0384d008774274cc3fc7b4d810dfd07e' } - - def install(self, spec, prefix): - make('PREFIX="' + prefix + '"') - make('PREFIX="' + prefix + '"', "install") diff --git a/lib/spack/spack/packages/scr/package.py b/lib/spack/spack/packages/scr/package.py deleted file mode 100644 index cb908e830e..0000000000 --- a/lib/spack/spack/packages/scr/package.py +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Scr(Package): - homepage = "https://computation-rnd.llnl.gov/scr" - url = "http://downloads.sourceforge.net/project/scalablecr/releases/scr-1.1-7.tar.gz" - - depends_on("mpi") - - versions = { '1.1-7' : 'a5930e9ab27d1b7049447c2fd7734ebd' } - - def install(self, spec, prefix): - configure("--prefix=" + prefix, - "--with-scr-config-file=" + prefix + "/etc/scr.conf") - make() - make("install") diff --git a/lib/spack/spack/packages/spindle/package.py b/lib/spack/spack/packages/spindle/package.py deleted file mode 100644 index 0d106221d8..0000000000 --- a/lib/spack/spack/packages/spindle/package.py +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################## -# Copyright (c) 2014, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Spindle(Package): - homepage = "https://computation-rnd.llnl.gov/spindle" - url = "https://github.com/hpc/Spindle/archive/v0.8.1.tar.gz" - list_url = "https://github.com/hpc/Spindle/releases" - - versions = {'0.8.1' : 'f11793a6b9d8df2cd231fccb2857d912' } - - depends_on("launchmon") - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/lib/spack/spack/packages/stat/package.py b/lib/spack/spack/packages/stat/package.py deleted file mode 100644 index d621bcef01..0000000000 --- a/lib/spack/spack/packages/stat/package.py +++ /dev/null @@ -1,39 +0,0 @@ -from spack import * - -class Stat(Package): - """Library to create, manipulate, and export graphs Graphlib.""" - homepage = "http://paradyn.org/STAT/STAT.html" - url = "https://github.com/lee218llnl/stat/archive/v2.0.0.tar.gz" - - versions = { '2.0.0' : 'c7494210b0ba26b577171b92838e1a9b', } - - depends_on('libdwarf') - depends_on('dyninst') - depends_on('graphlib') - #depends_on('launchmon') # TODO: when added, path gets too long (Jira SPACK-21)! - depends_on('mrnet') - - def install(self, spec, prefix): - configure( - "--enable-gui", - "--prefix=%s" % prefix, - - # TODO: this uses the launchmon package, but path is - # too long (see depends_on above) (Jira SPACK-21) - # "--with-launchmon=%s" % spec['launchmon'].prefix, - - # TODO: launchmon line above is the proper one once - # SPACK-21 is fixed - "--with-launchmon=/collab/usr/global/tools/launchmon/chaos_5_x86_64_ib/launchmon-1.0.0-20140312", - - "--with-mrnet=%s" % spec['mrnet'].prefix, - "--with-graphlib=%s" % spec['graphlib'].prefix, - "--with-stackwalker=%s" % spec['dyninst'].prefix, - "--with-libdwarf=%s" % spec['libdwarf'].prefix) - - # TODO: remove once SPACK-19 is fixed - import shutil - shutil.copy2('/usr/bin/libtool', 'libtool') - - make(parallel=False) - make("install") diff --git a/lib/spack/spack/test/mock_packages/callpath/package.py b/lib/spack/spack/test/mock_packages/callpath/package.py deleted file mode 100644 index b4fd0f4482..0000000000 --- a/lib/spack/spack/test/mock_packages/callpath/package.py +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Callpath(Package): - homepage = "https://github.com/tgamblin/callpath" - url = "http://github.com/tgamblin/callpath-1.0.tar.gz" - - versions = { 0.8 : 'foobarbaz', - 0.9 : 'foobarbaz', - 1.0 : 'foobarbaz' } - - depends_on("dyninst") - depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/lib/spack/spack/test/mock_packages/direct_mpich/package.py b/lib/spack/spack/test/mock_packages/direct_mpich/package.py deleted file mode 100644 index d702e4481b..0000000000 --- a/lib/spack/spack/test/mock_packages/direct_mpich/package.py +++ /dev/null @@ -1,36 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class DirectMpich(Package): - homepage = "http://www.example.com" - url = "http://www.example.com/direct_mpich-1.0.tar.gz" - - versions = { 1.0 : 'foobarbaz' } - - depends_on('mpich') - - def install(self, spec, prefix): - pass diff --git a/lib/spack/spack/test/mock_packages/dyninst/package.py b/lib/spack/spack/test/mock_packages/dyninst/package.py deleted file mode 100644 index d32c4b5504..0000000000 --- a/lib/spack/spack/test/mock_packages/dyninst/package.py +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Dyninst(Package): - homepage = "https://paradyn.org" - url = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz" - list_url = "http://www.dyninst.org/downloads/dyninst-8.x" - - versions = { - '8.1.2' : 'bf03b33375afa66fe0efa46ce3f4b17a', - '8.1.1' : '1f8743e3a5662b25ce64a7edf647e77d' } - - depends_on("libelf") - depends_on("libdwarf") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/lib/spack/spack/test/mock_packages/fake/package.py b/lib/spack/spack/test/mock_packages/fake/package.py deleted file mode 100644 index 88bc6d8669..0000000000 --- a/lib/spack/spack/test/mock_packages/fake/package.py +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Fake(Package): - homepage = "http://www.fake-spack-example.org" - url = "http://www.fake-spack-example.org/downloads/fake-1.0.tar.gz" - versions = { '1.0' : 'foobarbaz' } - - def install(self, spec, prefix): - pass diff --git a/lib/spack/spack/test/mock_packages/indirect_mpich/package.py b/lib/spack/spack/test/mock_packages/indirect_mpich/package.py deleted file mode 100644 index a53cb9330c..0000000000 --- a/lib/spack/spack/test/mock_packages/indirect_mpich/package.py +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class IndirectMpich(Package): - """Test case for a package that depends on MPI and one of its - dependencies requires a *particular version* of MPI. - """ - - homepage = "http://www.example.com" - url = "http://www.example.com/indirect_mpich-1.0.tar.gz" - - versions = { 1.0 : 'foobarbaz' } - - depends_on('mpi') - depends_on('direct_mpich') - - def install(self, spec, prefix): - pass diff --git a/lib/spack/spack/test/mock_packages/libdwarf/package.py b/lib/spack/spack/test/mock_packages/libdwarf/package.py deleted file mode 100644 index 0f4d55fd88..0000000000 --- a/lib/spack/spack/test/mock_packages/libdwarf/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * -import os - -# Only build certain parts of dwarf because the other ones break. -dwarf_dirs = ['libdwarf', 'dwarfdump2'] - -class Libdwarf(Package): - homepage = "http://www.prevanders.net/dwarf.html" - url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" - list_url = homepage - - versions = { 20130729 : "64b42692e947d5180e162e46c689dfbf", - 20130207 : 'foobarbaz', - 20111030 : 'foobarbaz', - 20070703 : 'foobarbaz' } - - depends_on("libelf") - - def install(self, spec, prefix): - pass diff --git a/lib/spack/spack/test/mock_packages/libelf/package.py b/lib/spack/spack/test/mock_packages/libelf/package.py deleted file mode 100644 index 5ac07de4e3..0000000000 --- a/lib/spack/spack/test/mock_packages/libelf/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Libelf(Package): - homepage = "http://www.mr511.de/software/english.html" - url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" - - versions = {'0.8.13' : '4136d7b4c04df68b686570afa26988ac', - '0.8.12' : 'e21f8273d9f5f6d43a59878dc274fec7', - '0.8.10' : '9db4d36c283d9790d8fa7df1f4d7b4d9' } - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--enable-shared", - "--disable-dependency-tracking", - "--disable-debug") - make() - - # The mkdir commands in libelf's intsall can fail in parallel - make("install", parallel=False) diff --git a/lib/spack/spack/test/mock_packages/mpich/package.py b/lib/spack/spack/test/mock_packages/mpich/package.py deleted file mode 100644 index 2a8e1cebe3..0000000000 --- a/lib/spack/spack/test/mock_packages/mpich/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpich(Package): - homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" - list_url = "http://www.mpich.org/static/downloads/" - list_depth = 2 - - versions = { '3.0.4' : '9c5d5d4fe1e17dd12153f40bc5b6dbc0', - '3.0.3' : 'foobarbaz', - '3.0.2' : 'foobarbaz', - '3.0.1' : 'foobarbaz', - '3.0' : 'foobarbaz' } - - provides('mpi@:3', when='@3:') - provides('mpi@:1', when='@1:') - - def install(self, spec, prefix): - pass diff --git a/lib/spack/spack/test/mock_packages/mpich2/package.py b/lib/spack/spack/test/mock_packages/mpich2/package.py deleted file mode 100644 index 84dce4cccb..0000000000 --- a/lib/spack/spack/test/mock_packages/mpich2/package.py +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpich2(Package): - homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/1.5/mpich2-1.5.tar.gz" - list_url = "http://www.mpich.org/static/downloads/" - list_depth = 2 - - versions = { '1.5' : '9c5d5d4fe1e17dd12153f40bc5b6dbc0', - '1.4' : 'foobarbaz', - '1.3' : 'foobarbaz', - '1.2' : 'foobarbaz', - '1.1' : 'foobarbaz', - '1.0' : 'foobarbaz' } - - provides('mpi@:2.0') - provides('mpi@:2.1', when='@1.1:') - provides('mpi@:2.2', when='@1.2:') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/lib/spack/spack/test/mock_packages/mpileaks/package.py b/lib/spack/spack/test/mock_packages/mpileaks/package.py deleted file mode 100644 index c34d5991e6..0000000000 --- a/lib/spack/spack/test/mock_packages/mpileaks/package.py +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpileaks(Package): - homepage = "http://www.llnl.gov" - url = "http://www.llnl.gov/mpileaks-1.0.tar.gz" - - versions = { 1.0 : 'foobarbaz', - 2.1 : 'foobarbaz', - 2.2 : 'foobarbaz', - 2.3 : 'foobarbaz' } - - depends_on("mpi") - depends_on("callpath") - - def install(self, spec, prefix): - pass diff --git a/lib/spack/spack/test/mock_packages/multimethod/package.py b/lib/spack/spack/test/mock_packages/multimethod/package.py deleted file mode 100644 index 75b1606ffc..0000000000 --- a/lib/spack/spack/test/mock_packages/multimethod/package.py +++ /dev/null @@ -1,143 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - - -class Multimethod(Package): - """This package is designed for use with Spack's multimethod test. - It has a bunch of test cases for the @when decorator that the - test uses. - """ - - homepage = 'http://www.example.com/' - url = 'http://www.example.com/example-1.0.tar.gz' - - # - # These functions are only valid for versions 1, 2, and 3. - # - @when('@1.0') - def no_version_2(self): - return 1 - - @when('@3.0') - def no_version_2(self): - return 3 - - @when('@4.0') - def no_version_2(self): - return 4 - - - # - # These functions overlap, so there is ambiguity, but we'll take - # the first one. - # - @when('@:4') - def version_overlap(self): - return 1 - - @when('@2:') - def version_overlap(self): - return 2 - - - # - # More complicated case with cascading versions. - # - def mpi_version(self): - return 0 - - @when('^mpi@3:') - def mpi_version(self): - return 3 - - @when('^mpi@2:') - def mpi_version(self): - return 2 - - @when('^mpi@1:') - def mpi_version(self): - return 1 - - - # - # Use these to test whether the default method is called when no - # match is found. This also tests whether we can switch methods - # on compilers - # - def has_a_default(self): - return 'default' - - @when('%gcc') - def has_a_default(self): - return 'gcc' - - @when('%intel') - def has_a_default(self): - return 'intel' - - - - # - # Make sure we can switch methods on different architectures - # - @when('=x86_64') - def different_by_architecture(self): - return 'x86_64' - - @when('=ppc64') - def different_by_architecture(self): - return 'ppc64' - - @when('=ppc32') - def different_by_architecture(self): - return 'ppc32' - - @when('=arm64') - def different_by_architecture(self): - return 'arm64' - - - # - # Make sure we can switch methods on different dependencies - # - @when('^mpich') - def different_by_dep(self): - return 'mpich' - - @when('^zmpi') - def different_by_dep(self): - return 'zmpi' - - - # - # Make sure we can switch on virtual dependencies - # - def different_by_virtual_dep(self): - return 1 - - @when('^mpi@2:') - def different_by_virtual_dep(self): - return 2 diff --git a/lib/spack/spack/test/mock_packages/trivial_install_test_package/package.py b/lib/spack/spack/test/mock_packages/trivial_install_test_package/package.py deleted file mode 100644 index b665825b32..0000000000 --- a/lib/spack/spack/test/mock_packages/trivial_install_test_package/package.py +++ /dev/null @@ -1,38 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class TrivialInstallTestPackage(Package): - """This package is a stub with a trivial install method. It allows us - to test the install and uninstall logic of spack.""" - homepage = "http://www.example.com/trivial_install" - url = "http://www.unit-test-should-replace-this-url/trivial_install-1.0.tar.gz" - - versions = { '1.0' : 'foobarbaz' } - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make('install') diff --git a/lib/spack/spack/test/mock_packages/zmpi/package.py b/lib/spack/spack/test/mock_packages/zmpi/package.py deleted file mode 100644 index a86bd706bb..0000000000 --- a/lib/spack/spack/test/mock_packages/zmpi/package.py +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Zmpi(Package): - """This is a fake MPI package used to demonstrate virtual package providers - with dependencies.""" - homepage = "http://www.spack-fake-zmpi.org" - url = "http://www.spack-fake-zmpi.org/downloads/zmpi-1.0.tar.gz" - - versions = { '1.0' : 'foobarbaz' } - - provides('mpi@:10.0') - depends_on('fake') - - def install(self, spec, prefix): - pass diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index f300995d7e..e9a8113c09 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -24,15 +24,10 @@ ############################################################################## import unittest -from llnl.util.lang import list_modules -from llnl.util.filesystem import join_path - import spack from spack.packages import PackageDB from spack.spec import Spec -mock_packages_path = join_path(spack.module_path, 'test', 'mock_packages') - def set_pkg_dep(pkg, spec): """Alters dependence information for a pacakge. Use this to mock up constraints. @@ -48,7 +43,7 @@ class MockPackagesTest(unittest.TestCase): # us to set up contrived packages that don't interfere with # real ones. self.real_db = spack.db - spack.db = PackageDB(mock_packages_path) + spack.db = PackageDB(spack.mock_packages_path) @classmethod diff --git a/lib/spack/spack/test/packages.py b/lib/spack/spack/test/packages.py index 146700948f..1b2e0ab07a 100644 --- a/lib/spack/spack/test/packages.py +++ b/lib/spack/spack/test/packages.py @@ -24,9 +24,10 @@ ############################################################################## import unittest +from llnl.util.filesystem import join_path + import spack import spack.packages as packages - from spack.test.mock_packages_test import * @@ -43,7 +44,7 @@ class PackagesTest(MockPackagesTest): def test_package_filename(self): filename = spack.db.filename_for_package_name('mpich') - self.assertEqual(filename, join_path(mock_packages_path, 'mpich', 'package.py')) + self.assertEqual(filename, join_path(spack.mock_packages_path, 'mpich', 'package.py')) def test_package_name(self): @@ -53,7 +54,7 @@ class PackagesTest(MockPackagesTest): def test_nonexisting_package_filename(self): filename = spack.db.filename_for_package_name('some-nonexisting-package') - self.assertEqual(filename, join_path(mock_packages_path, 'some-nonexisting-package', 'package.py')) + self.assertEqual(filename, join_path(spack.mock_packages_path, 'some-nonexisting-package', 'package.py')) def test_package_class_names(self): -- cgit v1.2.3-60-g2f50