diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 0ba42bbbfcd..aee11f061f3 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -189,5 +189,9 @@ 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 b488e4c49db..dafad0b184a 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1351,6 +1351,10 @@ def __init__(self, message, long_msg=None): 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):