lsst-sconsUtils 30.0.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ # Explain what happens when you try to import outside scons
2
+ # When building documentation you want to force a SCons import
3
+ import os
4
+ import sys
5
+
6
+ if ("pydoc" in sys.modules or "sphinx" in sys.modules) and "SCONS_DIR" in os.environ:
7
+ scons_path = os.path.join(os.environ["SCONS_DIR"], "lib", "scons")
8
+ if scons_path not in sys.path:
9
+ sys.path.append(scons_path)
10
+
11
+ try:
12
+ import SCons.Script
13
+ except ImportError:
14
+ raise ImportError("lsst.sconsUtils cannot be imported outside an scons script.")
15
+
16
+ # Try to import the generated version module.
17
+ try:
18
+ from .version import *
19
+ except Exception:
20
+ __version__ = "unknown"
21
+
22
+ # These should remain in their own namespaces
23
+ # These inject methods into SConsEnviroment
24
+ from . import builders, installation, scripts, tests
25
+
26
+ # Pull some names into the package namespace
27
+ from .builders import ProductDir
28
+ from .dependencies import Configuration, ExternalConfiguration, configure
29
+ from .state import env, log, opts, targets