2021-07-06 23:48:15 +02:00
|
|
|
From: Egbert Eich <eich@suse.com>
|
|
|
|
Date: Thu Feb 4 09:17:55 2021 +0100
|
|
|
|
Subject: Fix error during documentation build due to recursive module inclusion
|
|
|
|
Patch-mainline: Not yet
|
2021-07-07 18:05:08 +02:00
|
|
|
Git-commit: 0239763866f506f34357b30e9d882d1e8a87211e
|
2021-07-06 23:48:15 +02:00
|
|
|
References:
|
|
|
|
|
|
|
|
Signed-off-by: Egbert Eich <eich@suse.com>
|
|
|
|
---
|
2021-07-07 18:05:08 +02:00
|
|
|
lib/spack/spack/build_environment.py | 3 ++-
|
|
|
|
lib/spack/spack/environment.py | 3 ++-
|
|
|
|
lib/spack/spack/main.py | 3 ++-
|
|
|
|
lib/spack/spack/user_environment.py | 3 ++-
|
|
|
|
4 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
|
|
|
|
index 3cf02dc..afd34c0 100644
|
|
|
|
--- a/lib/spack/spack/build_environment.py
|
|
|
|
+++ b/lib/spack/spack/build_environment.py
|
|
|
|
@@ -51,7 +51,8 @@
|
|
|
|
import spack.build_systems.cmake
|
|
|
|
import spack.build_systems.meson
|
|
|
|
import spack.config
|
|
|
|
-import spack.main
|
|
|
|
+if not ( "spack.main" in sys.modules ):
|
|
|
|
+ import spack.main
|
|
|
|
import spack.paths
|
|
|
|
import spack.package
|
|
|
|
import spack.repo
|
|
|
|
diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py
|
|
|
|
index 7f7625f..e48929e 100644
|
|
|
|
--- a/lib/spack/spack/environment.py
|
|
|
|
+++ b/lib/spack/spack/environment.py
|
|
|
|
@@ -30,7 +30,8 @@
|
|
|
|
import spack.util.spack_json as sjson
|
|
|
|
import spack.util.spack_yaml as syaml
|
|
|
|
import spack.config
|
|
|
|
-import spack.user_environment as uenv
|
|
|
|
+if not ( "spack.user_environment" in sys.modules ):
|
|
|
|
+ import spack.user_environment as uenv
|
|
|
|
from spack.filesystem_view import YamlFilesystemView
|
|
|
|
import spack.util.environment
|
|
|
|
import spack.architecture as architecture
|
|
|
|
diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py
|
|
|
|
index f4265a5..494a9ce 100644
|
|
|
|
--- a/lib/spack/spack/main.py
|
|
|
|
+++ b/lib/spack/spack/main.py
|
|
|
|
@@ -31,7 +31,8 @@
|
|
|
|
import spack.architecture
|
|
|
|
import spack.config
|
|
|
|
import spack.cmd
|
|
|
|
-import spack.environment as ev
|
|
|
|
+if not ( "spack.environment" in sys.modules ):
|
|
|
|
+ import spack.environment as ev
|
|
|
|
import spack.paths
|
|
|
|
import spack.repo
|
|
|
|
import spack.store
|
2021-07-06 23:48:15 +02:00
|
|
|
diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py
|
2021-07-07 18:05:08 +02:00
|
|
|
index f08f21e..8925246 100644
|
2021-07-06 23:48:15 +02:00
|
|
|
--- a/lib/spack/spack/user_environment.py
|
|
|
|
+++ b/lib/spack/spack/user_environment.py
|
2021-07-07 18:05:08 +02:00
|
|
|
@@ -8,7 +8,8 @@
|
2021-07-06 23:48:15 +02:00
|
|
|
import spack.config
|
|
|
|
import spack.util.prefix as prefix
|
|
|
|
import spack.util.environment as environment
|
|
|
|
-import spack.build_environment as build_env
|
2021-07-07 18:05:08 +02:00
|
|
|
+if not ( "spack.build_environment" in sys.modules ):
|
|
|
|
+ import spack.build_environment as build_env
|
2021-07-06 23:48:15 +02:00
|
|
|
|
|
|
|
#: Environment variable name Spack uses to track individually loaded packages
|
|
|
|
spack_loaded_hashes_var = 'SPACK_LOADED_HASHES'
|