From: Egbert Eich Date: Thu Apr 7 20:25:46 2022 +0200 Subject: Fix error during documentation build due to recursive module inclusion Patch-mainline: Not yet Git-commit: 7000c074119ebc3354b18a3b2aa27d431f906840 References: Signed-off-by: Egbert Eich Signed-off-by: Egbert Eich --- lib/spack/spack/cmd/__init__.py | 5 ++++- lib/spack/spack/environment/environment.py | 5 ++++- lib/spack/spack/installer.py | 5 ++++- lib/spack/spack/main.py | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index 0b0451c..cbedb9a 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -21,7 +21,10 @@ from llnl.util.tty.color import colorize import spack.config -import spack.environment as ev +try: + import spack.environment as ev +except AttributeError: + pass import spack.error import spack.extensions import spack.paths diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 3114f55..059b057 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -32,7 +32,10 @@ import spack.stage import spack.store import spack.subprocess_context -import spack.user_environment as uenv +try: + import spack.user_environment as uenv +except AttributeError: + pass import spack.util.cpus import spack.util.environment import spack.util.hash diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index df1d704..ef0bda2 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -45,7 +45,10 @@ from llnl.util.tty.color import colorize from llnl.util.tty.log import log_output -import spack.binary_distribution as binary_distribution +try: + import spack.binary_distribution as binary_distribution +except AttributeError: + pass import spack.compilers import spack.error import spack.hooks diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index f41423f..bb6c909 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -36,7 +36,10 @@ import spack import spack.cmd import spack.config -import spack.environment as ev +try: + import spack.environment as ev +except AttributeError: + pass import spack.modules import spack.paths import spack.platforms