Skip to content

Commit ca9b434

Browse files
committed
Disallow python without threading support on startup
1 parent a3ac1dd commit ca9b434

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SCons/Script/Main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,13 @@ def main() -> None:
14471447
sys.stderr.write("scons: *** Minimum Python version is %d.%d.%d\n" %minimum_python_version)
14481448
sys.exit(1)
14491449

1450+
try:
1451+
import threading
1452+
except ImportError:
1453+
msg = "scons: *** SCons version %s requires a Python interpreter with support for the `threading` package"
1454+
sys.stderr.write(msg % SConsVersion)
1455+
sys.exit(1)
1456+
14501457
parts = ["SCons by Steven Knight et al.:\n"]
14511458
try:
14521459
import SCons

0 commit comments

Comments
 (0)