summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-18 13:32:37 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-18 13:32:37 -0700
commit23f3f1adfe01f7b1301959e7e54584724679c7b3 (patch)
tree54bd8534bdd3ee5d3d5d1e499a3072bf837dc5fd /lib
parent741bea032c2d6e1dc8a4227c588743fb58008a1c (diff)
downloadspack-23f3f1adfe01f7b1301959e7e54584724679c7b3.tar.gz
spack-23f3f1adfe01f7b1301959e7e54584724679c7b3.tar.bz2
spack-23f3f1adfe01f7b1301959e7e54584724679c7b3.tar.xz
spack-23f3f1adfe01f7b1301959e7e54584724679c7b3.zip
Make InstallError and ExternalPackageError visiible in packages.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/__init__.py8
-rw-r--r--lib/spack/spack/package.py4
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py
index 0ba42bbbfc..aee11f061f 100644
--- a/lib/spack/spack/__init__.py
+++ b/lib/spack/spack/__init__.py
@@ -189,5 +189,9 @@ import spack.util.executable
from spack.util.executable import *
__all__ += spack.util.executable.__all__
-from spack.package import install_dependency_symlinks, flatten_dependencies, DependencyConflictError
-__all__ += ['install_dependency_symlinks', 'flatten_dependencies', 'DependencyConflictError']
+from spack.package import \
+ install_dependency_symlinks, flatten_dependencies, DependencyConflictError, \
+ InstallError, ExternalPackageError
+__all__ += [
+ 'install_dependency_symlinks', 'flatten_dependencies', 'DependencyConflictError',
+ 'InstallError', 'ExternalPackageError']
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index b488e4c49d..dafad0b184 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1351,6 +1351,10 @@ class InstallError(spack.error.SpackError):
super(InstallError, self).__init__(message, long_msg)
+class ExternalPackageError(InstallError):
+ """Raised by install() when a package is only for external use."""
+
+
class PackageStillNeededError(InstallError):
"""Raised when package is still needed by another on uninstall."""
def __init__(self, spec, dependents):