|
53 | 53 | from llnl.util.tty.color import cescape, colorize |
54 | 54 | from llnl.util.tty.log import MultiProcessFd |
55 | 55 |
|
| 56 | +import spack.build_systems._checks |
56 | 57 | import spack.build_systems.cmake |
57 | 58 | import spack.build_systems.meson |
58 | 59 | import spack.build_systems.python |
|
62 | 63 | import spack.deptypes as dt |
63 | 64 | import spack.error |
64 | 65 | import spack.main |
| 66 | +import spack.multimethod |
65 | 67 | import spack.package_base |
66 | 68 | import spack.paths |
67 | 69 | import spack.platforms |
|
73 | 75 | import spack.util.executable |
74 | 76 | from spack import traverse |
75 | 77 | from spack.context import Context |
76 | | -from spack.error import NoHeadersError, NoLibrariesError |
| 78 | +from spack.error import InstallError, NoHeadersError, NoLibrariesError |
77 | 79 | from spack.install_test import spack_install_test_log |
78 | | -from spack.installer import InstallError |
79 | 80 | from spack.util.cpus import determine_number_of_jobs |
80 | 81 | from spack.util.environment import ( |
81 | 82 | SYSTEM_DIR_CASE_ENTRY, |
@@ -1135,7 +1136,7 @@ def _setup_pkg_and_run( |
1135 | 1136 | return_value = function(pkg, kwargs) |
1136 | 1137 | write_pipe.send(return_value) |
1137 | 1138 |
|
1138 | | - except StopPhase as e: |
| 1139 | + except spack.error.StopPhase as e: |
1139 | 1140 | # Do not create a full ChildError from this, it's not an error |
1140 | 1141 | # it's a control statement. |
1141 | 1142 | write_pipe.send(e) |
@@ -1296,7 +1297,7 @@ def exitcode_msg(p): |
1296 | 1297 | p.join() |
1297 | 1298 |
|
1298 | 1299 | # If returns a StopPhase, raise it |
1299 | | - if isinstance(child_result, StopPhase): |
| 1300 | + if isinstance(child_result, spack.error.StopPhase): |
1300 | 1301 | # do not print |
1301 | 1302 | raise child_result |
1302 | 1303 |
|
@@ -1505,17 +1506,6 @@ def _make_child_error(msg, module, name, traceback, log, log_type, context): |
1505 | 1506 | return ChildError(msg, module, name, traceback, log, log_type, context) |
1506 | 1507 |
|
1507 | 1508 |
|
1508 | | -class StopPhase(spack.error.SpackError): |
1509 | | - """Pickle-able exception to control stopped builds.""" |
1510 | | - |
1511 | | - def __reduce__(self): |
1512 | | - return _make_stop_phase, (self.message, self.long_message) |
1513 | | - |
1514 | | - |
1515 | | -def _make_stop_phase(msg, long_msg): |
1516 | | - return StopPhase(msg, long_msg) |
1517 | | - |
1518 | | - |
1519 | 1509 | def write_log_summary(out, log_type, log, last=None): |
1520 | 1510 | errors, warnings = parse_log_events(log) |
1521 | 1511 | nerr = len(errors) |
|
0 commit comments