Fix various bootstrap/concretizer import issues (#47467)
This commit is contained in:
parent
a31c525778
commit
d09b185522
@ -17,6 +17,7 @@
|
|||||||
from llnl.util.tty.colify import colify
|
from llnl.util.tty.colify import colify
|
||||||
from llnl.util.tty.color import colorize
|
from llnl.util.tty.color import colorize
|
||||||
|
|
||||||
|
import spack.concretize
|
||||||
import spack.config # breaks a cycle.
|
import spack.config # breaks a cycle.
|
||||||
import spack.environment as ev
|
import spack.environment as ev
|
||||||
import spack.error
|
import spack.error
|
||||||
|
@ -10,8 +10,11 @@
|
|||||||
|
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
|
|
||||||
|
import spack.compilers
|
||||||
import spack.config
|
import spack.config
|
||||||
import spack.error
|
import spack.error
|
||||||
|
import spack.repo
|
||||||
|
import spack.util.parallel
|
||||||
from spack.spec import ArchSpec, CompilerSpec, Spec
|
from spack.spec import ArchSpec, CompilerSpec, Spec
|
||||||
|
|
||||||
CHECK_COMPILER_EXISTENCE = True
|
CHECK_COMPILER_EXISTENCE = True
|
||||||
@ -87,6 +90,8 @@ def concretize_together_when_possible(
|
|||||||
tests: list of package names for which to consider tests dependencies. If True, all nodes
|
tests: list of package names for which to consider tests dependencies. If True, all nodes
|
||||||
will have test dependencies. If False, test dependencies will be disregarded.
|
will have test dependencies. If False, test dependencies will be disregarded.
|
||||||
"""
|
"""
|
||||||
|
import spack.solver.asp
|
||||||
|
|
||||||
to_concretize = [concrete if concrete else abstract for abstract, concrete in spec_list]
|
to_concretize = [concrete if concrete else abstract for abstract, concrete in spec_list]
|
||||||
old_concrete_to_abstract = {
|
old_concrete_to_abstract = {
|
||||||
concrete: abstract for (abstract, concrete) in spec_list if concrete
|
concrete: abstract for (abstract, concrete) in spec_list if concrete
|
||||||
@ -119,6 +124,8 @@ def concretize_separately(
|
|||||||
tests: list of package names for which to consider tests dependencies. If True, all nodes
|
tests: list of package names for which to consider tests dependencies. If True, all nodes
|
||||||
will have test dependencies. If False, test dependencies will be disregarded.
|
will have test dependencies. If False, test dependencies will be disregarded.
|
||||||
"""
|
"""
|
||||||
|
import spack.bootstrap
|
||||||
|
|
||||||
to_concretize = [abstract for abstract, concrete in spec_list if not concrete]
|
to_concretize = [abstract for abstract, concrete in spec_list if not concrete]
|
||||||
args = [
|
args = [
|
||||||
(i, str(abstract), tests)
|
(i, str(abstract), tests)
|
||||||
@ -155,11 +162,7 @@ def concretize_separately(
|
|||||||
|
|
||||||
for j, (i, concrete, duration) in enumerate(
|
for j, (i, concrete, duration) in enumerate(
|
||||||
spack.util.parallel.imap_unordered(
|
spack.util.parallel.imap_unordered(
|
||||||
spack.concretize._concretize_task,
|
_concretize_task, args, processes=num_procs, debug=tty.is_debug(), maxtaskperchild=1
|
||||||
args,
|
|
||||||
processes=num_procs,
|
|
||||||
debug=tty.is_debug(),
|
|
||||||
maxtaskperchild=1,
|
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
ret.append((i, concrete))
|
ret.append((i, concrete))
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
import spack
|
import spack
|
||||||
import spack.caches
|
import spack.caches
|
||||||
import spack.compilers
|
|
||||||
import spack.concretize
|
import spack.concretize
|
||||||
import spack.config
|
import spack.config
|
||||||
import spack.deptypes as dt
|
import spack.deptypes as dt
|
||||||
@ -43,7 +42,6 @@
|
|||||||
import spack.util.environment
|
import spack.util.environment
|
||||||
import spack.util.hash
|
import spack.util.hash
|
||||||
import spack.util.lock as lk
|
import spack.util.lock as lk
|
||||||
import spack.util.parallel
|
|
||||||
import spack.util.path
|
import spack.util.path
|
||||||
import spack.util.spack_json as sjson
|
import spack.util.spack_json as sjson
|
||||||
import spack.util.spack_yaml as syaml
|
import spack.util.spack_yaml as syaml
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
import spack
|
import spack
|
||||||
import spack.binary_distribution
|
import spack.binary_distribution
|
||||||
import spack.bootstrap.core
|
|
||||||
import spack.compilers
|
import spack.compilers
|
||||||
import spack.concretize
|
import spack.concretize
|
||||||
import spack.config
|
import spack.config
|
||||||
@ -816,7 +815,7 @@ def solve(self, setup, specs, reuse=None, output=None, control=None, allow_depre
|
|||||||
solve, and the internal statistics from clingo.
|
solve, and the internal statistics from clingo.
|
||||||
"""
|
"""
|
||||||
# avoid circular import
|
# avoid circular import
|
||||||
import spack.bootstrap
|
import spack.bootstrap.core
|
||||||
|
|
||||||
output = output or DEFAULT_OUTPUT_CONFIGURATION
|
output = output or DEFAULT_OUTPUT_CONFIGURATION
|
||||||
timer = spack.util.timer.Timer()
|
timer = spack.util.timer.Timer()
|
||||||
|
Loading…
Reference in New Issue
Block a user